diff --git a/.github/workflows/release_docker_k8_operator.yaml b/.github/workflows/release_docker_k8_operator.yaml index 01aa3b625..cbed4ff85 100644 --- a/.github/workflows/release_docker_k8_operator.yaml +++ b/.github/workflows/release_docker_k8_operator.yaml @@ -30,6 +30,9 @@ jobs: - uses: actions/setup-go@v2 + - name: Generate YAML for Kubectl + run: make dist charts + - name: Upload CRD manifest uses: svenstaro/upload-release-action@v2 with: diff --git a/k8-operator/Makefile b/k8-operator/Makefile index 541e26b60..268a8d72f 100644 --- a/k8-operator/Makefile +++ b/k8-operator/Makefile @@ -1,6 +1,6 @@ # Image URL to use all building/pushing image targets -IMG ?= controller:latest +IMG ?= infisical/kubernetes-operator:latest # ENVTEST_K8S_VERSION refers to the version of kubebuilder assets to be downloaded by envtest binary. ENVTEST_K8S_VERSION = 1.25.0 @@ -41,6 +41,12 @@ help: ## Display this help. helm-chart: $(KUSTOMIZE) build config/default | helmify ../helm-charts/secrets-operator +## Yaml for Kubectl +dist: manifests kustomize + mkdir -p dist + cd config/manager && $(KUSTOMIZE) edit set image controller=${IMG} + $(KUSTOMIZE) build config/default > dist/install-secrets-operator.yaml + ##@ Development .PHONY: manifests diff --git a/k8-operator/config/manager/kustomization.yaml b/k8-operator/config/manager/kustomization.yaml index 5c5f0b84c..96ea36924 100644 --- a/k8-operator/config/manager/kustomization.yaml +++ b/k8-operator/config/manager/kustomization.yaml @@ -1,2 +1,8 @@ resources: - manager.yaml +apiVersion: kustomize.config.k8s.io/v1beta1 +kind: Kustomization +images: +- name: controller + newName: infisical/kubernetes-operator + newTag: latest