Skip to content

Commit ed0b7e0

Browse files
committed
feat(CRS-6685): Move kubeflare image to GHCR and add metadata labels
1 parent bb1366a commit ed0b7e0

5 files changed

Lines changed: 88 additions & 21 deletions

File tree

.github/workflows/build.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Set up Go
13-
uses: actions/setup-go@v1
13+
uses: actions/setup-go@v6
1414
with:
15-
go-version: 1.16
15+
go-version: 1.19
1616
- name: Checkout code
17-
uses: actions/checkout@v2
17+
uses: actions/checkout@v6
1818
- name: Build Docker image
1919
run: |
2020
make image

.github/workflows/release.yaml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,20 @@ jobs:
1010
runs-on: ubuntu-latest
1111
steps:
1212
- name: Checkout
13-
uses: actions/checkout@v2
13+
uses: actions/checkout@v6
1414
- name: Set up Go
15-
uses: actions/setup-go@v2
15+
uses: actions/setup-go@v6
1616
with:
17-
go-version: 1.16
18-
- name: Login to Docker Hub
19-
uses: azure/docker-login@v1
17+
go-version: 1.22
18+
- name: Login to Container Registry
19+
uses: docker/login-action@v3
2020
with:
21-
username: ${{ secrets.DOCKERHUB_USER }}
22-
password: ${{ secrets.DOCKERHUB_PASSWORD }}
21+
registry: ghcr.io
22+
username: ${{ github.actor }}
23+
password: ${{ secrets.GITHUB_TOKEN }}
24+
2325
- name: Run GoReleaser
24-
uses: goreleaser/goreleaser-action@v2
26+
uses: goreleaser/goreleaser-action@v6
2527
with:
2628
args: release --rm-dist
2729
env:

.goreleaser.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,9 @@ builds:
2323
dockers:
2424
- dockerfile: ./deploy/Dockerfile.manager
2525
image_templates:
26-
- "hellofresh/kubeflare-manager:{{.Version}}"
26+
- "ghcr.io/hellofresh/kubeflare-manager:{{.Version}}"
27+
build_flag_templates:
28+
- "--label=org.opencontainers.image.source=https://github.com/{{ .Env.GITHUB_REPOSITORY }}"
29+
- "--label=org.opencontainers.image.version={{ .Version }}"
30+
- "--label=org.opencontainers.image.revision={{ .Commit }}"
31+
- "--label=org.opencontainers.image.created={{ .Date }}"

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,10 +121,10 @@ dev: kubeflare
121121
image: kubeflare
122122
docker build -t kubeflare/kubeflare-manager:$(IMAGE_TAG) -f ./Dockerfile.manager .
123123

124-
.PHONY: contoller-gen
124+
.PHONY: controller-gen
125125
controller-gen:
126126
ifeq (, $(shell which controller-gen))
127-
go get sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1
127+
go install sigs.k8s.io/controller-tools/cmd/controller-gen@v0.4.1
128128
CONTROLLER_GEN=$(shell go env GOPATH)/bin/controller-gen
129129
else
130130
CONTROLLER_GEN=$(shell which controller-gen)
@@ -133,7 +133,7 @@ endif
133133
.PHONY: client-gen
134134
client-gen:
135135
ifeq (, $(shell which client-gen))
136-
go get k8s.io/code-generator/cmd/client-gen@kubernetes-1.19.16
136+
go install k8s.io/code-generator/cmd/client-gen@kubernetes-1.19.16
137137
CLIENT_GEN=$(shell go env GOPATH)/bin/client-gen
138138
else
139139
CLIENT_GEN=$(shell which client-gen)

go.mod

Lines changed: 66 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
module github.com/replicatedhq/kubeflare
22

3-
go 1.16
3+
go 1.19
44

55
require (
6-
github.com/cloudflare/cloudflare-go v0.13.8
6+
github.com/cloudflare/cloudflare-go v0.31.0
77
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
88
github.com/pkg/errors v0.9.1
99
github.com/spf13/cobra v1.2.1
@@ -19,19 +19,79 @@ require (
1919
)
2020

2121
require (
22+
cloud.google.com/go v0.81.0 // indirect
23+
github.com/PuerkitoBio/purell v1.1.1 // indirect
24+
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
25+
github.com/beorn7/perks v1.0.1 // indirect
26+
github.com/cespare/xxhash/v2 v2.1.1 // indirect
27+
github.com/davecgh/go-spew v1.1.1 // indirect
28+
github.com/emicklei/go-restful v2.9.5+incompatible // indirect
2229
github.com/evanphx/json-patch v4.11.0+incompatible // indirect
30+
github.com/fsnotify/fsnotify v1.4.9 // indirect
31+
github.com/ghodss/yaml v1.0.0 // indirect
32+
github.com/go-logr/logr v0.4.0 // indirect
33+
github.com/go-openapi/jsonpointer v0.19.3 // indirect
34+
github.com/go-openapi/jsonreference v0.19.3 // indirect
2335
github.com/go-openapi/spec v0.19.5 // indirect
36+
github.com/go-openapi/swag v0.19.5 // indirect
37+
github.com/gogo/protobuf v1.3.2 // indirect
38+
github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e // indirect
39+
github.com/golang/protobuf v1.5.2 // indirect
40+
github.com/google/btree v1.0.0 // indirect
41+
github.com/google/go-cmp v0.5.5 // indirect
42+
github.com/google/gofuzz v1.1.0 // indirect
43+
github.com/google/uuid v1.1.2 // indirect
2444
github.com/googleapis/gnostic v0.5.5 // indirect
45+
github.com/hashicorp/golang-lru v0.5.4 // indirect
46+
github.com/hashicorp/hcl v1.0.0 // indirect
2547
github.com/imdario/mergo v0.3.12 // indirect
48+
github.com/inconshreveable/mousetrap v1.0.0 // indirect
49+
github.com/json-iterator/go v1.1.11 // indirect
50+
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
51+
github.com/magiconair/properties v1.8.5 // indirect
52+
github.com/mailru/easyjson v0.7.0 // indirect
2653
github.com/matttproud/golang_protobuf_extensions v1.0.2-0.20181231171920-c182affec369 // indirect
27-
github.com/prometheus/client_golang v1.11.1 // indirect
28-
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781 // indirect
29-
golang.org/x/sys v0.0.0-20210817190340-bfb29a6856f2 // indirect
30-
golang.org/x/time v0.0.0-20210723032227-1f47c861a9ac // indirect
54+
github.com/mitchellh/mapstructure v1.4.1 // indirect
55+
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
56+
github.com/modern-go/reflect2 v1.0.1 // indirect
57+
github.com/pelletier/go-toml v1.9.3 // indirect
58+
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
59+
github.com/pmezard/go-difflib v1.0.0 // indirect
60+
github.com/prometheus/client_golang v1.11.0 // indirect
61+
github.com/prometheus/client_model v0.2.0 // indirect
62+
github.com/prometheus/common v0.26.0 // indirect
63+
github.com/prometheus/procfs v0.6.0 // indirect
64+
github.com/spf13/afero v1.6.0 // indirect
65+
github.com/spf13/cast v1.3.1 // indirect
66+
github.com/spf13/jwalterweatherman v1.1.0 // indirect
67+
github.com/spf13/pflag v1.0.5 // indirect
68+
github.com/subosito/gotenv v1.2.0 // indirect
69+
go.uber.org/atomic v1.7.0 // indirect
70+
go.uber.org/multierr v1.6.0 // indirect
71+
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 // indirect
72+
golang.org/x/mod v0.4.2 // indirect
73+
golang.org/x/net v0.0.0-20220127200216-cd36cc0744dd // indirect
74+
golang.org/x/oauth2 v0.0.0-20210402161424-2e8d93401602 // indirect
75+
golang.org/x/sys v0.0.0-20211216021012-1d35b9e2eb4e // indirect
76+
golang.org/x/text v0.3.7 // indirect
77+
golang.org/x/time v0.0.0-20211116232009-f0f3c7e86c11 // indirect
78+
golang.org/x/tools v0.1.2 // indirect
79+
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 // indirect
3180
gomodules.xyz/jsonpatch/v2 v2.2.0 // indirect
81+
google.golang.org/appengine v1.6.7 // indirect
82+
google.golang.org/protobuf v1.26.0 // indirect
83+
gopkg.in/inf.v0 v0.9.1 // indirect
84+
gopkg.in/ini.v1 v1.62.0 // indirect
85+
gopkg.in/yaml.v2 v2.4.0 // indirect
86+
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
87+
k8s.io/code-generator v0.19.17-rc.0 // indirect
88+
k8s.io/gengo v0.0.0-20200428234225-8167cfdcfc14 // indirect
3289
k8s.io/klog/v2 v2.8.0 // indirect
3390
k8s.io/kube-openapi v0.0.0-20210305001622-591a79e4bda7 // indirect
3491
k8s.io/utils v0.0.0-20210802155522-efc7438f0176 // indirect
92+
sigs.k8s.io/kustomize v2.0.3+incompatible // indirect
93+
sigs.k8s.io/structured-merge-diff/v4 v4.1.2 // indirect
94+
sigs.k8s.io/yaml v1.2.0 // indirect
3595
)
3696

3797
replace github.com/appscode/jsonpatch => github.com/gomodules/jsonpatch v2.0.1+incompatible

0 commit comments

Comments
 (0)