From 035487bfccf4be0fc72da99101c67250f81d393e Mon Sep 17 00:00:00 2001 From: Jason Collins Date: Thu, 9 Nov 2023 10:09:19 -0700 Subject: [PATCH] helm updates --- .../templates/discovery-deployment.yaml | 16 ++++++++------- .../templates/traceability-deployment.yaml | 20 +++++++------------ helm/kong-agents/values.yaml | 2 +- 3 files changed, 17 insertions(+), 21 deletions(-) diff --git a/helm/kong-agents/templates/discovery-deployment.yaml b/helm/kong-agents/templates/discovery-deployment.yaml index 5b6092b..2a93359 100644 --- a/helm/kong-agents/templates/discovery-deployment.yaml +++ b/helm/kong-agents/templates/discovery-deployment.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "kong-agents.fullname" . }} + name: {{ include "kong-agents.fullname" . }}-discovery labels: {{- include "kong-agents.labels" . | nindent 4 }} spec: @@ -42,7 +42,7 @@ spec: securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.discovery.image.repository }}:{{ .Values.discovery.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + imagePullPolicy: {{ .Values.discovery.image.pullPolicy }} ports: - name: probe-port containerPort: {{ .Values.statusPort }} @@ -82,15 +82,17 @@ spec: {{- end }} {{- end }} - name: KONG_ADMINENDPOINT - value: {{ .Values.kong.adminEndpoint }} + value: "{{ .Values.kong.adminEndpoint }}" + {{- if eq .Values.kong.token "" }} - name: KONG_TOKEN - value: {{ .Values.kong.token }} + value: "{{ .Values.kong.token }}" + {{- end }} - name: KONG_PROXYENDPOINT - value: {{ .Values.kong.proxyEndpoint }} + value: "{{ .Values.kong.proxyEndpoint }}" - name: KONG_PROXYENDPOINTPROTOCOLS_HTTP - value: {{ .Values.kong.proxyEndpointProtocols.http }} + value: "{{ .Values.kong.proxyEndpointProtocols.http }}" - name: KONG_PROXYENDPOINTPROTOCOLS_HTTPS - value: {{ .Values.kong.proxyEndpointProtocols.https }} + value: "{{ .Values.kong.proxyEndpointProtocols.https }}" - name: KONG_SPECDOWNLOADPATHS value: {{ include "kong-agents.specDownloadPathsString" . }} volumeMounts: diff --git a/helm/kong-agents/templates/traceability-deployment.yaml b/helm/kong-agents/templates/traceability-deployment.yaml index 45447dc..77ebe1e 100644 --- a/helm/kong-agents/templates/traceability-deployment.yaml +++ b/helm/kong-agents/templates/traceability-deployment.yaml @@ -1,11 +1,11 @@ apiVersion: apps/v1 kind: Deployment metadata: - name: {{ include "kong-agents.fullname" . }} + name: {{ include "kong-agents.fullname" . }}-traceability labels: {{- include "kong-agents.labels" . | nindent 4 }} spec: - replicas: {{ .Values.replicaCount }} + replicas: {{ .Values.traceability.replicaCount }} selector: matchLabels: {{- include "kong-agents.selectorLabels" . | nindent 6 }} @@ -42,7 +42,7 @@ spec: securityContext: {{- toYaml .Values.securityContext | nindent 12 }} image: "{{ .Values.traceability.image.repository }}:{{ .Values.traceability.image.tag | default .Chart.AppVersion }}" - imagePullPolicy: {{ .Values.image.pullPolicy }} + imagePullPolicy: {{ .Values.traceability.image.pullPolicy }} ports: - name: probe-port containerPort: {{ .Values.statusPort }} @@ -82,17 +82,11 @@ spec: {{- end }} {{- end }} - name: KONG_ADMINENDPOINT - value: {{ .Values.kong.adminEndpoint }} + value: "{{ .Values.kong.adminEndpoint }}" + {{- if eq .Values.kong.token "" }} - name: KONG_TOKEN - value: {{ .Values.kong.token }} - - name: KONG_PROXYENDPOINT - value: {{ .Values.kong.proxyEndpoint }} - - name: KONG_PROXYENDPOINTPROTOCOLS_HTTP - value: {{ .Values.kong.proxyEndpointProtocols.http }} - - name: KONG_PROXYENDPOINTPROTOCOLS_HTTPS - value: {{ .Values.kong.proxyEndpointProtocols.https }} - - name: KONG_SPECDOWNLOADPATHS - value: {{ include "kong-agents.specDownloadPathsString" . }} + value: "{{ .Values.kong.token }}" + {{- end }} volumeMounts: - name: "kong-agent-keys" mountPath: "/keys" diff --git a/helm/kong-agents/values.yaml b/helm/kong-agents/values.yaml index 6878314..c786454 100644 --- a/helm/kong-agents/values.yaml +++ b/helm/kong-agents/values.yaml @@ -30,7 +30,7 @@ kong: specDownloadPaths: [] # Add any environment variable overrides here -env: +env: {} secrets: credentials: "kong-agent-creds"