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
2 changes: 2 additions & 0 deletions .spelling
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,8 @@ JoshVanL
Kyverno
hardcodes
templated
jonathansp
benlangfeld

# As per https://tools.ietf.org/html/rfc5280, the spelling "X.509" is the
# correct spelling. The spelling "x509" and "X509" are incorrect.
Expand Down
31 changes: 29 additions & 2 deletions content/en/docs/release-notes/release-notes-1.5.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,42 @@ type: "docs"
# Release `v1.5.0`

Special thanks to the external contributors who contributed to this release:
- TODO

* [@jonathansp](https://github.com/jonathansp)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

* [@benlangfeld](https://github.com/benlangfeld)

## Deprecated Features and Breaking Changes

### TODO

## New Features

### TODO
### Secret Templates

We introduce the concept of `SecretTemplate` for `Certificates`. When a certificate is issued, a new `Secret` is created to hold the certificate data. This secret is created by cert-manager. In order to use third-party solutions such as [kubed](https://github.com/kubeops/kubed) to copy this secret to multiple namespaces, this secret must be annotated.

`SecretTemplate` is optional. Labels and annotations from the template will be synced to the `Secret` at the time when the certificate is created or renewed.

```yaml
# certificate.yaml
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: example-com
namespace: sandbox
spec:
secretName: example-com-tls
secretTemplate:
annotations:
my-secret-annotation: "foo"
labels:
my-secret-label: bar
```
*Note*: Currently labels and annotations can only be added or replaced, but not removed. Removing any labels or annotations from the template or removing the template itself will have no effect.

Implemented in cert-manager PR [#3828][]

[#3828]: https://github.com/jetstack/cert-manager/pull/3828 "feat: add support to secretTemplates"

## Bug Fixes

Expand Down
18 changes: 18 additions & 0 deletions content/en/docs/usage/certificate.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,21 @@ metadata:
spec:
# Secret names are always required.
secretName: example-com-tls

# Secret template is optional. If set, these annotations
# and labels will be copied to the secret named example-com-tls.

# Note: Labels and annotations from the template are only synced to the Secret at the time when the certificate
# is created or renewed. Currently labels and annotations can only be added, but not removed. Removing any
# labels or annotations from the template or removing the template itself will have no effect.
# See https://github.com/jetstack/cert-manager/issues/4292.
secretTemplate:
annotations:
my-secret-annotation-1: "foo"
my-secret-annotation-2: "bar"
labels:
my-secret-label: foo

duration: 2160h # 90d
renewBefore: 360h # 15d
subject:
Expand Down Expand Up @@ -75,6 +90,9 @@ The signed certificate will be stored in a `Secret` resource named
`example-com-tls` in the same namespace as the `Certificate` once the issuer has
successfully issued the requested certificate.

If `secretTemplate` is present, annotations and labels set in this property
will be copied over to `example-com-tls` secret. Both properties are optional.
Comment on lines +93 to +94
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just wondering, how do we let people know that this is a feature that only exists since 1.5? The user would have to look for differences between 1.4 and 1.5 to find that out.

I'd go with smth like:

Suggested change
If `secretTemplate` is present, annotations and labels set in this property
will be copied over to `example-com-tls` secret. Both properties are optional.
If `secretTemplate` _(since cert-manager 1.5)_ is present, annotations and labels set in this property
will be copied over to `example-com-tls` secret. Both properties are optional.

@irbekrm what do you think? 😅

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Our docs are versioned so I don't think this is too much of a concern.

Copy link
Member

@maelvls maelvls Jul 29, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@JoshVanL I find it very frustrating to have to select one by one the documentation versions to find when a feature was introduced and know if your version of cert-manager works with that feature, since Google always returns the latest version of the pages.

I am often in the situation where I start using a feature and realize later on that the feature was introduced in a later version. This happened 3 times in the last month while using Traefik. I just wish they had a tiny note on every Ingress annotation that reminds me "when" this annotation was added.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we may want to merge this into release-next branch, not into master though?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated and rebased @irbekrm

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've just added a release note based on the PR description and code comments, let me know if it needs to be rewritten. @benlangfeld I took the liberty to add your name to the contributors' list above.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like our stupid spellchecker doesn't like the github usernames. You'll have to add them to the .spelling file. See https://github.com/cert-manager/website/blame/master/.spelling#L265

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Usernames added to .spelling.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jonathansp I'm flattered, but I didn't do anything nearly worth being included in a list of contributors :)


The `Certificate` will be issued using the issuer named `ca-issuer` in the
`sandbox` namespace (the same namespace as the `Certificate` resource).

Expand Down