Skip to content

Ability to provide static secret values #158

@kevarr

Description

@kevarr

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: qux

Resulting 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:

Environment:

  • Secrets Store Sync Controller version: (use the image tag): v0.0.2
  • Kubernetes version: (use kubectl version): N/A

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.needs-triageIndicates an issue or PR lacks a `triage/foo` label and requires one.

    Type

    No type

    Projects

    Status

    Subprojects - Needs Triage

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions