Skip to content

Commit 235fe3a

Browse files
Copy ingress cert
Signed-off-by: Arnob kumar saha <arnob@appscode.com>
1 parent 342a7cc commit 235fe3a

7 files changed

Lines changed: 26 additions & 11 deletions

File tree

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{{ if and (index .Values "gateway" "enabled") (index .Values "ingress-nginx" "enabled") }}
2+
3+
{{- $secretName := printf "%s-cert" (include "ace.fullname" .) }}
4+
{{- $existing := lookup "v1" "Secret" .Release.Namespace $secretName }}
5+
{{- if $existing }}
6+
apiVersion: v1
7+
kind: Secret
8+
metadata:
9+
name: {{ include "ace.fullname" . }}-ingress-cert
10+
namespace: {{ .Release.Namespace }}
11+
type: kubernetes.io/tls
12+
data:
13+
tls.crt: {{ index $existing.data "tls.crt" }}
14+
tls.key: {{ index $existing.data "tls.key" }}
15+
{{- end }}
16+
17+
{{- end }}

charts/ace/templates/gateway/gateway.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@ spec:
2525
kind: Secret
2626
name: {{ include "ace.fullname" . }}-gw-cert
2727
namespace: {{ .Release.Namespace }}
28+
- group: ""
29+
kind: Secret
30+
name: {{ include "ace.fullname" . }}-ingress-cert
31+
namespace: {{ .Release.Namespace }}
2832
allowedRoutes:
2933
namespaces:
3034
from: Same

charts/service-gateway-presets/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The following table lists the configurable parameters of the `service-gateway-pr
7474
| gateway.gateway-converter.enabled | | <code>false</code> |
7575
| gateway.config.envoyGateway.gateway.controllerName | | <code>gateway.voyagermesh.com/ace</code> |
7676
| gateway.config.envoyGateway.extensionApis | | <code>{}</code> |
77-
| gateway.deployment.priorityClassName | | <code>system-cluster-critical</code> |
77+
| gateway.deployment.priorityClassName | | <code>""</code> |
7878
| gateway.deployment.annotations | | <code>{}</code> |
7979
| gateway.hpa.enabled | | <code>false</code> |
8080
| gateway.hpa.behavior | | <code>{}</code> |

charts/service-gateway-presets/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ gateway:
7272
controllerName: gateway.voyagermesh.com/ace
7373
extensionApis: {}
7474
deployment:
75-
priorityClassName: system-cluster-critical
75+
priorityClassName: ""
7676
annotations: {}
7777
hpa:
7878
enabled: false

charts/service-gateway/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ The following table lists the configurable parameters of the `service-gateway` c
7474
| gateway.gateway-converter.enabled | | <code>false</code> |
7575
| gateway.config.envoyGateway.gateway.controllerName | | <code>gateway.voyagermesh.com/ace</code> |
7676
| gateway.config.envoyGateway.extensionApis | | <code>{}</code> |
77-
| gateway.deployment.priorityClassName | | <code>system-cluster-critical</code> |
77+
| gateway.deployment.priorityClassName | | <code>""</code> |
7878
| gateway.deployment.annotations | | <code>{}</code> |
7979
| gateway.hpa.enabled | | <code>false</code> |
8080
| gateway.hpa.behavior | | <code>{}</code> |

charts/service-gateway/templates/gateway-tls/certificate.yaml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
{{- $ing := lookup "networking.k8s.io/v1" "Ingress" "ace" "ace" -}}
2-
{{- $domain := include "gateway.domain" . -}}
3-
41
{{- if not (eq .Values.infra.tls.issuer "external") }}
52

63
apiVersion: cert-manager.io/v1
@@ -22,10 +19,7 @@ spec:
2219
{{- if eq .Values.infra.hostType "domain" }}
2320
commonName: {{ include "gateway.domain" . }}
2421
dnsNames:
25-
- {{ $domain }}
26-
{{- if and $ing (hasPrefix "ace.ace." $domain) }}
27-
- {{ trimPrefix "ace.ace." $domain }}
28-
{{- end }}
22+
- {{ include "gateway.domain" . }}
2923
{{- else }}
3024
ipAddresses:
3125
- "{{ .Values.infra.host }}"

charts/service-gateway/values.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ gateway:
7373
controllerName: gateway.voyagermesh.com/ace
7474
extensionApis: {}
7575
deployment:
76-
priorityClassName: system-cluster-critical
76+
priorityClassName: ""
7777
annotations: {}
7878
hpa:
7979
enabled: false

0 commit comments

Comments
 (0)