|
| 1 | +suite: apps.yaml ACME wildcard issuance wiring |
| 2 | + |
| 3 | +templates: |
| 4 | + - templates/apps.yaml |
| 5 | + |
| 6 | +release: |
| 7 | + name: cozy-platform |
| 8 | + namespace: cozy-system |
| 9 | + |
| 10 | +# WS2 / #2400: on the default ingress-nginx path (gateway.enabled=false) a |
| 11 | +# DNS-01 solver lets the platform issue ONE shared wildcard certificate |
| 12 | +# (*.<root-host> + <root-host>) instead of minting a per-host ACME cert |
| 13 | +# for every system service. It is OPT-IN (publishing.certificates.wildcard, |
| 14 | +# default false): a single-label wildcard does not cover custom service |
| 15 | +# hosts outside *.<root-host>, so leaving it off keeps the safe per-host |
| 16 | +# behavior and never switches a dns01 cluster silently on upgrade. |
| 17 | +# apps.yaml computes the effective _cluster.wildcard-secret-name and an |
| 18 | +# _cluster.wildcard-issue signal the publishing ingress package reads to |
| 19 | +# render the Certificate. Operator-provided (BYO) wildcard names always |
| 20 | +# win and never trigger issuance; http01 cannot issue wildcards; the |
| 21 | +# Gateway API path issues its own wildcard via the controller, so issuance |
| 22 | +# here is gated to gateway.enabled=false. |
| 23 | + |
| 24 | +tests: |
| 25 | + - it: does not issue a wildcard by default (http01) |
| 26 | + asserts: |
| 27 | + - matchRegex: |
| 28 | + path: stringData["values.yaml"] |
| 29 | + pattern: 'wildcard-secret-name:\s*""' |
| 30 | + - matchRegex: |
| 31 | + path: stringData["values.yaml"] |
| 32 | + pattern: 'wildcard-issue:\s*"false"' |
| 33 | + |
| 34 | + - it: does not auto-issue on dns01 unless explicitly opted in |
| 35 | + set: |
| 36 | + publishing.certificates.solver: dns01 |
| 37 | + asserts: |
| 38 | + - matchRegex: |
| 39 | + path: stringData["values.yaml"] |
| 40 | + pattern: 'wildcard-secret-name:\s*""' |
| 41 | + - matchRegex: |
| 42 | + path: stringData["values.yaml"] |
| 43 | + pattern: 'wildcard-issue:\s*"false"' |
| 44 | + |
| 45 | + - it: issues a shared wildcard when opted in on the dns01 ingress path |
| 46 | + set: |
| 47 | + publishing.certificates.solver: dns01 |
| 48 | + publishing.certificates.wildcard: true |
| 49 | + asserts: |
| 50 | + - matchRegex: |
| 51 | + path: stringData["values.yaml"] |
| 52 | + pattern: 'wildcard-secret-name:\s*"cozystack-wildcard-tls"' |
| 53 | + - matchRegex: |
| 54 | + path: stringData["values.yaml"] |
| 55 | + pattern: 'wildcard-issue:\s*"true"' |
| 56 | + |
| 57 | + - it: does not auto-issue on the ingress path when Gateway API is enabled |
| 58 | + set: |
| 59 | + publishing.certificates.solver: dns01 |
| 60 | + publishing.certificates.wildcard: true |
| 61 | + gateway.enabled: true |
| 62 | + asserts: |
| 63 | + - matchRegex: |
| 64 | + path: stringData["values.yaml"] |
| 65 | + pattern: 'wildcard-secret-name:\s*""' |
| 66 | + - matchRegex: |
| 67 | + path: stringData["values.yaml"] |
| 68 | + pattern: 'wildcard-issue:\s*"false"' |
| 69 | + |
| 70 | + - it: operator-provided wildcard secret wins and never triggers issuance |
| 71 | + set: |
| 72 | + publishing.certificates.solver: dns01 |
| 73 | + publishing.certificates.wildcard: true |
| 74 | + publishing.certificates.wildcardSecretName: byo-wildcard-tls |
| 75 | + asserts: |
| 76 | + - matchRegex: |
| 77 | + path: stringData["values.yaml"] |
| 78 | + pattern: 'wildcard-secret-name:\s*"byo-wildcard-tls"' |
| 79 | + - matchRegex: |
| 80 | + path: stringData["values.yaml"] |
| 81 | + pattern: 'wildcard-issue:\s*"false"' |
| 82 | + |
| 83 | + - it: http01 never issues a wildcard even when opted in |
| 84 | + set: |
| 85 | + publishing.certificates.solver: http01 |
| 86 | + publishing.certificates.wildcard: true |
| 87 | + asserts: |
| 88 | + - matchRegex: |
| 89 | + path: stringData["values.yaml"] |
| 90 | + pattern: 'wildcard-secret-name:\s*""' |
| 91 | + - matchRegex: |
| 92 | + path: stringData["values.yaml"] |
| 93 | + pattern: 'wildcard-issue:\s*"false"' |
0 commit comments