shell-operator
shell-operator copied to clipboard
secretKeyRef
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