Skip to content

PushSecrets should implement the same remoteRef.property options as ExternalSecrets #2353

@giepa

Description

@giepa

Describe the solution you'd like

We would like to push values from a given kubernetes secret key, to a given property of a remote secret. Currently it is only possible to push a value to update an entire remote secret.

For example given the below k8s secret:

apiVersion: v1
kind: Secret
metadata:
  name: source-secret
stringData:
  some-key: "this is a secret"
  some-other-key: "this is another secret"

With the below PushSecret

apiVersion: external-secrets.io/v1alpha1
kind: PushSecret
spec:
  selector:
    secret:
      name: source-secret
  data:
    - match:
        secretKey: some-key
        remoteRef:
          remoteKey: my-secret
          property: some-key
    - match:
        secretKey: some-other-key
        remoteRef:
          remoteKey: my-secret
          property: some-other-key

The result would be that the remote secret my-secret is updated with key value pairs as below:

{
  "some-key": "this is a secret"
  "some-other-key": "this is another secret"
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    Status

    Done

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions