This is the final conversion to controller-runtime conversion. This time the
CephCluster CRD has been converted to use the controller-runtime
library.
The controller incorporates all the previous watchers too, so the Node
and hot-plug configmap are been watched too.
Only the operator setting configmap is not being watcher since it's not
related to the CephCluster CRD.
Not only the patch converts to controller-runtime but also tries to
re-organize the tree of the repo to actually make the code more
readable and have better functions/methods/tests separations.
Closes: https://github.com/rook/rook/issues/4939
Signed-off-by: Sébastien Han <seb@redhat.com>
Remove specific mds config added to the mon configuration database when deleting a CephObjectstore
or when scaling down number of mds
Also remove mds CephX key
Signed-off-by: n.fraison <n.fraison@criteo.com>
There are some code where constants of environment variables
are defined but not used properly. Let's avoid to use string
literals as possible.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Adding seccomp annotations to the PSP has made Kubernetes start choosing
the recommended Kubernetes "default" PSP over the Rook privileged PSP,
causing operator start errors. Append 00 (double zero) to the beginning
of the PSP name to make sure it is one of the first PSPs checked by
Kubernetes and will be matched before the "default" one.
Signed-off-by: Blaine Gardner <blaine.gardner@suse.com>
Some workflows are formatted as unordered lists. It's better to convert
these lists to ordered ones.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
When the metadataDevice is specified, it was a regression that it was
being interpreted also as a data device. ceph-volume was failing
when the metadataDevice was added as both a data and metadata device.
So we ensure it is not added to the list of data devices.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Currently, helm chart is little outdated and has differences with
example/common.yaml.
This commit modifies both manifests to use same resources.
Signed-off-by: binoue <banji-inoue@cybozu.co.jp>
The name of a CephCluster is commonly the same as the namespace,
but not always. When looking up the ceph cluster we can look for
the first one in the namespace rather than requiring the name
to be the same as the namespace.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The cluster-test.yaml example is useful for small test clusters
where only one mon is required and certain settings can be disabled
when not running in production.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
Use same method for the deletion of rgw CephX key and configuration in centralized mon database
when removing a CephObjectStore or scaling down number of rgw
Signed-off-by: n.fraison <n.fraison@criteo.com>
Remove specific rgw config added to the mon configuration database when deleting a CephObjectstore
or when scaling down number of rgw
Signed-off-by: n.fraison <n.fraison@criteo.com>
As another option to run Ceph commands, a script can be executed
with Ceph commands as if running in the toolbox, but will instead
run in a job where the logs can be collected and analyzed
separately. This would be useful where automation is in place to collect
information about the cluster periodically or upon some failure
that is detected, without requiring an interactive shell.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The toolbox script is used for configuring the toolbox. If the
mons are to fail over while the toolbox is running, the new
list of mons needs to be updated. However, if run temporarily
as a one-time job, the script only needs to initialize the
ceph.conf and then exit.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The documentation on the Ceph ObjectBucketClaim CRD
erroneously states that the generated Secret resource
contains keys `ACCESS_KEY_ID`, `SECRET_ACCESS_KEY`.
According to ceph-object.md, and when mounting the secret
into a container via secretRef, or inspecting it with kubectl,
the variables have an `AWS_` prefix.
Like so: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY`.
This commit adds the `AWS_` prefix to both keys.
Signed-off-by: Richard Patel <me@terorie.dev>
cephcsi v2.1.0 is released and doesnot need any deployment
template changes. This PR updates the cephcsi image
version to v2.1.0
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
Currently, we need to configure the Ceph external Admin keyi
in the Rook deployment to be able to connect to an external Ceph cluster.
If we wanted to run in a multi-tenant fashion
were several K8s/Rook clusters wanted to connect to the same external ceph cluster,
each K8s deployment would have the access to the External Ceph Admin key
and could potentially access or delete the Data
from pools that belong to other k8s/Rook Clusters.
Now the admin key is optional but the helper script create-external-cluster-resources.sh
will help create the necessary keys/users to connect to that cluster.
Closes: https://github.com/rook/rook/issues/4917 and https://github.com/rook/rook/pull/5227
Signed-off-by: Sébastien Han <seb@redhat.com>
The mgr modules take some time to configure during every reconcile loop.
The OSDs were waiting until the mgr module config was completed. Since
the mgr module config is optional or at least not critical to the rest
of the reconcile we can do it in parallel.
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
The integration test certainly fails with linux kernel v4.4.x, the default
kernel of Ubuntu 16.04. It succeeds with the linux kernel v4.8.x that can be
got by apt-get. Let's declare this as the desired version.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
The device name for OSD is fixed to /dev/xvdc. It works fine in the CI.
However, the name would be different in the developer's local environment.
Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
Refactor the StartTestCluster method to make it more readable.
I have put most of the parameters used in this function in the struct.
In this way the call to this function is more easy to understand and to use.
The addition of new parameters to this method started to be annoying.
[test ceph]
Signed-off-by: Juan Miguel Olmo Martínez <jolmomar@redhat.com>