generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 18
Open
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Description
Describe the solution you'd like
When using the SecretSync object there is currently no way to provide literal secret key/value pair alongside other key/value pairs resolved from a provider (e.g., a feature analogous to kubectl's --from-literal opt).
To address this, I would like to propose enhancing the SecretSync API to allow for the explicit definition of literal secret key/values alongside any other resolved values from a provider.
A conceptual implementation could look like:
apiVersion: secret-sync.x-k8s.io/v1alpha1
kind: SecretSync
metadata:
name: my-secret
spec:
serviceAccountName: my-service-account
secretProviderClassName: my-secret-provider-class
secretObject:
type: Opaque
data:
- targetKey: foo
sourcePath: bar
- targetKey: baz
targetValue: quxResulting in a Secret like...
apiVersion: v1
kind: Secret
metadata:
name: my-secret
type: Opaque
data:
bar: c2VjcmV0Cg==
baz: cXV4Cg==This suggestion introduces a new targetValue property alongside sourcePath and targetKey, that is mutually exclusive with sourcePath.
Anything else you would like to add:
- https://github.com/kubernetes-sigs/secrets-store-sync-controller/blob/v0.0.2/api/v1alpha1/secretsync_types.go#L31
- https://github.com/kubernetes-sigs/secrets-store-sync-controller/blob/v0.0.2/pkg/util/secretutil/secret.go#L186
Environment:
- Secrets Store Sync Controller version: (use the image tag): v0.0.2
- Kubernetes version: (use
kubectl version): N/A
Metadata
Metadata
Assignees
Labels
kind/featureCategorizes issue or PR as related to a new feature.Categorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.Indicates an issue or PR lacks a `triage/foo` label and requires one.
Type
Projects
Status
Subprojects - Needs Triage