Skip to content

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

Add new workflow to push k8 operator to prod

Maidul Islamc8633bf546c7
diff --git a/.github/workflows/release_docker_k8_operator.yaml b/.github/workflows/release_docker_k8_operator.yaml
new file mode 100644
index 0000000000..01aa3b6250
--- /dev/null
+++ b/.github/workflows/release_docker_k8_operator.yaml
@@ -0,0 +1,38 @@
+name: Release Docker image for K8 operator
+on: [workflow_dispatch]
+
+jobs:
+ release:
+ runs-on: ubuntu-latest
+ steps:
+ - uses: actions/checkout@v2
+
+ - name: πŸ”§ Set up QEMU
+ uses: docker/setup-qemu-action@v1
+
+ - name: πŸ”§ Set up Docker Buildx
+ uses: docker/setup-buildx-action@v1
+
+ - name: πŸ‹ Login to Docker Hub
+ uses: docker/login-action@v1
+ with:
+ username: ${{ secrets.DOCKERHUB_USERNAME }}
+ password: ${{ secrets.DOCKERHUB_TOKEN }}
+
+ - name: Build and push
+ id: docker_build
+ uses: docker/build-push-action@v2
+ with:
+ context: k8-operator
+ push: true
+ platforms: linux/amd64,linux/arm64
+ tags: infisical/kubernetes-operator:latest
+
+ - uses: actions/setup-go@v2
+
+ - name: Upload CRD manifest
+ uses: svenstaro/upload-release-action@v2
+ with:
+ repo_token: ${{ secrets.GITHUB_TOKEN }}
+ file: dist/install-secrets-operator.yaml
+ tag: ${{ github.ref }}
\ No newline at end of file
diff --git a/k8-operator/Dockerfile b/k8-operator/Dockerfile
index 8f9cca18eb..6a5d701896 100644
--- a/k8-operator/Dockerfile
+++ b/k8-operator/Dockerfile
@@ -15,6 +15,7 @@ RUN go mod download
COPY main.go main.go
COPY api/ api/
COPY controllers/ controllers/
+COPY packages/ packages/
# Build
# the GOARCH has not a default value to allow the binary be built according to the host where the command
diff --git a/k8-operator/go.mod b/k8-operator/go.mod
index 44847bf725..023cc9da73 100644
--- a/k8-operator/go.mod
+++ b/k8-operator/go.mod
@@ -70,7 +70,7 @@ require (
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/yaml.v2 v2.4.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
- k8s.io/api v0.25.0 // indirect
+ k8s.io/api v0.25.0
k8s.io/apiextensions-apiserver v0.25.0 // indirect
k8s.io/component-base v0.25.0 // indirect
k8s.io/klog/v2 v2.70.1 // indirect