Skip to content

Commit

Permalink
fix webterminal helm install (#1933)
Browse files Browse the repository at this point in the history
* fix webterminal helm install

* move certificates into own template
remove dummy values
  • Loading branch information
Lappihuan authored Feb 10, 2025
1 parent f17208c commit 5e1e2ca
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 11 deletions.
9 changes: 4 additions & 5 deletions configuration/configuration/templates/webterminal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ type: Opaque
stringData:
values.yaml: |-
global:
runtime:
certificate:
certManager:
enabled: true
issuerName: gardener-ca
deployment:
createNamespace: false
virtualGarden:
enabled: true
2 changes: 1 addition & 1 deletion gardener/certificates/templates/cert-manager-ca.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -202,4 +202,4 @@ spec:
- gardener-admission-controller.garden
- gardener-admission-controller.garden.svc
issuerRef:
name: gardener-ca
name: gardener-ca
46 changes: 46 additions & 0 deletions gardener/certificates/templates/terminal-cert.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: terminal-admission-controller-cert
namespace: flux-system
spec:
secretName: terminal-admission-controller-cert
commonName: terminal-admission-controller.terminal-system.svc.cluster.local
duration: 87600h # 10 years
usages:
- server auth
dnsNames:
- terminal-admission-controller
- terminal-admission-controller.terminal-system
- terminal-admission-controller.terminal-system.svc
- terminal-admission-controller.terminal-system.svc.cluster
- terminal-admission-controller.terminal-system.svc.cluster.local
issuerRef:
name: gardener-ca
privateKey:
algorithm: RSA
size: 3072
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: terminal-metrics-cert
namespace: flux-system
spec:
secretName: terminal-metrics-cert
commonName: terminal-metrics.terminal-system.svc.cluster.local
duration: 87600h # 10 years
usages:
- server auth
dnsNames:
- terminal-metrics
- terminal-metrics.terminal-system
- terminal-metrics.terminal-system.svc
- terminal-metrics.terminal-system.svc.cluster
- terminal-metrics.terminal-system.svc.cluster.local
issuerRef:
name: gardener-ca
privateKey:
algorithm: RSA
size: 3072
80 changes: 75 additions & 5 deletions gardener/webterminal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ spec:
dependsOn:
- name: configuration
- name: gardener-application
targetNamespace: flux-system
targetNamespace: terminal-system
interval: 1m
chart:
spec:
Expand All @@ -23,15 +23,54 @@ spec:
remediation:
retries: 3
createNamespace: true
values:
utils-templates:
enabled: true
valuesFrom:
- kind: Secret
name: webterminal-base-values
optional: false
- kind: Secret
name: webterminal-values-0
optional: true
- kind: Secret
name: webterminal-values-1
optional: true
- kind: Secret
name: webterminal-values-2
optional: true
- kind: Secret
name: webterminal-values
optional: true
valuesKey: enabled
targetPath: terminal-controller-manager-runtime.enabled

- kind: Secret
name: gardener-internal-kubeconfig
valuesKey: value
targetPath: global.controller.manager.kubeconfig

- kind: Secret
name: terminal-metrics-cert
valuesKey: tls.key
targetPath: global.controller.manager.config.server.metrics.tls.key
- kind: Secret
name: terminal-metrics-cert
valuesKey: tls.crt
targetPath: global.controller.manager.config.server.metrics.tls.crt
- kind: Secret
name: terminal-admission-controller-cert
valuesKey: ca.crt
targetPath: global.admission.config.server.webhooks.caBundle
- kind: Secret
name: terminal-admission-controller-cert
valuesKey: tls.key
targetPath: global.admission.config.server.webhooks.tls.key
- kind: Secret
name: terminal-admission-controller-cert
valuesKey: tls.crt
targetPath: global.admission.config.server.webhooks.tls.crt

---
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
Expand All @@ -42,7 +81,7 @@ spec:
dependsOn:
- name: configuration
- name: terminal-controller-manager-runtime
targetNamespace: flux-system
targetNamespace: terminal-system
kubeConfig:
secretRef:
name: gardener-internal-kubeconfig
Expand All @@ -60,14 +99,45 @@ spec:
remediation:
retries: 3
createNamespace: true
values:
utils-templates:
enabled: true
valuesFrom:
- kind: Secret
name: terminal-webhook-server-cert
valuesKey: tls.crt
targetPath: global.application.certificate.caBundle
name: webterminal-base-values
optional: false
- kind: Secret
name: webterminal-values-0
optional: true
- kind: Secret
name: webterminal-values-1
optional: true
- kind: Secret
name: webterminal-values-2
optional: true
- kind: Secret
name: webterminal-values
optional: true
valuesKey: enabled
targetPath: terminal-controller-manager-application.enabled

- kind: Secret
name: terminal-metrics-cert
valuesKey: tls.key
targetPath: global.controller.manager.config.server.metrics.tls.key
- kind: Secret
name: terminal-metrics-cert
valuesKey: tls.crt
targetPath: global.controller.manager.config.server.metrics.tls.crt
- kind: Secret
name: terminal-admission-controller-cert
valuesKey: ca.crt
targetPath: global.admission.config.server.webhooks.caBundle
- kind: Secret
name: terminal-admission-controller-cert
valuesKey: tls.key
targetPath: global.admission.config.server.webhooks.tls.key
- kind: Secret
name: terminal-admission-controller-cert
valuesKey: tls.crt
targetPath: global.admission.config.server.webhooks.tls.crt

0 comments on commit 5e1e2ca

Please sign in to comment.