Skip to content

Infisical is the open-source platform for securing secrets, certificates, access, and AI Agents.

set image name for k8

Maidul Islamb4c616edd6f5
diff --git a/.github/workflows/release_docker_k8_operator.yaml b/.github/workflows/release_docker_k8_operator.yaml
index 01aa3b6250..cbed4ff856 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 541e26b608..268a8d72fa 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 5c5f0b84cb..96ea36924a 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