Skip to content

Commit

Permalink
Merge pull request #104 from driosalido/allow_selfSignedSecrets_from_…
Browse files Browse the repository at this point in the history
…existing_secrets

Add mounting Self Signed Certificates from existing secret
  • Loading branch information
stavbernazport authored May 19, 2024
2 parents 883a476 + feef299 commit 8c1140a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 14 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.1.20
version: 0.1.21
appVersion: "0.1.0"
home: https://getport.io/
sources:
Expand Down
4 changes: 2 additions & 2 deletions charts/port-ocean/templates/certificate_secret.yaml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{{- if .Values.selfSignedCertificate.enabled }}
{{- if and .Values.selfSignedCertificate.enabled (not .Values.selfSignedCertificate.secret.useExistingSecret) }}
apiVersion: v1
kind: Secret
metadata:
name: {{ include "port-ocean.selfSignedCertName" . }}
type: Opaque
data:
crt: {{ .Values.selfSignedCertificate.certificate | b64enc }}
{{- end }}
{{- end }}
12 changes: 10 additions & 2 deletions charts/port-ocean/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,16 @@ spec:
readOnly: true
{{- end }}
volumes:
{{- if .Values.selfSignedCertificate.enabled }}
{{- if and .Values.selfSignedCertificate.enabled .Values.selfSignedCertificate.secret.useExistingSecret }}
- name: certificates
projected:
sources:
- secret:
name: {{ .Values.selfSignedCertificate.secret.name }}
items:
- key: {{ .Values.selfSignedCertificate.secret.key }}
path: cert.crt
{{- else if .Values.selfSignedCertificate.enabled }}
- name: certificates
projected:
sources:
Expand All @@ -86,4 +95,3 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}

21 changes: 12 additions & 9 deletions charts/port-ocean/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ extraEnv:

podSecurityContext: {}
# Example
# runAsGroup: 1001
# runAsUser: 1001
# fsGroup: 1001
# fsGroupChangePolicy: "OnRootMismatch"
# runAsGroup: 1001
# runAsUser: 1001
# fsGroup: 1001
# fsGroupChangePolicy: "OnRootMismatch"
containerSecurityContext: {}
# Example
# runAsGroup: 1001
# runAsUser: 1001
# allowPrivilegeEscalation: false
# runAsGroup: 1001
# runAsUser: 1001
# allowPrivilegeEscalation: false

rolloutStrategy: "Recreate"

Expand All @@ -35,7 +35,6 @@ resources:
memory: "1024Mi"
cpu: "500m"


nodeSelector: {}

tolerations: []
Expand Down Expand Up @@ -91,4 +90,8 @@ integration:

selfSignedCertificate:
enabled: false
certificate: ""
certificate: ""
secret:
name: ""
key: crt
useExistingSecret: false

0 comments on commit 8c1140a

Please sign in to comment.