Skip to content

Commit 8c1140a

Browse files
Merge pull request #104 from driosalido/allow_selfSignedSecrets_from_existing_secrets
Add mounting Self Signed Certificates from existing secret
2 parents 883a476 + feef299 commit 8c1140a

File tree

4 files changed

+25
-14
lines changed

4 files changed

+25
-14
lines changed

charts/port-ocean/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: port-ocean
33
description: A Helm chart for Port Ocean integrations
44
type: application
5-
version: 0.1.20
5+
version: 0.1.21
66
appVersion: "0.1.0"
77
home: https://getport.io/
88
sources:
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
{{- if .Values.selfSignedCertificate.enabled }}
1+
{{- if and .Values.selfSignedCertificate.enabled (not .Values.selfSignedCertificate.secret.useExistingSecret) }}
22
apiVersion: v1
33
kind: Secret
44
metadata:
55
name: {{ include "port-ocean.selfSignedCertName" . }}
66
type: Opaque
77
data:
88
crt: {{ .Values.selfSignedCertificate.certificate | b64enc }}
9-
{{- end }}
9+
{{- end }}

charts/port-ocean/templates/deployment.yaml

+10-2
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,16 @@ spec:
6464
readOnly: true
6565
{{- end }}
6666
volumes:
67-
{{- if .Values.selfSignedCertificate.enabled }}
67+
{{- if and .Values.selfSignedCertificate.enabled .Values.selfSignedCertificate.secret.useExistingSecret }}
68+
- name: certificates
69+
projected:
70+
sources:
71+
- secret:
72+
name: {{ .Values.selfSignedCertificate.secret.name }}
73+
items:
74+
- key: {{ .Values.selfSignedCertificate.secret.key }}
75+
path: cert.crt
76+
{{- else if .Values.selfSignedCertificate.enabled }}
6877
- name: certificates
6978
projected:
7079
sources:
@@ -86,4 +95,3 @@ spec:
8695
tolerations:
8796
{{- toYaml . | nindent 8 }}
8897
{{- end }}
89-

charts/port-ocean/values.yaml

+12-9
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,15 @@ extraEnv:
1515

1616
podSecurityContext: {}
1717
# Example
18-
# runAsGroup: 1001
19-
# runAsUser: 1001
20-
# fsGroup: 1001
21-
# fsGroupChangePolicy: "OnRootMismatch"
18+
# runAsGroup: 1001
19+
# runAsUser: 1001
20+
# fsGroup: 1001
21+
# fsGroupChangePolicy: "OnRootMismatch"
2222
containerSecurityContext: {}
2323
# Example
24-
# runAsGroup: 1001
25-
# runAsUser: 1001
26-
# allowPrivilegeEscalation: false
24+
# runAsGroup: 1001
25+
# runAsUser: 1001
26+
# allowPrivilegeEscalation: false
2727

2828
rolloutStrategy: "Recreate"
2929

@@ -35,7 +35,6 @@ resources:
3535
memory: "1024Mi"
3636
cpu: "500m"
3737

38-
3938
nodeSelector: {}
4039

4140
tolerations: []
@@ -91,4 +90,8 @@ integration:
9190

9291
selfSignedCertificate:
9392
enabled: false
94-
certificate: ""
93+
certificate: ""
94+
secret:
95+
name: ""
96+
key: crt
97+
useExistingSecret: false

0 commit comments

Comments
 (0)