The sidecar now has a control loop, which watches its ClusterIP
Service for the `cassandra.rook.io/decommissioned` label.
If it finds it, then it decommissions and updates the label to
value "true".
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
RackConditions are observations about a Cassandra Rack.
Currently, the only condition is MemberLeaving.
Conditions are an api convention of kubernetes.
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
We add a new label to our constants, called
`cassandra.rook.io/decommissioned`. When it is present on a
member's ClusterIP Service with the value "false", it expresses
the intent of the controller to decommission the member. When it is
present with the value "true", it means that decommission has completed.
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
In order to have Ceph updates working for Rook release v0.9, apply a
simple, temporary solution to update the mons without extraneous mon
updates.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
Implementation of the cassandra sidecar logic.
This sidecar helps us inject our custom values during startup
and provides HTTP liveness and readiness checks.
In the future it will also be used for:
- Shutting Down / Decommissioning a cassandra instance
- Backups
- Restores
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
Control logic for the cassandra controller.
The controller exists in a separate StatefulSet, watches
Kubernetes Objects for changes and acts on those changes to
achieve the desired state.
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
Scaffolding of a Kubernetes controller using the informer-workqueue
pattern.
Dockerfiles and Makefiles to build the cassandra operator image.
Manifests to deploy the Cassandra operator and create a Cluster CRD.
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
Edited codegen.sh to include cassandra.
Then, run make codegen to generate the rest of the files.
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
API types for Cassandra have been added under /pkg/apis/cassandra.rook.io/types.go
Other files are some necessary boilerplate.
Signed-off-by: Yannis Zarkadas <yanniszarkadas@gmail.com>
Introduce mount security mode for basic multi tenancy
Fixes#2164.
This adds three new parameters/options to StorageClass/flexvolume entry:
* `mountUser`
* `mountSecret`
* `mountSecretNamespace`
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
Verify that the expected deployments are updated in the Ceph mgr,
and mds unit tests.
This also allows those unit tests to pass at all since
UpdateDeploymentAndWait was blocking the unit tests from finishing due
to unexpected behavior of generated `Deployment.Update` unit test mock.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
Use the `UpdateDeploymentAndWait` method used by the osd operator to
update the deployments for mgrs, mdses, and rgws when the Rook
orchestrator image is updated.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
design/external-management.md says that we should allow specifying
Filesystems that have no pools. When this is done, the CRD should
interepret that as a request to just manage the MDS daemons without
creating a new filesystem.
Don't fail the verification if there are no data pools in the spec,
and just skip creating a new filesystem if that's the case.
Also, add a testcase for this usage.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
This seems a bit misplaced, since CreateFilesystem is all about
doing the initial setup of the filesystem, and the daemons are
managed in a different block of code.
In a later patch, we're going to want to allow the CRD to spin
up MDS' for filesystems that already exist. Lift the code that
sets the MDS count into the caller.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
We can attempt to get knowledge of nodes from Rook's
configmaps, but going direct is useful for usability in the Ceph UI: users
should be able to distinguish between "node doesn't exist"
and "node exists but Rook is unaware of it".
Signed-off-by: John Spray <john.spray@redhat.com>