website icon indicating copy to clipboard operation
website copied to clipboard

Improve the secret documentation

Open tengqm opened this issue 7 years ago • 13 comments

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:

  • Opaque
  • kubernetes.io/service-account-token
  • kubernetes.io/dockercfg
  • kubernetes.io/dockerconfigjson
  • kubernetes.io/basic-auth
  • kubernetes.io/ssh-auth
  • kubernetes.io/tls
  • bootstrap.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.name
  • kubernetes.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/

tengqm avatar Dec 04 '19 03:12 tengqm

/priority important-longterm

sftim avatar Dec 05 '19 09:12 sftim

@sftim Can you please point me where can I read more about secret, Also which could help in add & improving the following? Thanks

vishakhanihore avatar Dec 08 '19 23:12 vishakhanihore

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

tengqm avatar Dec 09 '19 04:12 tengqm

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

fejta-bot avatar Mar 08 '20 05:03 fejta-bot

/remove-lifecycle stale

tengqm avatar Mar 08 '20 09:03 tengqm

+1 Especially,

  • is the token inside a secret periodically roated?
  • Expiration of ca.crt seems 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?

tomoe avatar Mar 25 '20 02:03 tomoe

+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.

mark-jordanovic-lewis avatar May 05 '20 15:05 mark-jordanovic-lewis

Immutable Secrets are also relevant (https://blog.alcide.io/kubernetes-1.18-introduces-immutable-configmaps-and-secretes has some details)

sftim avatar May 05 '20 15:05 sftim

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

fejta-bot avatar Aug 03 '20 16:08 fejta-bot

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

fejta-bot avatar Sep 02 '20 17:09 fejta-bot

/remove-lifecycle rotten

tengqm avatar Sep 10 '20 00:09 tengqm

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

tengqm avatar Sep 10 '20 00:09 tengqm

Put this on my TODO list. /assign

tengqm avatar Sep 10 '20 00:09 tengqm