Skip to content

Allow constructing SecretOperatorVolumeScope from user-provided string #343

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

Closed
wants to merge 1 commit into from

Conversation

sbernauer
Copy link
Member

@sbernauer sbernauer commented Mar 8, 2022

Description

Follow up of #342
Now superset-operator can constuct SecretOperatorVolumeScope from user-provided string from AuthenticationClass CRD

Review Checklist

  • Code contains useful comments
  • (Integration-)Test cases added (or not applicable)
  • Documentation added (or not applicable)
  • Changelog updated (or not applicable)
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Once the review is done, comment bors r+ (or bors merge) to merge. Further information

@sbernauer sbernauer requested a review from nightkr March 8, 2022 09:00
@sbernauer sbernauer force-pushed the feat/secret-op-scope-string branch from bf112c1 to da209d3 Compare March 8, 2022 09:18
@sbernauer sbernauer force-pushed the feat/secret-op-scope-string branch from da209d3 to 94b6612 Compare March 8, 2022 09:19
@nightkr
Copy link
Member

nightkr commented Mar 8, 2022

Hm... I'm a bit inclined to think that I'd rather either like to express this in a more YAML/serde-native way immediately, something like:

bindCredential:
  secretClass: foo
  scope:
  - pod: {}
  - service: bar

Or just upstream the scope decoding logic from the secret operator. The comma-separated list is "just" a consequence of the CSI stuff only allowing a string-to-string map for options, not because that's actually a good API when given some more freedom.

@sbernauer
Copy link
Member Author

sbernauer commented Mar 8, 2022

Ok, so we then modify the AuthenticationClass CRD to something like this?

apiVersion: authentication.stackable.tech/v1alpha1
kind: AuthenticationClass
metadata:
  name: myldap
spec:
  protocol:
    ldap:
      hostname: ldap.server
      port: 389
      domain: domain.local
      bindCredentials:
        secretClass: superset-with-ldap-ldap-bind
        scope:
          node: {}
          pod: {}
          services:
            - myservice

@sbernauer
Copy link
Member Author

Going to close this, as we agreed on adopting the CRD

@sbernauer sbernauer closed this Mar 8, 2022
@sbernauer sbernauer deleted the feat/secret-op-scope-string branch April 27, 2023 11:32
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

Successfully merging this pull request may close these issues.

2 participants