Skip to content

Commit

Permalink
Multiple selector types per block both need to match
Browse files Browse the repository at this point in the history
Signed-off-by: irbekrm <irbekrm@gmail.com>
  • Loading branch information
irbekrm committed Jun 10, 2021
1 parent db25c43 commit d1cd661
Showing 1 changed file with 37 additions and 5 deletions.
42 changes: 37 additions & 5 deletions content/en/docs/configuration/acme/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,11 @@ spec:
#### All Together

Each solver is able to have any number of the three selector types defined. In
the following example, the `DNS01` solver will be used to solve challenges for
domains for `Certificates` that contain the DNS names `a.example.com` and
`b.example.com`, or for `test.example.com` and all of its subdomains
(e.g. `foo.test.example.com`).
the following example, the `DNS01` solver for CloudFlare will be used to solve
challenges for domains for `Certificates` that contain the DNS names
`a.example.com` and `b.example.com`. The `DNS01` solver for Google CloudDNS will
be used to solve challenges for `Certificates` whose DNS names match
zone `test.example.com` and all of its subdomains (e.g. `foo.test.example.com`).

For all other challenges, the `HTTP01` solver will be used *only* if the
`Certificate` also contains the label `"use-http01-solver": "true"`.
Expand Down Expand Up @@ -346,6 +347,37 @@ spec:
dnsNames:
- 'a.example.com'
- 'b.example.com'
- dns01:
cloudDNS:
project: my-project-id
hostedZoneName: 'test-example.com'
serviceAccountSecretRef:
key: sa
name: gcp-sa-secret
selector:
dnsZones:
- 'test.example.com'
- 'test.example.com' # This should be the DNS name of the zone
```
Each individual selector block can contain more than one selector type for
example:
```yaml
solvers:
- dns01:
cloudflare:
email: user@example.com
apiKeySecretRef:
name: cloudflare-apikey-secret
key: apikey
selector:
matchLabels:
'email': 'user@example.com'
'solver': 'cloudflare'
dnsZones:
- 'test.example.com'
- 'example.dev'
```
In this case the `DNS01` solver for CloudFlare will only be used to solve a
challenge for a DNS name if the `Certificate` has a label from
`matchLabels` _and_ the DNS name matches a zone from `dnsZones`.

0 comments on commit d1cd661

Please sign in to comment.