From 3a111d7922a7f9bc0b4fb9db33b1e71f9299f87a Mon Sep 17 00:00:00 2001 From: Dilip <116056239+dt-dilip@users.noreply.github.com> Date: Thu, 10 Oct 2024 17:17:53 +0530 Subject: [PATCH] Added env to api container --- charts/cdefense/templates/api/deployment.yaml | 124 +----------------- charts/cdefense/values.yaml | 2 +- 2 files changed, 6 insertions(+), 120 deletions(-) diff --git a/charts/cdefense/templates/api/deployment.yaml b/charts/cdefense/templates/api/deployment.yaml index 272100e..8ff97eb 100644 --- a/charts/cdefense/templates/api/deployment.yaml +++ b/charts/cdefense/templates/api/deployment.yaml @@ -37,55 +37,6 @@ spec: resources: {} terminationMessagePath: /dev/termination-log terminationMessagePolicy: File - # - name: check-graphql - # image: radial/busyboxplus:curl - # imagePullPolicy: IfNotPresent - # command: - # - sh - # - -c - # - until $(curl --connect-timeout 2 --output /dev/null --silent --fail http://graphql/v1/version); do - # echo waiting for graphql; sleep 10; done; echo connection to graphql ok - # terminationMessagePath: /dev/termination-log - # terminationMessagePolicy: File - # - name: check-seed-pod - # image: cdefense/scandb-seed:latest - # # imagePullPolicy: IfNotPresent - # command: - # - sh - # - -c - # - ./seed_db.sh # 'until pg_isready; do echo waiting for database; sleep 5; done;/seed_db.sh;' - # env: - # - name: PGHOST - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: DB_ADDR - # - name: PGPORT - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: DB_PORT - # - name: PGUSER - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: DB_USER - # - name: PGDATABASE - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: DB_NAME - # - name: PGPASSWORD - # valueFrom: - # secretKeyRef: - # name: cdefense-secrets - # key: DB_PASSWORD - # resources: {} - # volumeMounts: - # - mountPath: /bootstrap - # name: bootstrap - # terminationMessagePath: /dev/termination-log - # terminationMessagePolicy: File containers: - name: api image: {{ .Values.api.image }}:{{ .Values.version }} @@ -382,6 +333,11 @@ spec: secretKeyRef: name: scan-server-secrets key: NVD_KEY + - name: MICRONAUT_ENVIRONMENTS + valueFrom: + configMapKeyRef: + name: authservice-config + key: MICRONAUT_ENVIRONMENTS ports: - containerPort: 8080 livenessProbe: @@ -404,73 +360,3 @@ spec: # cpu: "500m" # limits: # memory: "1G" - # - name: data - # image: {{ .Values.data.image }}:{{ .Values.version }} - # imagePullPolicy: Always - # env: - # - name: CLOUDDEFENSE_BASE_URL - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: CLOUDDEFENSE_BASE_URL - # - name: DB_CONNECTION_STRING - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: DB_CONNECTION_STRING - # - name: DB_USER - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: DB_USER - # - name: CLOUDDEFENSE_HEROKUAPP_GRAPHQL_URL - # valueFrom: - # configMapKeyRef: - # name: cdefense-config - # key: CLOUDDEFENSE_GRAPHQL_URL - # - name: VFEED_SYNC_JOB_CRON_EXPRESSION - # valueFrom: - # configMapKeyRef: - # name: scan-server-config - # key: DATA_VFEED_SQLITE_FULL_REFRESH_CRON_EXPRESSION - # - name: DB_PASSWORD - # valueFrom: - # secretKeyRef: - # name: cdefense-secrets - # key: DB_PASSWORD - # - name: HASURA_GRAPHQL_ADMIN_SECRET - # valueFrom: - # secretKeyRef: - # name: graphql-secrets - # key: HASURA_GRAPHQL_ADMIN_SECRET - # - name: PORT - # value: "8081" - # - name: VULNERABILITY_SCRAPER_SERVICE_HOST - # valueFrom: - # configMapKeyRef: - # name: scan-server-config - # key: VULNERABILITY_SCRAPER_SERVICE_HOST - # - name: VULNERABILITY_SCRAPER_SERVICE_TOKEN - # valueFrom: - # secretKeyRef: - # name: vulnscrape-secrets - # key: VULNERABILITY_SCRAPER_SERVICE_TOKEN - # - name: DATAJOB_WEBHOOK_URL - # valueFrom: - # configMapKeyRef: - # name: scan-server-config - # key: DATAJOB_WEBHOOK_URL - # - name: NVD_KEY - # valueFrom: - # secretKeyRef: - # name: scan-server-secrets - # key: NVD_KEY - # # resources: - # # requests: - # # memory: "1G" - # # cpu: "250m" - # # limits: - # # memory: "1G" - # volumes: - # - name: bootstrap - # emptyDir: {} diff --git a/charts/cdefense/values.yaml b/charts/cdefense/values.yaml index 8be05a0..e402196 100644 --- a/charts/cdefense/values.yaml +++ b/charts/cdefense/values.yaml @@ -80,7 +80,7 @@ authservice: tolerations: [] replicas: 1 image: cdefense/auth-service - environment: dev + environment: prod realm: cdefense service: type: NodePort