Skip to content

Commit

Permalink
fix(helm): use custom CA in egress and ingress too (#5980)
Browse files Browse the repository at this point in the history
While we've always been able to pass a specific CA for
control-plane certs it wasn't possible to use it for egress and ingress.
Now we just use whatever is set. We also simplified the template when
handling CAs

Signed-off-by: Charly Molter <[email protected]>
  • Loading branch information
lahabana authored Feb 10, 2023
1 parent e3f3cbf commit 286cd9c
Show file tree
Hide file tree
Showing 10 changed files with 1,144 additions and 51 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -609,13 +609,16 @@ spec:
cpu: 1000m
memory: 512Mi
volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5537,7 +5537,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -5577,13 +5577,16 @@ spec:
cpu: 1000m
memory: 512Mi
volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -5655,7 +5658,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -5696,13 +5699,16 @@ spec:
memory: 64Mi

volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -615,13 +615,16 @@ spec:
memory: 64Mi

volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: admissionregistration.k8s.io/v1
kind: MutatingWebhookConfiguration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -628,13 +628,16 @@ spec:
memory: 64Mi

volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -835,13 +835,16 @@ spec:
cpu: 1000m
memory: 512Mi
volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -916,7 +919,7 @@ spec:
- name: KUMA_CONTROL_PLANE_URL
value: "https://kuma-control-plane.kuma-system:5678"
- name: KUMA_CONTROL_PLANE_CA_CERT_FILE
value: /var/run/secrets/kuma.io/tls-cert/ca.crt
value: /var/run/secrets/kuma.io/cp-ca/ca.crt
- name: KUMA_DATAPLANE_NAME
value: $(POD_NAME).$(POD_NAMESPACE)
- name: KUMA_DATAPLANE_DRAIN_TIME
Expand Down Expand Up @@ -957,13 +960,16 @@ spec:
memory: 64Mi

volumeMounts:
- name: kuma-tls-cert
mountPath: /var/run/secrets/kuma.io/tls-cert
- name: control-plane-ca
mountPath: /var/run/secrets/kuma.io/cp-ca
readOnly: true
volumes:
- name: kuma-tls-cert
- name: control-plane-ca
secret:
secretName: kuma-tls-cert
secretName: "kuma-tls-cert"
items:
- key: ca.crt
path: ca.crt
---
apiVersion: networking.k8s.io/v1
kind: Ingress
Expand Down
Loading

0 comments on commit 286cd9c

Please sign in to comment.