File tree 8 files changed +33
-17
lines changed
8 files changed +33
-17
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,8 @@ helmfile template $templateArgs --output-dir-template="../$targetDirA/{{.Release
23
23
git checkout $branchB
24
24
25
25
# order of arguments matters so new chanages are green color
26
- bin/dyff.sh $targetDirA $targetDirB
26
+ echo " Comparing $targetDirB with $targetDirA "
27
+ bin/dyff.sh $targetDirB $targetDirA
27
28
28
29
echo " #########################################################"
29
30
echo " #"
Original file line number Diff line number Diff line change @@ -125,15 +125,11 @@ spec:
125
125
- { { $domain } }
126
126
{ {- if hasKey $secrets $domain } }
127
127
{ {- if ne (index $secrets $domain ) " " } }
128
- { {/*If a team provides its own certificate in the team namespace then Otomi cornjob makes a copy of it*/} }
128
+ { {/*If a team provides its own certificate in the team namespace then Otomi cronjob makes a copy of it*/} }
129
129
secretName: copy-team-{ { $v .teamId } }-{ { index $secrets $domain } }
130
130
{ {- end } }
131
131
{ {- else } }
132
- { {- if eq $cm .issuer " byo-wildcard-cert" } }
133
- secretName: otomi-byo-wildcard-cert
134
- { {- else } }
135
- secretName: otomi-cert-manager-wildcard-cert
136
- { {- end} }
132
+ secretName: { { $v ._derived.tlsSecretName } }
137
133
{ {- end } }
138
134
{ {- end } }
139
135
{ {- end } }
Original file line number Diff line number Diff line change 5
5
{{- $cm := index $v.apps "cert-manager" }}
6
6
{{- $ingress := $v.ingress.platformClass }}
7
7
{{- $name := printf "nginx-team-%s-platform-public-open-forward-harbor" $v.teamId }}
8
- {{- $secretName := ternary "otomi-byo-wildcard-cert" "otomi-cert-manager-wildcard-cert" (eq $cm.issuer "byo-wildcard-cert") }}
9
8
---
10
9
apiVersion : networking.k8s.io/v1
11
10
kind : Ingress
68
67
tls :
69
68
- hosts :
70
69
- {{ $domain }}
71
- secretName : {{ $secretName }}
70
+ secretName : {{ $v._derived.tlsSecretName }}
72
71
{{- end }}
73
72
{{- end }}
Original file line number Diff line number Diff line change @@ -231,6 +231,8 @@ releases:
231
231
domain : {{ $domain }}
232
232
ingress : {{- $v.ingress | toYaml | nindent 10 }}
233
233
dns : {{- $v.dns | toYaml | nindent 10 }}
234
+ _derived :
235
+ tlsSecretName : {{ $v._derived.tlsSecretName }}
234
236
- {{- omit $team "apps" | toYaml | nindent 8 }}
235
237
teamId : {{ $teamId }}
236
238
teamIds : {{- toYaml (keys $v.teamConfig) | nindent 10 }}
Original file line number Diff line number Diff line change 29
29
{{- $oidcWellKnownUrl := printf "%s/.well-known/openid-configuration" $oidcBaseUrl }}
30
30
{{- $oidcBaseUrlBackchannel := "http://keycloak-http.keycloak/realms/otomi" }}
31
31
{{- $oidcWellKnownBackchannel := printf "%s/.well-known/openid-configuration" $oidcBaseUrlBackchannel }}
32
+ {{- $tlsSecretName := "otomi-cert-manager-wildcard-cert" }}
33
+ {{- if eq $cm.issuer "externally-managed-tls-secret" }}
34
+ {{- $tlsSecretName = $cm.externallyManagedTlsSecretName }}
35
+ {{- else if eq $cm.issuer "byo-wildcard-cert" }}
36
+ {{- $tlsSecretName = "byo-wildcard-cert" }}
37
+ {{- end -}}
32
38
33
39
{{- if and (not (env "CI")) (not (env "VALUES_INPUT")) (hasKey $v.cluster "k8sContext") }}
34
40
helmDefaults:
@@ -150,6 +156,7 @@ environments:
150
156
oidcWellKnownUrlBackchannel: {{ $oidcWellKnownBackchannel}}
151
157
giteaDomain: {{ printf "gitea.%s" $domainSuffix }}
152
158
keycloakDomain: {{ printf "keycloak.%s" $domainSuffix }}
159
+ tlsSecretName: {{ $tlsSecretName }}
153
160
apps:
154
161
argocd:
155
162
enabled: true
Original file line number Diff line number Diff line change 1
1
apps :
2
2
cert-manager :
3
- issuer : letsencrypt
4
-
5
- stage : staging
3
+ # issuer: letsencrypt
4
+
5
+ # stage: staging
6
+ # issuer: custom-ca
7
+ issuer : externally-managed-tls-secret
8
+ externallyManagedTlsSecretName : mysecret
9
+ # issuer: byo-wildcard-cert
10
+ # byoWildcardCert: byoCert
11
+ # byoWildcardCertKey: byoCertKey
Original file line number Diff line number Diff line change @@ -1529,6 +1529,11 @@ properties:
1529
1529
description : ' A certificate key corresponding to the byoWildcardCert.'
1530
1530
type : string
1531
1531
x-secret : ' '
1532
+ externallyManagedTlsSecretName :
1533
+ description : |
1534
+ The name of a custom secret in the istio-system namespace that contains a trusted certificate and private key.
1535
+ To be used with issuer externally-managed-tls-secret.
1536
+ type : string
1532
1537
customRootCA :
1533
1538
x-secret : ' '
1534
1539
type : string
@@ -1545,11 +1550,15 @@ properties:
1545
1550
The custom-ca - cert-manager uses the customRootCA to generate wildcard certificate.
1546
1551
The letsencrypt - cert-manager requests certificate from letsencrypt endpoint.
1547
1552
The byo-wildcard-cert allows users to bring their own trusted wildcard certificate (cert-manager not involved)
1553
+ through the values byoWildcardCert and byoWildcardCertKey.
1554
+ The externally-managed-tls-secret is similar to byo-wildcard-cert, but assumes the certificate is already stored
1555
+ in a secret (referenced by externallyManagedTlsSecretName) and not provided through the values.
1548
1556
type : string
1549
1557
enum :
1550
1558
- custom-ca
1551
1559
- letsencrypt
1552
1560
- byo-wildcard-cert
1561
+ - externally-managed-tls-secret
1553
1562
default : custom-ca
1554
1563
stage :
1555
1564
type : string
Original file line number Diff line number Diff line change @@ -43,10 +43,6 @@ resources:
43
43
path: /
44
44
pathType: Prefix
45
45
tls:
46
- {{- if eq $cm.issuer "byo-wildcard-cert" }}
47
- - secretName: "otomi-byo-wildcard-cert"
48
- {{- else }}
49
- - secretName: otomi-cert-manager-wildcard-cert
50
- {{- end }}
46
+ - secretName: {{ $v._derived.tlsSecretName }}
51
47
hosts:
52
48
- '{{ $domain }}'
You can’t perform that action at this time.
0 commit comments