-
Notifications
You must be signed in to change notification settings - Fork 726
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add docs for k8s kubeconfig, defaultNamespace #3803
Conversation
Signed-off-by: Mukundan Sundararajan <[email protected]>
@ItalyPaleAle Please review PR |
daprdocs/content/en/reference/components-reference/supported-bindings/kubernetes-binding.md
Outdated
Show resolved
Hide resolved
daprdocs/content/en/reference/components-reference/supported-cryptography/kubernetes-secrets.md
Outdated
Show resolved
Hide resolved
...content/en/reference/components-reference/supported-secret-stores/kubernetes-secret-store.md
Outdated
Show resolved
Hide resolved
|
||
| Field | Required | Details | Example | | ||
|--------------------|:--------:|------------|-----|---------| | ||
| `defaultNamespace` | N | Default namespace to retrieve secrets from | `"default-ns"` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any consequences if this value is not set?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, defaultNamespace
is not a required parameter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
namespace is a required parameter to get secrets ....
either through request metadata, or though NAMESPACE
env var.
https://github.com/dapr/components-contrib/blob/master/secretstores/kubernetes/kubernetes.go#L112-L126
func (k *kubernetesSecretStore) getNamespaceFromMetadata(metadata map[string]string) (string, error) {
if val, ok := metadata["namespace"]; ok && val != "" {
return val, nil
}
if val := os.Getenv("NAMESPACE"); val != "" {
return val, nil
}
if k.md.DefaultNamespace != "" {
return k.md.DefaultNamespace, nil
}
return "", errors.New("namespace is missing on metadata and NAMESPACE env variable, and no default namespace is set")
}
Signed-off-by: Mukundan Sundararajan <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thank you for helping make the Dapr documentation better!
Please follow this checklist before submitting:
In addition, please fill out the following to help reviewers understand this pull request:
Description
Based on PR dapr/components-contrib#3060
Issue reference
Closes #3669