Skip to content

Commit

Permalink
Minor fixes in certificates to make them ArgoCD friendly (chaos-mesh#…
Browse files Browse the repository at this point in the history
…4482)

* Minor fixes in certificates to make them ArgoCD friendly

* chore: update changelog

Signed-off-by: Yue Yang <[email protected]>

---------

Signed-off-by: Yue Yang <[email protected]>
Co-authored-by: Mark Kharitonov <[email protected]>
Co-authored-by: Yue Yang <[email protected]>
  • Loading branch information
3 people committed Sep 2, 2024
1 parent da69c6d commit 7e11f64
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 9 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ For more information and how-to, see [RFC: Keep A Changelog](https://github.com/
- Fix dashboard panic while replacing query namespace with targetNamespace in namespace scoped mode [#4409](https://github.com/chaos-mesh/chaos-mesh/issues/4409)
- Fix incorrect mmap args for IOChaos [#3680](https://github.com/chaos-mesh/chaos-mesh/issues/3680)
- Fix chaos controller can't find daemonIP over 1000 nodes using endpoints [#4421](https://github.com/chaos-mesh/chaos-mesh/pull/4421)
- Minor fixes in certificates to make them ArgoCD friendly [#4482](https://github.com/chaos-mesh/chaos-mesh/pull/4482)

### Security

Expand Down
4 changes: 2 additions & 2 deletions helm/chaos-mesh/templates/_certs.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ When using this template, it requires the top-level scope
{{- /* webhookName would be the FQDN of in-cluster service chaos-mesh.*/ -}}
{{- $webhookName := printf "%s.%s.svc" (include "chaos-mesh.svc" .) .Release.Namespace }}
{{- $webhookCA := required "self-signed CA keypair is requried" .selfSignedCAKeypair -}}
{{- /* Generate cert keypair for webhook with 5 year validity duration. */ -}}
{{- /* Generate cert keypair for webhook with 5 years validity duration. */ -}}
{{- $webhookServerTLSKeypair := .webhookTLSKeypair | default (genSignedCert $webhookName nil (list $webhookName) 1825 $webhookCA) }}
{{- $_ := set . "webhookTLSKeypair" $webhookServerTLSKeypair -}}
{{- $webhookServerTLSKeypair.Cert -}}
Expand All @@ -76,7 +76,7 @@ When using this template, it requires the top-level scope
{{- /* webhookName would be the FQDN of in-cluster service chaos-mesh.*/ -}}
{{- $webhookName := printf "%s.%s.svc" (include "chaos-mesh.svc" .) .Release.Namespace -}}
{{- $webhookCA := required "self-signed CA keypair is requried" .selfSignedCAKeypair -}}
{{- /* Generate cert key pair for webhook with 5 year validity duration. */ -}}
{{- /* Generate cert key pair for webhook with 5 years validity duration. */ -}}
{{- $webhookServerTLSKeypair := .webhookTLSKeypair | default (genSignedCert $webhookName nil (list $webhookName) 1825 $webhookCA) -}}
{{- $_ := set . "webhookTLSKeypair" $webhookServerTLSKeypair -}}
{{- $webhookServerTLSKeypair.Key -}}
Expand Down
11 changes: 4 additions & 7 deletions helm/chaos-mesh/templates/cert-manager-certs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ metadata:
{{- include "chaos-mesh.labels" . | nindent 4 }}
app.kubernetes.io/component: chaos-mesh-ca
spec:
duration: 43800h0m0s #5year
duration: 43800h0m0s # 5 years
secretName: chaos-mesh-ca
commonName: "chaos-mesh-ca"
isCA: true
Expand Down Expand Up @@ -98,12 +98,11 @@ metadata:
{{- include "chaos-mesh.labels" . | nindent 4 }}
app.kubernetes.io/component: chaos-mesh-cert
spec:
duration: 43800h #5year
duration: 43800h0m0s # 5 years
dnsNames:
- {{ template "chaos-mesh.svc" . }}
- {{ template "chaos-mesh.svc" . }}.{{ .Release.Namespace }}
- {{ template "chaos-mesh.svc" . }}.{{ .Release.Namespace }}.svc
isCA: false
secretName: {{ template "chaos-mesh.webhook.certs" . }}
issuerRef:
name: chaos-mesh-ca
Expand All @@ -127,10 +126,9 @@ metadata:
{{- include "chaos-mesh.labels" . | nindent 4 }}
app.kubernetes.io/component: chaos-daemon-client-cert
spec:
duration: 43800h0m0s #5year
duration: 43800h0m0s # 5 years
dnsNames:
- controller-manager.chaos-mesh.org
isCA: false
secretName: {{ template "chaos-mesh.daemon-client.certs" . }}
issuerRef:
name: chaos-mesh-ca
Expand All @@ -154,10 +152,9 @@ metadata:
{{- include "chaos-mesh.labels" . | nindent 4 }}
app.kubernetes.io/component: chaos-daemontcert
spec:
duration: 43800h0m0s #5year
duration: 43800h0m0s # 5 years
dnsNames:
- chaos-daemon.chaos-mesh.org
isCA: false
secretName: {{ template "chaos-mesh.daemon.certs" . }}
issuerRef:
name: chaos-mesh-ca
Expand Down

0 comments on commit 7e11f64

Please sign in to comment.