diff --git a/.github/workflows/ci-only.yaml b/.github/workflows/ci-only.yaml index 47435e9..237d917 100644 --- a/.github/workflows/ci-only.yaml +++ b/.github/workflows/ci-only.yaml @@ -43,7 +43,6 @@ jobs: run: | export TAG=${{ github.sha }} sed -ie "s/0.2.1/$TAG/g" ./manifest.yaml - sed -ie "s/ghcr.io//g" ./manifest.yaml kubectl apply -f ./manifest.yaml - name: Check deployment run: diff --git a/Dockerfile b/Dockerfile index 9380fb4..75476f2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,3 @@ -# Build the manager binary FROM --platform=${BUILDPLATFORM:-linux/amd64} golang:1.13 as builder ARG TARGETPLATFORM @@ -22,7 +21,6 @@ COPY controllers/ controllers/ RUN CGO_ENABLED=0 GOOS=${TARGETOS} GOARCH=${TARGETARCH} \ GO111MODULE=on go build -ldflags="-w -s" -a -o /usr/bin/controller -# Use distroless as minimal base image to package the manager binary # Refer to https://github.com/GoogleContainerTools/distroless for more details FROM --platform=${BUILDPLATFORM:-linux/amd64} gcr.io/distroless/static:nonroot WORKDIR / diff --git a/Makefile b/Makefile index 0beec20..84454ce 100644 --- a/Makefile +++ b/Makefile @@ -37,11 +37,12 @@ uninstall: manifests # Deploy controller in the configured Kubernetes cluster in ~/.kube/config deploy: manifests - cd config/controller && kustomize edit set image controller=alexellis2/registry-creds-controller:$(TAG) + cd config/controller && kustomize edit set image controller=ghcr.io/alexellis/registry-creds-controller:$(TAG) kustomize build config/default | kubectl apply -f - +.PHONY: shrinkwrap shrinkwrap: - cd config/controller && kustomize edit set image controller=alexellis2/registry-creds-controller:$(TAG) + cd config/controller && kustomize edit set image controller=ghcr.io/alexellis/registry-creds-controller:$(TAG) kustomize build config/default > manifest.yaml # Generate manifests e.g. CRD, RBAC etc. diff --git a/config/controller/manager.yaml b/config/controller/controller.yaml similarity index 86% rename from config/controller/manager.yaml rename to config/controller/controller.yaml index 0dc30f1..8f7a39c 100644 --- a/config/controller/manager.yaml +++ b/config/controller/controller.yaml @@ -24,11 +24,11 @@ spec: spec: containers: - command: - - /manager + - /controller args: - --enable-leader-election - image: alexellis2/registry-creds-controller:0.1.1 - name: manager + image: ghcr.io/alexellis/registry-creds-controller:0.1.1 + name: controller resources: limits: cpu: 100m diff --git a/config/controller/kustomization.yaml b/config/controller/kustomization.yaml index 8000d6c..3a36b91 100644 --- a/config/controller/kustomization.yaml +++ b/config/controller/kustomization.yaml @@ -1,8 +1,8 @@ resources: -- manager.yaml +- controller.yaml apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: alexellis2/registry-creds-controller - newTag: 0.2.0 + newName: ghcr.io/alexellis/registry-creds-controller + newTag: 0.2.1 diff --git a/config/crd/bases/ops.alexellis.io_clusterpullsecrets.yaml b/config/crd/bases/ops.alexellis.io_clusterpullsecrets.yaml index 69c5a43..23864d2 100644 --- a/config/crd/bases/ops.alexellis.io_clusterpullsecrets.yaml +++ b/config/crd/bases/ops.alexellis.io_clusterpullsecrets.yaml @@ -4,7 +4,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (unknown) + controller-gen.kubebuilder.io/version: v0.2.5 creationTimestamp: null name: clusterpullsecrets.ops.alexellis.io spec: @@ -58,5 +58,5 @@ status: acceptedNames: kind: "" plural: "" - conditions: null - storedVersions: null + conditions: [] + storedVersions: [] diff --git a/manifest.yaml b/manifest.yaml index 436f58b..70643a7 100644 --- a/manifest.yaml +++ b/manifest.yaml @@ -9,7 +9,7 @@ apiVersion: apiextensions.k8s.io/v1beta1 kind: CustomResourceDefinition metadata: annotations: - controller-gen.kubebuilder.io/version: (unknown) + controller-gen.kubebuilder.io/version: v0.2.5 creationTimestamp: null name: clusterpullsecrets.ops.alexellis.io spec: @@ -229,9 +229,8 @@ spec: - --enable-leader-election command: - /controller - image: ghcr.io/alexellis/registry-creds:0.2.1 + image: ghcr.io/alexellis/registry-creds-controller:0.2.1 name: controller - imagePullPolicy: IfNotPresent resources: limits: cpu: 100m