Skip to content

Commit

Permalink
Merge pull request #120 from port-labs/hotfix/fix-secret-handling
Browse files Browse the repository at this point in the history
Fixed secret referencing
  • Loading branch information
matan84 authored Jun 19, 2024
2 parents e1bf6c5 + 2794cb8 commit 26e0afb
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 8 deletions.
2 changes: 1 addition & 1 deletion charts/port-ocean/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: port-ocean
description: A Helm chart for Port Ocean integrations
type: application
version: 0.3.2
version: 0.3.3
appVersion: "0.1.0"
home: https://getport.io/
sources:
Expand Down
5 changes: 4 additions & 1 deletion charts/port-ocean/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,10 @@ Get self signed cert secret name
{{- end }}

{{- define "port-ocean.additionalSecrets" }}
{{- $secretsArray := list (include "port-ocean.secretName" .) }}
{{- $secretsArray := list }}
{{- if .Values.secret.create }}
{{- $secretsArray = list (include "port-ocean.secretName" .) }}
{{- end }}
{{- /* If the secretName is already an array we don't wrap it in an array */}}
{{- if kindIs "slice" .Values.secret.name }}
{{- $secretsArray = .Values.secret.name }}
Expand Down
2 changes: 0 additions & 2 deletions charts/port-ocean/templates/cron-job/cron.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,9 +130,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "port-ocean.configMapName" . }}
{{- if .Values.secret.useExistingSecret }}
{{- include "port-ocean.additionalSecrets" . | nindent 14 }}
{{- end }}
volumeMounts:
{{- if .Values.extraVolumeMounts }}
{{- tpl (toYaml .Values.extraVolumeMounts) . | nindent 14 }}
Expand Down
4 changes: 1 addition & 3 deletions charts/port-ocean/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ spec:
envFrom:
- configMapRef:
name: {{ include "port-ocean.configMapName" . }}
{{- if "port-ocean.additionalSecrets" }}
{{- include "port-ocean.additionalSecrets" . | nindent 10 }}
{{- end }}
{{- include "port-ocean.additionalSecrets" . | nindent 10 }}
volumeMounts:
{{- if .Values.extraVolumeMounts }}
{{- tpl (toYaml .Values.extraVolumeMounts) . | nindent 8 }}
Expand Down
1 change: 0 additions & 1 deletion charts/port-ocean/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,6 @@ sendRawDataExamples: true

secret:
create: true
useExistingSecret: false
name: ""
# name:
# - "x"
Expand Down

0 comments on commit 26e0afb

Please sign in to comment.