Skip to content

Commit 9fe44a0

Browse files
committed
Merge remote-tracking branch 'origin/master' into release-next
Signed-off-by: Jake Sanders <i@am.so-aweso.me>
2 parents 056da86 + f552de4 commit 9fe44a0

File tree

31 files changed

+576
-280
lines changed

31 files changed

+576
-280
lines changed

.spelling

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ APIServices
1414
AppRole
1515
AWS
1616
awspca
17+
aws-pca-issuer
1718
AzureDNS
1819
backend
1920
backends
@@ -60,11 +61,14 @@ enablement
6061
eTLD
6162
external-dns
6263
FastDNS
64+
FreeIPA
65+
freeipa-issuer
6366
GCE
6467
GCLB
6568
gcloud
6669
GCP
6770
GKE
71+
google-cas-issuer
6872
HashiCorp
6973
Helmfile
7074
hostname
@@ -96,6 +100,7 @@ Kubernetes
96100
labelled
97101
lifecycle
98102
loadbalancer
103+
LuCI
99104
MacOS
100105
metadata
101106
misconfiguration
@@ -116,6 +121,7 @@ OpenAPI
116121
OpenFaaS
117122
OpenShift
118123
OperatorHub
124+
OpenWRT
119125
PEM
120126
PKCS#12
121127
PKCS#8
@@ -188,3 +194,14 @@ HTTP-01
188194
loopback
189195
mechanism
190196
retryable
197+
vendoring
198+
subchart
199+
cainjector
200+
Velero
201+
istio-csr
202+
pre-released
203+
pre-release
204+
unredacted
205+
ArtifactHub
206+
CryptoKey
207+
Encrypter

OWNERS

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,5 @@ approvers:
33
- JoshVanL
44
- meyskens
55
- jakexks
6+
- irbekrm
7+
- maelvls

_redirects

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,6 @@ https://netlify.cert-manager.io/* https://cert-manager.io/:splat 301!
55

66
# Optional: Redirect default Netlify subdomain to primary domain
77
https://cert-manager.netlify.com/* https://cert-manager.io/:splat 301!
8+
9+
# We previously released the external loadbalencer page under /configuration, and is now moved to /configuration/acme/http01/
10+
https://cert-manager.io/docs/configuration/externalloadbalancer/ https://cert-manager.io/docs/configuration/acme/http01/externalloadbalancer/ 301!

config/_default/params.toml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
# Set to "docs" path
2323

2424
[[versions]]
25-
version = "v1.0"
25+
version = "v1.1"
2626
# 'master' is used to store the 'current' version documentation.
2727
# Once the 'next' release becomes 'current', we branch master to
2828
# release-X.Y and merge 'release-next' into 'master'.
@@ -33,7 +33,7 @@
3333
# 'Next' version
3434
################
3535
[[versions]]
36-
version = "v1.1"
36+
version = "v1.2"
3737
ghbranchname = "release-next"
3838
url = "/next-docs/"
3939
dirpath = "next-docs"
@@ -42,6 +42,13 @@
4242
###################
4343
# Use format `v0.#-docs` for past version's dirpath
4444

45+
46+
[[versions]]
47+
version = "v1.0"
48+
ghbranchname = "release-1.0"
49+
url = "/v1.0-docs/"
50+
dirpath = "v1.0-docs"
51+
4552
[[versions]]
4653
version = "v0.16"
4754
ghbranchname = "release-0.16"

content/en/docs/concepts/project-maturity.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ cert-manager has a hard guarantee of compatibly with the current stable upstream
1818
Kubernetes version. Beyond this, cert-manager also aims to be compatible with
1919
versions down to `N-4`, where `N` is the current upstream version release. This
2020
means that if the current version is `v1.19`, cert-manager aims to be compatible
21-
with versions down to `v0.15`. This is done by running periodic end-to-end test
21+
with versions down to `v1.15`. This is done by running periodic end-to-end test
2222
jobs against each version of Kubernetes.
2323

2424
Versions lower than the current Kubernetes version down to `N-4` is *not

content/en/docs/concepts/webhook.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ main functions:
2222
- [`MutatingAdmissionWebhook`](https://kubernetes.io/docs/reference/access-authn-authz/admission-controllers/#mutatingadmissionwebhook):
2323
Changes the contents of resources during create and update operations, for
2424
example to set default values.
25-
- [`CustomResourceConversionWebhook`](https://kubernetes.io/docs/tasks/access-kubernetes-api/custom-resources/custom-resource-definition-versioning/#webhook-conversion):
25+
- [`CustomResourceConversionWebhook`](https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definition-versioning/#webhook-conversion):
2626
The webhook is also responsible for implementing a conversion over versions
2727
in the cert-manager `CustomResources` (`cert-manager.io`). This means that
2828
multiple API versions can be supported simultaneously; from `v1alpha2` through to `v1`.

content/en/docs/configuration/acme/_index.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ most cert-manager users unless you know it is explicitly needed.
125125
External Account Bindings require three fields on an ACME `Issuer` which
126126
represents your ACME account. These fields are:
127127

128-
- `keyID` - the key ID of which your external account binding is indexed by the
128+
- `keyID` - the key ID or account ID of which your external account binding is indexed by the
129129
external account manager
130130
- `keySecretRef` - the name and key of a secret containing a base 64 encoded
131131
URL string of your external account symmetric MAC key
@@ -136,7 +136,7 @@ ACME server
136136
> Note: In _most_ cases, the MAC key must be encoded in `base64URL`. The
137137
> following command will base64-encode a key and convert it to `base64URL`:
138138
>
139-
> $ echo 'my-secret-key' | base64 | sed -e 's/+/-/g' -e 's///_/g' -e 's/=//g'
139+
> $ echo 'my-secret-key' | base64 -w0 | sed -e 's/+/-/g' -e 's/\//_/g' -e 's/=//g'
140140
>
141141
> You can then create the Secret resource with:
142142
>
@@ -155,7 +155,7 @@ spec:
155155
email: user@example.com
156156
server: https://my-acme-server-with-eab.com/directory
157157
externalAccountBinding:
158-
keyID: my-kid-1
158+
keyID: my-keyID-1
159159
keySecretRef:
160160
name: eab-secret
161161
key: secret
@@ -210,10 +210,10 @@ single solver.
210210

211211
#### Match Labels
212212

213-
The `matchLabel` selector requires that all `Certificates` match at least one of
213+
The `matchLabel` selector requires that all `Certificates` match all of
214214
the labels that are defined in the string map list of that stanza. For example,
215215
the following `Issuer` will only match on `Certificates` that have the labels
216-
`"user-cloudflare-solver": "true"`, or `"email": "user@example.com"`, or both.
216+
`"user-cloudflare-solver": "true"` and `"email": "user@example.com"`.
217217

218218
```yaml
219219
apiVersion: cert-manager.io/v1

content/en/docs/configuration/acme/dns01/_index.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,7 @@ Links to these supported providers along with their documentation are below:
172172
- [`cert-manager-webhook-scaleway`](https://github.com/scaleway/cert-manager-webhook-scaleway)
173173
- [`cert-manager-webhook-selectel`](https://github.com/selectel/cert-manager-webhook-selectel)
174174
- [`cert-manager-webhook-softlayer`](https://github.com/cgroschupp/cert-manager-webhook-softlayer)
175+
- [`cert-manager-webhook-ibmcis`](https://github.com/jb-dk/cert-manager-webhook-ibmcis)
175176

176177
You can find more information on how to configure webhook providers
177178
[here](./webhook/).

content/en/docs/configuration/acme/dns01/azuredns.md

Lines changed: 196 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,202 @@ weight: 30
55
type: "docs"
66
---
77

8+
To configure the AzureDNS DNS01 Challenge in a Kubernetes cluster there are 3 ways available:
9+
10+
- [Managed Identity Using AAD Pod Identities](#managed-identity-using-aad-pod-identities)
11+
- [Managed Identity Using AKS Kubelet Identity](#managed-identity-using-aks-kubelet-identity)
12+
- [Service Principal](#service-principal)
13+
14+
## Managed Identity Using AAD Pod Identities
15+
16+
[AAD Pod Identities](https://azure.github.io/aad-pod-identity) allows assigning a [Managed Identity](https://docs.microsoft.com/en-us/azure/active-directory/managed-identities-azure-resources/overview) to a pod. This removes the need for adding explicit credentials into the cluster to create the required DNS records.
17+
18+
> Note: When using Pod identity, even though assigning multiple identities to a single pod is allowed, currently cert-manager does not support this as it is not able to identify which identity to use.
19+
20+
Firstly an identity should be created that has access to contribute to the DNS Zone.
21+
22+
- Example creation using `azure-cli` and `jq`:
23+
```bash
24+
# Choose a unique Identity name and existing resource group to create identity in.
25+
IDENTITY=$(az identity create --name $IDENTITY_NAME --resource-group $IDENTITY_GROUP )
26+
27+
# Gets principalId to use for role assignment
28+
PRINCIPAL_ID=$(echo $IDENTITY | jq -r '.principalId')
29+
30+
# Used for identity binding
31+
CLIENT_ID=$(echo $IDENTITY | jq -r '.clientId')
32+
RESOURCE_ID=$(echo $IDENTITY | jq -r '.id')
33+
34+
# Get existing DNS Zone Id
35+
ZONE_ID=$(az network dns zone show --name $ZONE_NAME --resource-group $ZONE_GROUP --query "id" -o tsv)
36+
37+
# Create role assignment
38+
az role assignment create --role "DNS Zone Contributor" --assignee $PRINCIPAL_ID --scope $ZONE_ID
39+
```
40+
41+
- Example creation using Terraform
42+
```terraform
43+
variable resource_group_name {}
44+
variable location {}
45+
variable dns_zone_id {}
46+
47+
# Creates Identity
48+
resource "azurerm_user_assigned_identity" "dns_identity" {
49+
name = "cert-manager-dns01"
50+
resource_group_name = var.resource_group_name
51+
location = var.location
52+
}
53+
54+
# Creates Role Assignment
55+
resource "azurerm_role_assignment" "dns_contributor" {
56+
scope = var.dns_zone_id
57+
role_definition_name = "DNS Zone Contributor"
58+
principal_id = azurerm_user_assigned_identity.dns_identity.principal_id
59+
}
60+
61+
# Client Id Used for identity binding
62+
output "identity_client_id" {
63+
value = azurerm_user_assigned_identity.dns_identity.client_id
64+
}
65+
66+
# Resource Id Used for identity binding
67+
output "identity_resource_id" {
68+
value = azurerm_user_assigned_identity.dns_identity.id
69+
}
70+
```
71+
72+
Next we need to ensure we have installed [AAD Pod Identity](https://azure.github.io/aad-pod-identity) using their walk-through. This will install the CRDs and deployment required to assign the identity.
73+
74+
Now we can create the identity resource and binding using the below manifest as an example:
75+
76+
```yaml
77+
apiVersion: "aadpodidentity.k8s.io/v1"
78+
kind: AzureIdentity
79+
metadata:
80+
annotations:
81+
# recommended to use namespaced identites https://azure.github.io/aad-pod-identity/docs/configure/match_pods_in_namespace/
82+
aadpodidentity.k8s.io/Behavior: namespaced
83+
name: certman-identity
84+
namespace: cert-manager # change to your preferred namespace
85+
spec:
86+
type: 0 # MSI
87+
resourceID: <Identity_Id> # Resource Id From Previous step
88+
clientID: <Client_Id> # Client Id from previous step
89+
---
90+
apiVersion: "aadpodidentity.k8s.io/v1"
91+
kind: AzureIdentityBinding
92+
metadata:
93+
name: certman-id-binding
94+
namespace: cert-manager # change to your preferred namespace
95+
spec:
96+
azureIdentity: certman-identity
97+
selector: certman-label # This is the label that needs to be set on cert-manager pods
98+
```
99+
100+
Next we need to ensure the cert-manager pod has a relevant label to use the pod identity binding. This can be done by editing the deployment and adding the below into the `.spec.template.metadata.labels` field
101+
102+
```yaml
103+
spec:
104+
template:
105+
metadata:
106+
labels:
107+
aadpodidbinding: certman-label # must match selector in AzureIdentityBinding
108+
```
109+
110+
Or by using the helm values `podLabels`
111+
112+
```yaml
113+
podLabels:
114+
aadpodidbinding: certman-label
115+
```
116+
117+
Lastly when we create the certificate issuer we only need to specify the `hostedZoneName`, `resourceGroupName` and `subscriptionID` fields for the DNS zone. Example below:
118+
119+
```yaml
120+
apiVersion: cert-manager.io/v1
121+
kind: Issuer
122+
metadata:
123+
name: example-issuer
124+
spec:
125+
acme:
126+
...
127+
solvers:
128+
- dns01:
129+
azureDNS:
130+
subscriptionID: AZURE_SUBSCRIPTION_ID
131+
resourceGroupName: AZURE_DNS_ZONE_RESOURCE_GROUP
132+
hostedZoneName: AZURE_DNS_ZONE
133+
# Azure Cloud Environment, default to AzurePublicCloud
134+
environment: AzurePublicCloud
135+
```
136+
137+
## Managed Identity Using AKS Kubelet Identity
138+
139+
When creating an AKS cluster in Azure there is the option to use a managed identity that is assigned to the kubelet. This identity is assigned to the underlying node pool in the AKS cluster and can then be used by the cert-manager pods to authenticate to Azure Active Directory.
140+
141+
There are some caveats with this approach, these mainly being:
142+
143+
- You will need to ensure only 1 managed identity is assigned to the node pool. This is due to cert-manager not currently being able to select the identity to use
144+
- Any permissions granted to this identity will also be accessible to all containers running inside the Kubernetes cluster.
145+
- Using AKS extensions like `Kube Dashboard` will not work with this method as this creates an additional identity that is assigned to the node pools.
146+
147+
To set this up, firstly you will need to retrieve the identity that the kubelet is using by querying the AKS cluster. This can then be used to create the appropriate permissions in the DNS zone.
148+
149+
- Example commands using `azure-cli`:
150+
```bash
151+
# Get AKS Kubelet Identity
152+
PRINCIPAL_ID=$(az aks show -n $CLUSTERNAME -g $CLUSTER_GROUP --query "identityProfile.kubeletidentity.objectId" -o tsv)
153+
154+
# Get existing DNS Zone Id
155+
ZONE_ID=$(az network dns zone show --name $ZONE_NAME --resource-group $ZONE_GROUP --query "id" -o tsv)
156+
157+
# Create role assignment
158+
az role assignment create --role "DNS Zone Contributor" --assignee $PRINCIPAL_ID --scope $ZONE_ID
159+
```
160+
161+
- Example terraform:
162+
```terraform
163+
variable dns_zone_id {}
164+
165+
# Creating the AKS cluster, abbreviated.
166+
resource "azurerm_kubernetes_cluster" "cluster" {
167+
...
168+
# Creates Identity associated to kubelet
169+
identity {
170+
type = "SystemAssigned"
171+
}
172+
...
173+
}
174+
175+
resource "azurerm_role_assignment" "dns_contributor" {
176+
scope = var.dns_zone_id
177+
role_definition_name = "DNS Zone Contributor"
178+
principal_id = azurerm_kubernetes_cluster.cluster.kubelet_identity[0].object_id
179+
skip_service_principal_aad_check = true # Allows skipping propagation of identity to ensure assignment succeeds.
180+
}
181+
```
182+
183+
Then when creating the cert-manager issuer we only need to specify the `hostedZoneName`, `resourceGroupName` and `subscriptionID` fields for the DNS Zone. Example below:
184+
```yaml
185+
apiVersion: cert-manager.io/v1
186+
kind: Issuer
187+
metadata:
188+
name: example-issuer
189+
spec:
190+
acme:
191+
...
192+
solvers:
193+
- dns01:
194+
azureDNS:
195+
subscriptionID: AZURE_SUBSCRIPTION_ID
196+
resourceGroupName: AZURE_DNS_ZONE_RESOURCE_GROUP
197+
hostedZoneName: AZURE_DNS_ZONE
198+
# Azure Cloud Environment, default to AzurePublicCloud
199+
environment: AzurePublicCloud
200+
```
201+
202+
## Service Principal
203+
8204
Configuring the AzureDNS DNS01 Challenge for a Kubernetes cluster requires
9205
creating a service principal in Azure.
10206

File renamed without changes.

0 commit comments

Comments
 (0)