From a80d5f10e5d5833845881dadb312e92936b7c673 Mon Sep 17 00:00:00 2001 From: Daniel Hougaard Date: Fri, 2 May 2025 16:38:02 +0400 Subject: [PATCH] fix(gateway-helm): requested changes --- .github/workflows/release_docker_gateway.yaml | 43 ------------------- .../templates/deployment.yaml | 10 ++++- .../infisical-gateway/templates/secret.yaml | 13 ------ helm-charts/infisical-gateway/values.yaml | 15 ++----- 4 files changed, 13 insertions(+), 68 deletions(-) delete mode 100644 .github/workflows/release_docker_gateway.yaml delete mode 100644 helm-charts/infisical-gateway/templates/secret.yaml diff --git a/.github/workflows/release_docker_gateway.yaml b/.github/workflows/release_docker_gateway.yaml deleted file mode 100644 index da1e105e3..000000000 --- a/.github/workflows/release_docker_gateway.yaml +++ /dev/null @@ -1,43 +0,0 @@ -name: Release Gateway Docker Image -on: - push: - tags: - - "infisical-gateway/v*.*.*" - -permissions: - contents: write - -jobs: - release-image: - name: Release Gateway Docker Image - runs-on: ubuntu-latest - steps: - - name: Extract version from tag - id: extract_version - run: echo "::set-output name=version::${GITHUB_REF_NAME#infisical-gateway/}" - - - name: Checkout code - uses: actions/checkout@v4 - - - 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: . - push: true - platforms: linux/amd64,linux/arm64 - tags: | - infisical/gateway:latest - infisical/gateway:${{ steps.extract_version.outputs.version }} diff --git a/helm-charts/infisical-gateway/templates/deployment.yaml b/helm-charts/infisical-gateway/templates/deployment.yaml index 636e88d35..2671c0665 100644 --- a/helm-charts/infisical-gateway/templates/deployment.yaml +++ b/helm-charts/infisical-gateway/templates/deployment.yaml @@ -35,8 +35,16 @@ spec: securityContext: {{- toYaml . | nindent 12 }} {{- end }} - image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + image: "infisical/cli:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} + command: ["/sbin/tini", "--", "/bin/sh", "-c"] + args: + - >- + if [ -z "${TOKEN}" ]; then + echo 'ERROR: TOKEN environment variable must be set'; + exit 1; + fi && + /bin/infisical gateway --token ${TOKEN} envFrom: - secretRef: name: {{ .Values.secret.name }} diff --git a/helm-charts/infisical-gateway/templates/secret.yaml b/helm-charts/infisical-gateway/templates/secret.yaml deleted file mode 100644 index f186b8ec4..000000000 --- a/helm-charts/infisical-gateway/templates/secret.yaml +++ /dev/null @@ -1,13 +0,0 @@ -{{- if .Values.secret.create -}} -apiVersion: v1 -kind: Secret -metadata: - name: {{ .Values.secret.name }} - labels: - {{- include "infisical-gateway.labels" . | nindent 4 }} -type: Opaque -data: - {{- range $key, $value := .Values.secret.data }} - {{ $key }}: {{ $value | b64enc }} - {{- end }} -{{- end }} \ No newline at end of file diff --git a/helm-charts/infisical-gateway/values.yaml b/helm-charts/infisical-gateway/values.yaml index bb63a82a8..b1d55c0fc 100644 --- a/helm-charts/infisical-gateway/values.yaml +++ b/helm-charts/infisical-gateway/values.yaml @@ -1,18 +1,10 @@ image: - repository: infisical/infisical-gateway pullPolicy: IfNotPresent - tag: "v0.0.1" + tag: "0.41.1" secret: - # create a new secret (if true) or use existing (if false) - create: true - # name of the secret to use/create - name: "infisical-gateway-secrets" - - # Secret data (only used if create: true) - data: - TOKEN: "" - INFISICAL_API_URL: "https://app.infisical.com" + # The secret that contains the environment variables to be used by the gateway, such as INFISICAL_API_URL and TOKEN + name: "infisical-gateway-environment" resources: limits: @@ -39,6 +31,7 @@ podSecurityContext: securityContext: runAsNonRoot: true + runAsUser: 1000 affinity: {} tolerations: {}