Improve the secret documentation
This is a Feature Request
What would you like to be added More detailed documentation about Secret, in addition to the current lengthy Secret concept.
Why is this needed We have many secrets about Secret which should be documented. For example, the securet type can be one of:
Opaquekubernetes.io/service-account-tokenkubernetes.io/dockercfgkubernetes.io/dockerconfigjsonkubernetes.io/basic-authkubernetes.io/ssh-authkubernetes.io/tlsbootstrap.kubernetes.io/token
Some secret types needs special annotation or data keys. For example, for service account tokens, the following two annotations are required:
kubernetes.io/service-account.namekubernetes.io/service-account.id
AND, the following key is required in the data property:
token
Comments In addition to the new contents to be added, we should consider moving some of the task-alike content out of the concept introduction at https://kubernetes.io/docs/concepts/configuration/secret/
/priority important-longterm
@sftim Can you please point me where can I read more about secret, Also which could help in add & improving the following?
Thanks
This information is in the upstream source code. There is no convenient way for dumping them as swagger/openapi specs which are used for generating the API reference documentation. I would even suspect there could be one in future given the complexity of the semantics and nesting of struct definitions in Go lang.
You have to read the source code to understand the many constraints for resources like this. For the Secret resource type, the validation logic is here: https://github.com/kubernetes/kubernetes/blob/master/pkg/apis/core/validation/validation.go#L4922
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
/remove-lifecycle stale
+1 Especially,
- is the token inside a secret periodically roated?
- Expiration of
ca.crtseems to be set to 5 years. Is it going to be renewed automatically, or do you have to renew manually (and how)? What's the impact to already running workloads that hit the expiration?
+1 Additionally:
- Document that secrets whose keys are removed from secrets files remain in the deployed secrets as empty strings, meaning the secrets resource must be deleted to remove that key and rebuilt on next deploy.
Immutable Secrets are also relevant (https://blog.alcide.io/kubernetes-1.18-introduces-immutable-configmaps-and-secretes has some details)
Issues go stale after 90d of inactivity.
Mark the issue as fresh with /remove-lifecycle stale.
Stale issues rot after an additional 30d of inactivity and eventually close.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle stale
Stale issues rot after 30d of inactivity.
Mark the issue as fresh with /remove-lifecycle rotten.
Rotten issues close after an additional 30d of inactivity.
If this issue is safe to close now please do so with /close.
Send feedback to sig-testing, kubernetes/test-infra and/or fejta. /lifecycle rotten
/remove-lifecycle rotten
Given the mentioned gap from the issue description and the various comments received, I'd like to propose a freeze of lifecycle for this issue. /lifecycle frozen
Put this on my TODO list. /assign