Commit Graph
1082 Commits
Author SHA1 Message Date
Travis Nielsen 0591753673 docs: update master doc links to latest
With the renaming of master docs to latest, all the links also
need to be updated.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-09-22 12:41:32 -06:00
Madhu Rajanna ed5f281a74 ceph: make provisioner replicas configurable
added new option to set the provisioner replicas.
with this new option the user/admin can choose
how many replicas he want for provisioner pod if
number of nodes is greater than 1.

fixes #8153

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-09-22 11:24:53 +05:30
Sébastien Han 470fbfd341 Merge pull request #8743 from leseb/next-pacific
ceph: use next ceph v16.2.6 pacific version
2021-09-21 16:41:45 +02:00
Sébastien Han 0c33493f27 ceph: bump manifests to ceph pacific 16.2.6
New version is out so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-21 09:16:32 +02:00
Sébastien Han a8c3b363ee ceph: export security context constraints
Rook now exports both ceph and csi SCCs to run on openshift so any
program pulling rook can inject the right SCCs.
In the meantime, default SCC has been reinforced to be less permissive.
Documentation has been reworked and a new path for openshift
installations has been created. Rook still provides the YAML files for
manual installations.

Closes: #8713
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-20 17:54:48 +02:00
Sébastien Han ae291afb2f ci: force a particular ceph version
Let's force v16.2.5 since the CI is broken with 16.2.6. This gives us
time to continue to merge work and work on fixing deployments with
16.2.6 in parallel.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-17 15:28:48 +02:00
Blaine Gardner 83c05324ce ceph: remove unused crd permission from roles
Remove unused ability to modify CRDs from Rook cluster roles. Rook (as
an operator) should not have the ability to modify CRDs used by the
components it controls.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-09-14 12:52:06 -06:00
subhamkrai 284dbc0a0e build: use pkg/operator/ceph/csi/spec.go for csi images
it has happened more than once that the manifests do not
reflect the images so now reading from `pkg/operator/ceph/csi/spec.go`
as this what code uses.

Closes: https://github.com/rook/rook/issues/8687
Signed-off-by: subhamkrai <srai@redhat.com>
2021-09-13 17:16:52 +05:30
Blaine Gardner 94eb4519a0 Merge pull request #8596 from subhamkrai/offline-installation
ci: image list for offline installation
2021-09-09 13:53:49 -06:00
Sébastien Han 3c1c3409b1 Merge pull request #8668 from Muyan0828/fix/osd-full-alert-query
ceph: fix CephOSDCriticallyFulla and CephOSDNearFull Alert Query
2021-09-09 19:01:06 +02:00
chengli f2c9793fca ceph: fix CephOSDCriticallyFulla and CephOSDNearFull Alert Query
Add hostname to CephOSDCriticallyFull and CephOSDNearFull rules's expr

Signed-off-by: chengli <chengli@alauda.io>
2021-09-09 21:58:14 +08:00
Blaine Gardner 5b0785dde0 Merge pull request #8211 from thotz/enhancecephuser
ceph: add options for cephobjectstore user
2021-09-08 11:57:25 -06:00
subhamkrai 7bc9a138f2 ci: image list for offline installation
create file tests/scripts/rook-ceph-image.txt which
will have list of images required for offline installation.

Closes: https://github.com/rook/rook/issues/6406
Signed-off-by: subhamkrai <srai@redhat.com>
2021-09-08 19:52:05 +05:30
Jiffin Tony Thottan ca43800119 ceph: add options for cephobjectstore user
Adding options for quota, bucket limit, caps for the
`cephobjectstoreuser`.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2021-09-07 22:43:09 +05:30
Anmol Sachan a1efcd7617 ceph: fix CephMonQuorumAtRisk Alert Query
The updated query will work for single mon deployment and will work better for
deployments with five or more mons.

Signed-off-by: Anmol Sachan <anmol13694@gmail.com>
2021-09-07 21:27:45 +05:30
injninja fd158de68d docs: fix typo on cluster crd in kubernetes example
I fixed a generic version typo (v14 instead of v16) to keep the CRD description up to date

Signed-off-by: kubealex <al.rossi87@gmail.com>
2021-09-05 17:58:00 +02:00
Travis Nielsen 849f434a79 ceph: only allow up to 9 mons to be specified
Typical clusters only require 3 or maybe 5 mons. If someone really wants
to go crazy they can add more mons, but over 9 mons really should not be
used.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-09-03 07:43:41 -06:00
Travis Nielsen 1cb97574ea ceph: allow an even number of mons
While an even number of mons can cause lower availability of
mon quorum, it also can provide higher durability for the cluster.
Mon quorum can be restored from a single mon according to the
disaster recovery guide, so there may be scenarios where
an even number of mons may be preferable.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-09-03 07:43:32 -06:00
Sébastien Han ab166742c5 ceph: avoid double reconcile with default value
When setting a default values with kubebuilder flags it seems that the
kube operator intercepts the API call, mutate the CR and inject it.
This results in two events, one for creation and one for edition and we
end up with 2 reconciles. Let's avoid this.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-09-02 13:49:52 +02:00
Blaine Gardner 1b1736a3c5 ceph: remove NFS and Cassandra example manifests
Additionally remove NFS and Cassandra from CRD generator script.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-31 14:05:34 -06:00
Arun Kumar Mohan 888d4ea706 ceph: making script backward compatible with python2
Variable name `exec`, was raising an error with python2.
Renamed it to `execErr`.

Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2021-08-31 19:40:32 +05:30
Sébastien Han 41e915d411 Merge pull request #8493 from leseb/admission-controller
ceph: move the admission webhook to the operator
2021-08-25 09:30:54 +02:00
Sébastien Han 656dd0f334 ceph: move the admission webhook to the operator
Our admission webhooks will now run as part of the Operator container
and not an additional deployment. This has the advantage of consuming
fewer resources in the cluster and not having to manage affinities and
tolerations. This only drawback is that the Secret containing the
certificates is not mounted anymore and the content needs to be written
inside the Operator. This is not practical since we also need to watch
for the Secret content to change. Meaning that the certificates have
been renewed and the webhook server needs to use them.
A new approach is on its way to hopefully simplify this last issue and
implement a watcher for the Secret.
In the meantime, users need to use the cert-manager or renew
certificates manually. Additionally, they must update the
ValidatingWebhookConfiguration object with the new CA bundle.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 19:07:04 +02:00
Sébastien Han 579fc27783 ceph: embed ceph-csi templates in rook binary
Thanks to Golang 1.16, we can now embed files in the Go binary. This
means we don't need to add the CSI templates files to the container
image. They are added in the Go binary at build time.

The existing location of the template must be in the package calling it.
So they moved to pkg/operator/ceph/csi/template. All the files have been
symlinked back to cluster/examples/kubernetes/ceph/csi/template.

Closes: https://github.com/rook/rook/issues/7609
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-08-24 16:22:20 +02:00
Joseph Sawaya 331e06659e ceph: add permissions to rook-ceph-mgr role for osd removal
This commit adds permissions to the rook-ceph-mgr role
to delete PVCs and deployments and patch deployment scale
to remove OSDs using `ceph orch osd rm` in the rook orchestrator.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
2021-08-19 16:43:01 -04:00
Travis Nielsen cf81799c77 Merge pull request #8546 from humblec/sa
ceph: use serviceAccountName as the key in ceph csi templates
2021-08-17 22:41:44 -06:00
Blaine Gardner 36c53fe6f3 ceph: make storage device config nullable
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-08-17 12:21:32 -06:00
Humble Chirammal dff0513750 ceph: use serviceAccountName as the key in ceph csi templates
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-08-17 09:40:12 +05:30
Ali Maredia 7a804ac27e ceph: tweak to types.go and additions after make crds
This commit will be squashed.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2021-08-11 13:25:44 -04:00
Ali Maredia 7b8d3fd27b ceph: change required pattern for pull realm endpoint
Ensure that the endpoint for the pull realm spec
starts with "http" or "https". Also update
object-multisite-pull-realm(-test).yaml with
updated comments.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2021-08-11 13:25:44 -04:00
Ali Maredia b6404ae2ab ceph: rgw multisite intgration testing
This test:
- starts up 2 minikube clusters
- create 2 ceph clusters
- creates object multisite CRDs on each cluster and
syncs the clusters
- writes an object to cluster 1 and reads it on
cluster 2

This commit also adds new functions in
github-action-helper.sh that aid in the multisite
test and the multi cluster mirroring test.

Signed-off-by: Ali Maredia <amaredia@redhat.com>
2021-08-11 13:25:43 -04:00
Denis Egorenko fb04908315 ceph: add ability to specify ca bundle for rgw
Specify ca Bundle for RGW spec and mount inside pods.

Related-Issue: https://github.com/rook/rook/issues/8490
Signed-off-by: Denis Egorenko <degorenko@mirantis.com>
2021-08-10 23:18:26 +04:00
Satoru Takeuchi cf106c8e56 ceph: fix example of cluster on local pvc
`cluster-on-local-pvc.yaml` doesn't work due to missing topologyKey.
In addition, it's better to add the example of `topologySpreadConstraints`
for K8s >= 1.18 users.

Closes: https://github.com/rook/rook/issues/8478

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-08-05 12:29:40 +00:00
Travis Nielsen cc16b60f5f Merge pull request #8381 from subhamkrai/osd-placement-merge
ceph: add an option to enable/disable merge all placement
2021-08-04 07:23:33 -06:00
subhamkrai 9838313398 ceph: add an option to enable/disable merge all placement
earlier, we had the issue for osd placement regarding
whether we should merge the placements or not.

Now, we have option `skipApplyAllPlacement` to
enable/disable osd placement. By default it is false
which means it will merge both placement.All() and
storageClassDeviceSets.Placement, when true
it will only apply storageClassDeviceSets.Placement.

Also, adding unit test.

Closes: https://github.com/rook/rook/issues/8135
Signed-off-by: subhamkrai <srai@redhat.com>
2021-08-03 19:47:40 +05:30
Humble Chirammal 8034a4ef98 ceph: set default FsGroupChangePolicy value to 'None'
The `None` value Indicates that volumes will be mounted
with no modifications, as the CSI volume driver does not
support these operations. While volumes are provisioned
by the CephFS CSI driver the global permissions are set
on the volume and we dont expect the Fsgroup policy or
check from CO side  to play a role here.

Ref #ceph/ceph-csi/../internal/cephfs/nodeserver.go#L190

```
!csicommon.MountOptionContains(fuseMountOptions, readOnly) {
		// #nosec - allow anyone to write inside the stagingtarget path
		err = os.Chmod(stagingTargetPath, 0o777)
```

The current default value ie `ReadWriteOnceWithFSType` cause
volumes to be examined to determine if volume ownership and permissions
should be modified to match the pod's security policy. Changes could occur
if the fsType is defined and the persistent volume's accessModes contains
ReadWriteOnce.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2021-08-03 16:54:10 +05:30
Madhu Rajanna b556dbf109 ceph: update cephcsi to v3.4.0
This PR updates the required RBAC, templates,
CSI image version and examples for new
cephcsi v3.4.0 release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2021-08-02 10:22:54 +05:30
Satoru Takeuchi 2218c53fda Merge pull request #8403 from cybozu-go/ceph-dont-remove-pvc-in-osd-purge-job
ceph: add an option to preserve pvc in osd purge job
2021-07-30 01:04:28 +09:00
Satoru Takeuchi 89b6a6028c ceph: add an option to preserve pvc in osd purge job
Sometimes we want to investigate a PVC for removed OSD.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-07-29 14:20:06 +00:00
Travis Nielsen f5030f0560 ceph: remove old references to mimic version
References to luminous and mimic, and unnecessary references to nautilus
were found in the docs that have been cleaned up and clarified. At the same
time, the tests are updated to use more recent versions.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-28 14:00:35 -06:00
Sébastien Han a62e7e75e7 Merge pull request #8380 from sp98/update-cephblockpool-cr
ceph: add mirroring peer specification to CephBlockPool CRD
2021-07-28 17:34:52 +02:00
Santosh Pillai 3b50f5fd00 ceph: add MirroringPeerSpec to CephBlockPool.Spec.Mirroring
Instead of having the RBDMirroringPeerSpec in the RBDMirror CRD we want
to move it on the CephBlockPool CRD so that each pool can have its own peer.
This enables pool to re-use an existing peer secret if it points to the
same cluster peer.So we don't need to duplicate secret peer anymore.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2021-07-28 17:47:36 +05:30
Travis Nielsen 6dcc60173a Merge pull request #8347 from josephsawaya/rook-ceph-mgr-role-changes
ceph: update rook-ceph-mgr-cluster role rules to include PV and SC
2021-07-27 11:22:31 -06:00
Satoru Takeuchi 30e4fbb01f ceph: make the timeout of ceph commands cofigurable
Sometimes the default 15s is not enough for timeout of ceph commands. For examples,
I encountered that `radosgw-admin` command took dozens of seconds under heavy load.

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2021-07-27 12:42:16 +00:00
Joseph Sawaya 1ddc390d1e ceph: update rook-ceph-mgr-cluster role rules to include PV and SC
Since we changed the Rook orchestrator module for Ceph, it now has
to access Storage Classes and Persistent Volumes in the cluster to
gather inventory and create OSDs so we have to make changes to the
rook-ceph-mgr-cluster role so the orchestrator has permission to
access these resources.

Signed-off-by: Joseph Sawaya <jsawaya@redhat.com>
2021-07-26 13:42:21 -04:00
Timothy Asir Jeyasingh 8426f63404 ceph: add ceph dashboard link
Ceph dashboard link will be used for the
external cluster in OCS.
Ignore error handling.

Signed-off-by: Timothy Asir Jeyasingh <tjeyasin@redhat.com>
2021-07-26 19:00:16 +05:30
Sébastien Han 0811359d28 Merge pull request #8358 from leseb/move-to-quay
ceph: move all of our docker.io reference to quay.io
2021-07-23 18:03:53 +02:00
Sébastien Han 6bce1ff3e9 ceph: move all of our docker.io reference to quay.io
Recently, the builds of `ceph/ceph` image moved to quay.io, see
https://github.com/ceph/ceph-build/pull/1883 for more details.
Current images will remain but new builds will happen on quay.io only.

This means that tags such as `v14.2`, `v15.2`,`v16.2` will need to
switch to quay.io to get updates.

Signed-off-by: Sébastien Han <seb@redhat.com>
2021-07-22 11:17:05 +02:00
n.fraison f7bc76abad ceph: define specific ServceAccount/RBAC for ceph osd purge job
Currently ceph osd purge job rely on rook-ceph-system service account which is only created
on the rook operator namespace
When multiple clusters are deployed on distinct namespace the ceph osd purge failed to run
as the service account is not available
Creating a specific service account rook-ceph-purge-osd with appropriate rights on each cluster
namespace and operator namespace to still manage case where cluster is installed
along side the operator

Signed-off-by: n.fraison <n.fraison@criteo.com>
2021-07-22 00:25:32 +02:00
Travis NielsenandNicolaj Græsholt f114db952b nfs: generate the crds from types for v1
The CRDs v1 requires the full schema for all settings, so we now
generate the CRDs for nfs for full fidelity of all settings.

Co-authored-by: Nicolaj Græsholt <figaw@hotmail.com>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-07-20 08:18:05 -06:00