From f4241991cf386d3201ce143e41a780fc624a6b80 Mon Sep 17 00:00:00 2001 From: Valentin Knabel Date: Tue, 21 Jan 2025 10:03:26 +0100 Subject: [PATCH] fix: review comments --- .github/workflows/docker.yaml | 2 +- Makefile | 6 +-- capi-lab/Makefile | 2 +- config/manager/kustomization.yaml | 4 +- config/manager/manager.yaml | 86 +++++++++++++++---------------- 5 files changed, 50 insertions(+), 50 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index 411c779..3986ddf 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -41,4 +41,4 @@ jobs: with: context: . push: true - tags: ${{ env.REGISTRY }}/metal-stack/capms-controller:${{ env.tag }} + tags: ${{ env.REGISTRY }}/metal-stack/cluster-api-metal-stack-controller:${{ env.tag }} diff --git a/Makefile b/Makefile index 3f61aca..ec603d3 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # Image URL to use all building/pushing image targets -IMG_NAME ?= ghcr.io/metal-stack/capms-controller +IMG_NAME ?= ghcr.io/metal-stack/cluster-api-metal-stack-controller IMG_TAG ?= latest IMG ?= ${IMG_NAME}:${IMG_TAG} # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. @@ -52,8 +52,8 @@ release-manifests: $(KUSTOMIZE) build-installer ## Builds the manifests to publi $(KUSTOMIZE) build config/default > $(RELEASE_DIR)/infrastructure-components.yaml sed -i 's!image: $(IMG_NAME):latest!image: $(IMG_NAME):$(IMG_TAG)!' $(RELEASE_DIR)/infrastructure-components.yaml cp metadata.yaml $(RELEASE_DIR)/metadata.yaml - # cp examples/clusterctl-templates/clusterctl-cluster.yaml $(RELEASE_DIR)/cluster-template.yaml - # cp examples/clusterctl-templates/example_variables.rc $(RELEASE_DIR)/example_variables.rc + cp config/clusterctl-templates/cluster-template.yaml $(RELEASE_DIR)/cluster-template.yaml + cp config/clusterctl-templates/example_variables.rc $(RELEASE_DIR)/example_variables.rc ##@ Development diff --git a/capi-lab/Makefile b/capi-lab/Makefile index 4fa83b2..efe9e8b 100644 --- a/capi-lab/Makefile +++ b/capi-lab/Makefile @@ -1,7 +1,7 @@ .DEFAULT_GOAL := up KUBECONFIG := $(shell pwd)/mini-lab/.kubeconfig -IMG ?= ghcr.io/metal-stack/capms-controller:latest +IMG ?= ghcr.io/metal-stack/cluster-api-metal-stack-controller:latest .PHONY: up up: bake deploy-capi diff --git a/config/manager/kustomization.yaml b/config/manager/kustomization.yaml index 4d90dc9..73abd22 100644 --- a/config/manager/kustomization.yaml +++ b/config/manager/kustomization.yaml @@ -4,5 +4,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization images: - name: controller - newName: ghcr.io/metal-stack/capms-controller - newTag: xxxxxxx + newName: ghcr.io/metal-stack/cluster-api-metal-stack-controller + newTag: latest diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 7740061..77e8035 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -33,48 +33,48 @@ spec: seccompProfile: type: RuntimeDefault containers: - - env: - - name: METAL_API_URL - valueFrom: - secretKeyRef: - name: controller-manager-config - key: api-url - - name: METAL_API_HMAC - valueFrom: - secretKeyRef: - name: controller-manager-config - key: api-hmac - command: - - /manager - args: - - --leader-elect - - --health-probe-bind-address=:8081 - image: controller:latest - imagePullPolicy: IfNotPresent - name: manager - securityContext: - allowPrivilegeEscalation: false - capabilities: - drop: - - "ALL" - livenessProbe: - httpGet: - path: /healthz - port: 8081 - initialDelaySeconds: 15 - periodSeconds: 20 - readinessProbe: - httpGet: - path: /readyz - port: 8081 - initialDelaySeconds: 5 - periodSeconds: 10 - resources: - limits: - cpu: 500m - memory: 128Mi - requests: - cpu: 10m - memory: 64Mi + - env: + - name: METAL_API_URL + valueFrom: + secretKeyRef: + name: controller-manager-config + key: api-url + - name: METAL_API_HMAC + valueFrom: + secretKeyRef: + name: controller-manager-config + key: api-hmac + command: + - /manager + args: + - --leader-elect + - --health-probe-bind-address=:8081 + image: controller:latest + imagePullPolicy: IfNotPresent + name: manager + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - "ALL" + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi serviceAccountName: controller-manager terminationGracePeriodSeconds: 10