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

Replace secrets refs for the Cassandra pods with the mutating webhook #601

Closed
1 task
Tracked by #598
adejanovski opened this issue Jul 4, 2022 · 4 comments · Fixed by #943
Closed
1 task
Tracked by #598

Replace secrets refs for the Cassandra pods with the mutating webhook #601

adejanovski opened this issue Jul 4, 2022 · 4 comments · Fixed by #943
Labels
discuss done Issues in the state 'done'

Comments

@adejanovski
Copy link
Contributor

adejanovski commented Jul 4, 2022

Remove the secret mounts for Cassandra containers and replace them with injected secrets by the webhook.

Depends upon

  1. enhancement ready

┆Issue is synchronized with this Jira Task by Unito
┆friendlyId: K8SSAND-1620
┆priority: Medium

@sync-by-unito sync-by-unito bot changed the title Replace secrets refs for the Cassandra pods with a mutating webhook K8SSAND-1620 ⁃ Replace secrets refs for the Cassandra pods with a mutating webhook Jul 4, 2022
@adejanovski adejanovski changed the title K8SSAND-1620 ⁃ Replace secrets refs for the Cassandra pods with a mutating webhook Replace secrets refs for the Cassandra pods with the mutating webhook Jul 4, 2022
@burmanm
Copy link
Contributor

burmanm commented Jul 6, 2022

For background, cass-operator needs to support non-webhook installations also. And with my thinking, the multiple different secrets might have different injections (such as certificates from cert-manager and user information from Vault etc). Also, each user would probably need data from different vault secret or we might have different standards how the information should be mounted.

I'd like to see structure that we could follow in each application, that would allow defining different places where to get the information from. This example (not necessarily the exact structure we end up with, but an example) would allow defining a secretName, annotations or CSI information:

  superuser:
    annotations:
      c: b
    secretName: 
    mountPath:
    csi:
      driver: ..
  keystore:
    annotations:
      a: b

We need to define the same properties for all possible secrets that we might need to use. If annotations is set, the injection framework is assumed.

The mountPath is there, because in some cases the injection framework might be unable to inject it to our wanted destination. I think Vault at least wants them under /vault/secrets directory. So we need to know where it mounted the secret information. This can be omitted if we believe the annotations processor must be able to mount it to the destination we define.

@adejanovski
Copy link
Contributor Author

Thanks for the update, I totally missed the fact that webhook could be prohibited in some clusters.

The mountPath is there, because in some cases the injection framework might be unable to inject it to our wanted destination. I think Vault at least wants them under /vault/secrets directory. So we need to know where it mounted the secret information. This can be omitted if we believe the annotations processor must be able to mount it to the destination we define.

That's probably not necessary, at least with Vault. It has an annotation for that.
Let's keep it for now and see during implementation if it's relevant or not.

@jsanda
Copy link
Contributor

jsanda commented Jul 6, 2022

How do we deal with the webhook being prohibited in some clusters?

@adejanovski
Copy link
Contributor Author

By mounting the k8s secrets directly like we currently do. This kind of environment cannot be supported for Vault for example, unless we enable the use of the CSI driver.

@adejanovski adejanovski added ready-for-review Issues in the state 'ready-for-review' review Issues in the state 'review' and removed ready-for-review Issues in the state 'ready-for-review' labels May 17, 2023
@adejanovski adejanovski added done Issues in the state 'done' and removed review Issues in the state 'review' labels May 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discuss done Issues in the state 'done'
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants