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
1 change: 1 addition & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ boolean
CAs
CertificateRequest
CertificateRequests
CertificateSecretTemplate
CertificateSigningRequest
CertificateSigningRequests
Changelog
Expand Down
22 changes: 6 additions & 16 deletions content/en/docs/faq/kubed.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,7 @@ spec:

## Syncing arbitrary secrets across namespaces using kubed

In order for the target Secret to be synced, the Secret resource must first be
created with the correct annotations before the creation of the Certificate,
else the Secret will need to be edited instead. The example below shows syncing
In order for the target Secret to be synced, you can use the `secretTemplate` field for annotating the generated secret with the kubed sync annotation (See [CertificateSecretTemplate]). The example below shows syncing
a certificate belonging to the `sandbox` Certificate from the `cert-manager`
namespace, into the `sandbox` namespace.

Expand All @@ -47,19 +45,6 @@ metadata:
labels:
cert-manager-tls: sandbox # Define namespace label for kubed
---
apiVersion: v1
data:
ca.crt: ''
tls.crt: ''
tls.key: ''
kind: Secret
metadata:
name: sandbox-tls
namespace: cert-manager
annotations:
kubed.appscode.com/sync: "cert-manager-tls=sandbox" # Sync certificate to matching namespaces
type: kubernetes.io/tls
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
Expand All @@ -72,4 +57,9 @@ spec:
name: sandbox-ca
kind: Issuer
group: cert-manager.io
secretTemplate:
annotations:
kubed.appscode.com/sync: "cert-manager-tls=sandbox" # Sync certificate to matching namespaces
```

[CertificateSecretTemplate]: ../../reference/api-docs/#cert-manager.io/v1.CertificateSecretTemplate