Bringing together the Apache Cassandra experts from the community and DataStax.

Want to learn? Have a question? Want to share your expertise? You are in the right place!

Not sure where to begin? Getting Started

 

question

lib avatar image
lib asked Erick Ramirez edited

How do I specify my own superuser secret with the cass-operator?

hi i am installing Cassandra cluster with cass operator and i am using auth as my own secret , as below

spec:
  clusterName: jaeger-backend
  serverType: cassandra
  serverVersion: 3.11.11
  managementApiAuth:
    insecure: {}
  size: 3
  storageConfig:
    cassandraDataVolumeClaimSpec:
      storageClassName: premium-rwo
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 20Gi
  auth:
    superuser:
      secret: cassandra-admin-creds

and as per docs the super user need to be created using this secret , but for some reason the default super user is being created not the one i gave via secret

cass-operator
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

1 Answer

john.sanda_194109 avatar image
john.sanda_194109 answered Erick Ramirez edited

It should be:

spec:
  clusterName: jaeger-backend
  serverType: cassandra
  serverVersion: 3.11.11
  managementApiAuth:
    insecure: {}
  size: 3
  storageConfig:
    cassandraDataVolumeClaimSpec:
      storageClassName: premium-rwo
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 20Gi
  superuserSecretName: cassandra-admin-creds
2 comments Share
10 |1000 characters needed characters left characters exceeded

Up to 8 attachments (including images) can be used with a maximum of 1.0 MiB each and 10.0 MiB total.

Thanks ,I tired the above but this time there is no deployment at all apart from the cass operator deployment , my yaml file is as below

apiVersion: cassandra.datastax.com/v1beta1
kind: CassandraDatacenter
metadata:
  name: dc1
spec:
  clusterName: cluster1
  serverType: cassandra
  serverVersion: 3.11.11
  managementApiAuth:
    insecure: {}
  size: 1
  storageConfig:
    cassandraDataVolumeClaimSpec:
      storageClassName: standard
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 20Gi
  superuserSecretName: cassandra-admin-creds
  config:
    cassandra-yaml:
      authenticator: org.apache.cassandra.auth.PasswordAuthenticator
      authorizer: org.apache.cassandra.auth.CassandraAuthorizer
      role_manager: org.apache.cassandra.auth.CassandraRoleManager
    jvm-options:
      initial_heap_size: 800M
      max_heap_size: 800M

please advise

0 Likes 0 ·

if i remove

  superuserSecretName: cassandra-admin-creds

the deployment is successful with cluster1-superuser and i can cqlsh to cluster and it all works fine, but what i am after is to manage this super user credentials externally via k8s secrets and then i can easily pass this to other apps (eg jaeger)

0 Likes 0 ·