Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions charts/countly-web-ui-canary/templates/certificate.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{{/*
Explicit Certificate resource (rather than relying on cert-manager's ingress-shim
auto-creation from the Ingress's cert-manager.io/cluster-issuer annotation).

We need the cert-manager.io/issue-temporary-certificate annotation on the
Certificate so cert-manager pre-populates the TLS Secret with a self-signed
cert immediately. Without it, F5 NIC's `ssl_reject_handshake on` for hosts
without a cert kills cert-manager's HTTP-01 self-check (it follows the
hardcoded HTTP→HTTPS redirect and the TLS handshake fails with
`tls: unrecognized name`).

ingress-shim in cert-manager v1.17 doesn't propagate the
issue-temporary-certificate annotation from Ingress to Certificate, so the
chart owns the Certificate directly.
*/}}
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: {{ include "canary.fullname" . }}-tls
namespace: {{ .Release.Namespace }}
labels:
{{- include "canary.labels" . | nindent 4 }}
annotations:
cert-manager.io/issue-temporary-certificate: "true"
spec:
secretName: {{ include "canary.fullname" . }}-tls
duration: 2160h # 90d
renewBefore: 720h # 30d (renew when 1/3 lifetime remaining)
privateKey:
algorithm: ECDSA
size: 256
rotationPolicy: Always
dnsNames:
- {{ include "canary.hostname" . | quote }}
issuerRef:
name: {{ required "ingress.tls.clusterIssuer is required" .Values.ingress.tls.clusterIssuer | quote }}
kind: ClusterIssuer
13 changes: 4 additions & 9 deletions charts/countly-web-ui-canary/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,10 @@ metadata:
labels:
{{- include "canary.labels" . | nindent 4 }}
annotations:
cert-manager.io/cluster-issuer: {{ required "ingress.tls.clusterIssuer is required" .Values.ingress.tls.clusterIssuer | quote }}
# Issue a self-signed temporary cert immediately so the TLS handshake works
# while the real Let's Encrypt cert is being issued. Without this, F5 NIC
# has `ssl_reject_handshake on` for hosts without a cert, which makes
# cert-manager's HTTP-01 self-check fail with `tls: unrecognized name` after
# F5 NIC's hardcoded HTTP→HTTPS redirect (the `nginx.org/redirect-to-https`
# annotation only controls a different XFP-based redirect, not this in-scheme one).
# cert-manager swaps the temp cert for the real one once ACME completes.
cert-manager.io/issue-temporary-certificate: "true"
# No cert-manager annotations here — the Certificate is managed explicitly
# by templates/certificate.yaml so we can set issue-temporary-certificate.
# ingress-shim in cert-manager v1.17 doesn't propagate that annotation from
# Ingress to Certificate, so chart owns the Certificate directly.
{{- include "canary.ingressAnnotations" . | nindent 4 }}
spec:
ingressClassName: {{ .Values.ingress.className }}
Expand Down
Loading