Skip to content
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

secretKeyRef #296

Open
diafour opened this issue Jun 11, 2021 · 0 comments
Open

secretKeyRef #296

diafour opened this issue Jun 11, 2021 · 0 comments

Comments

@diafour
Copy link
Contributor

diafour commented Jun 11, 2021

Is your feature request related to a problem? Please describe.

Describe the solution you'd like to see

Automatic way to insert a field from the Secret to the field in CR during filtering and in the snapshot. The variant of configuration can be like this:

Binding:
   configVersion: v1
   kubernetes:
   - name: cr_objects
     apiVersion: my/v1beta2
     kind: MyKind
     includeSnapshotsFrom: [cr_objects]
     namespace: ...
     jqFilter: .spec.remoteWrite
     secretKeyRefs:
       - path: .spec.basicAuth.usernameSecretKeyRef
         to: .spec.basicAuth.username
         optional: True|False
       - path: .spec.basicAuth.passwordSecretKeyRef
         to: .spec.basicAuth.password
         optional: True|False

CR:

apiVersion: my/v1beta2
kind: MyKind
metadata:
  name: test
spec:
  url: https://some-url.com/some-endpoint
  basicAuth:
    username: lskdjflsdkfj
    password:
    usernameSecretKeyRef:
      namespace: default
      name: basic-auth-for-some-url
      key: username
      error: No such secret
    passwordSecretKeyRef:
      namespace: default
      name: basic-auth-for-some-url
      key: username
      error: No such secret

Describe alternatives you've considered

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant