Illustration Image

Cassandra.Link

The best knowledge base on Apache Cassandra®

Helping platform leaders, architects, engineers, and operators build scalable real time data platforms.

2/9/2018

Reading time:1 min

vgkowski/cassandra-operator

by John Doe

Readme.md Kubernetes version: 1.9This operator use the kubernetes code-generator forclientset: used to manipulate objects defined in the CRD (cassandraCluster)informers: cache for registering to events on objects defined in the CRDlistersdeep copyInitialize the dependancies with dep init in the project root directoryClone the code-generator repo in the vendor/k8s.io directory.Be careful of cloning the branch matching the Kubernetes versiongit clone -b <branch> https://github.com/kubernetes/code-generatorRun the script vendor/k8s.io/code-generator/generate-groups.sh all github.com/vgkowski/cassandra-operator/pkg/client github.com/vgkowski/cassandra-operator/pkg/apis cassandra:v1Currently the relationship between native Kubernetes objects and CassandraClusters is done with the name which is equal.For multiple resources of the same type (services for instance) a postfix is added to the name ("-internode" for internode service and "-access" for access service)A better option would be to use the metadata.ownerReference but it requires to search and get objects by this reference instead of by name.For indexed objects like Pods or PVCs the search and get is done through the label CassandraCluster which contains the name of the clusterImplement proper Cassandra admin logic (current code isn't working)

Illustration Image

Readme.md

Kubernetes version: 1.9

This operator use the kubernetes code-generator for

  • clientset: used to manipulate objects defined in the CRD (cassandraCluster)
  • informers: cache for registering to events on objects defined in the CRD
  • listers
  • deep copy
  1. Initialize the dependancies with dep init in the project root directory
  2. Clone the code-generator repo in the vendor/k8s.io directory. Be careful of cloning the branch matching the Kubernetes version git clone -b <branch> https://github.com/kubernetes/code-generator
  3. Run the script vendor/k8s.io/code-generator/generate-groups.sh all github.com/vgkowski/cassandra-operator/pkg/client github.com/vgkowski/cassandra-operator/pkg/apis cassandra:v1
  • Currently the relationship between native Kubernetes objects and CassandraClusters is done with the name which is equal. For multiple resources of the same type (services for instance) a postfix is added to the name ("-internode" for internode service and "-access" for access service) A better option would be to use the metadata.ownerReference but it requires to search and get objects by this reference instead of by name. For indexed objects like Pods or PVCs the search and get is done through the label CassandraCluster which contains the name of the cluster
  • Implement proper Cassandra admin logic (current code isn't working)

Related Articles

cloud
kubernetes
datastax

DataStax Hyper-Converged Database: The Future of Data Infrastructure Is Here | DataStax

Patrick McFadin

7/11/2024

cassandra
kubernetes

Checkout Planet Cassandra

Claim Your Free Planet Cassandra Contributor T-shirt!

Make your contribution and score a FREE Planet Cassandra Contributor T-Shirt! 
We value our incredible Cassandra community, and we want to express our gratitude by sending an exclusive Planet Cassandra Contributor T-Shirt you can wear with pride.

Join Our Newsletter!

Sign up below to receive email updates and see what's going on with our company

Explore Related Topics

AllKafkaSparkScyllaSStableKubernetesApiGithubGraphQl

Explore Further

cassandra