Commit Graph
75 Commits
Author SHA1 Message Date
Sébastien Han 1a78fbac67 Merge pull request #9732 from subhamkrai/split-code-and-unit-test
core: split external script unit test and main code in diff file
2022-03-07 15:09:28 +01:00
Travis Nielsen bc9914e99d mgr: set the default count of mgr daemons to 2
To ensure the mgr is not the single point of failure, the mgr
daemon count is now set to 2 by default in the cluster examples.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-02 13:35:05 -07:00
Travis Nielsen 08aed0213c Merge pull request #9567 from Madhu-1/fix-9220
csi: add custom ceph.conf for csi pods
2022-03-01 08:19:02 -07:00
Madhu Rajanna 2076a3c788 csi: add custom ceph.conf for csi pods
Currently, the admin/user can configure the ceph.conf
for daemon pods using https://rook.io/docs/rook/v1.7/
ceph-advanced-configuration.html#custom-cephconf-settings.
This the above custom ceph.conf is only for ceph pods.
the support to provide constom ceph.conf for cephcsi
is added in cephcsi PR 2476

This PR adds the support to create/update
ceph.conf for csi pods.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-03-01 12:42:59 +05:30
Travis Nielsen a98678585a build: update ceph base image to v16.2.7-20220216
The latest ceph image should be used for the base of
the rook image to pick up the latest security releases.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-28 11:21:49 -07:00
Travis Nielsen c8e68511ce Merge pull request #9804 from travisn/cleanup-metadata-pvcs
osd: Purge job will remove all pvcs for the osd
2022-02-28 11:08:38 -07:00
Travis Nielsen ba165ec121 Merge pull request #9729 from humblec/final-fsgroup
csi: default to ReadWriteOnceWithFSType for cephfs
2022-02-25 07:44:46 -07:00
Travis Nielsen b3ca0f1b87 osd: purge job will remove all pvcs for the osd
The purge job is intended to clean up all the resources
related to an OSD that is to be removed. An OSD with
a metadata, wal, and data PVC was only cleaning up the
data PVC. Now the metadata and wal PVCs will also be
cleaned up.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-24 12:05:15 -07:00
subhamkrai 3e6aa9e556 core: split external script unit test and main code in diff file
split the external script main code and unit test in different file.

Closes: https://github.com/rook/rook/issues/9588
Signed-off-by: subhamkrai <srai@redhat.com>
2022-02-24 18:23:21 +05:30
Travis Nielsen a778d6737e Merge pull request #9794 from aruniiird/making-alert-timeout-and-alertdoc-timeout-same
monitoring: making alert firing timeout and the doc timeout same
2022-02-23 09:38:13 -07:00
Arun Kumar Mohan 054d009af6 monitoring: making alert firing timeout and the doc timeout same
Signed-off-by: Arun Kumar Mohan <amohan@redhat.com>
2022-02-23 21:15:09 +05:30
parth-gr 1679af4a02 mds: override mds startup liveness probes from CephFilesystem CR
Rook code allows overriding the probes for mds from the CephCluster,
but this should really come from the CephFilesystem CR.

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

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-22 20:36:40 +05:30
parth-gr 3e64525b62 csi: make use of common user creation method
refactor the code so we can use common csi user
creation method

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-16 10:29:34 +05:30
parth-gr 9b20b475cf csi: modify upgrade flag in external cluster
The upgrade function doesn't seem to be that smart
for now so it can update the new auth caps listed
with the existing one, it only compares the value of
the current cap with the MIN_USER_CAP_PERMISSIONS,

Modified the upgrade flag functionality so we can use
this while upgrading the cluster clients

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

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-16 10:29:34 +05:30
subhamkrai 5b49d36167 csi: add comment after namespace
adding comment after namespace to identify if
it cluster namespace or operator namespace.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-02-14 18:39:33 +05:30
Humble Chirammal 6561bdaf53 csi: default to ReadWriteOnceWithFSType for cephfs
```
ReadWriteOnceWithFSType: Indicates that volumes will be examined
to determine if volume ownership and permissions should be modified
to match the pod's security policy. Changes will only occur if the
fsType is defined and the persistent volume's accessModes contains
ReadWriteOnce.
```

In between considering we are giving 0777 permission on nodestage
of cephfs shares, we defaulted to NONE. However giving worldwide
permission to the volume is not the right thing and it has been
fixed in cephfs via https://github.com/ceph/ceph-csi/pull/2847

This commit brings it back to the value which is also in parity
with RBD driver.

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-02-11 17:25:21 +05:30
Travis Nielsen 8e8c95d342 Merge pull request #9702 from sathieu/registrar_v2.5.0
csi: bump registar image to v2.5.0
2022-02-10 08:59:30 -07:00
parth-gr 4f43f2d93e csi: make create and get process separate for csi users
Currently if we run external-script and user already exit,
it fails to create/run same user again if the caps are upgraded,
so we need to check first if user is already present.
And for upgrading user we can do upgrade after this
PR: https://github.com/rook/rook/pull/9609 will get merged.

Closes: https://bugzilla.redhat.com/show_bug.cgi?id=2048458

Signed-off-by: parth-gr <paarora@redhat.com>
2022-02-04 20:08:31 +05:30
Mathieu Parent 405dcaadac csi: bump registar image to v2.5.0
Upgrades image:

- k8s.gcr.io/sig-storage/csi-node-driver-registrar: v2.4.0 -> v2.5.0

Detailed changelog:

- https://github.com/kubernetes-csi/node-driver-registrar/blob/v2.5.0/CHANGELOG/CHANGELOG-2.5.md

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
2022-02-04 11:19:43 +01:00
Travis Nielsen 3e4edc0f1d csi: add patch permission to volumesnapshotcontents
The update to the snaphots 5.0 controller requires
rbac for patching the volumesnapshotcontents.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-27 11:35:06 -07:00
Madhu RajannaandMathieu Parent cf46615688 csi: bump csi snapshotter image to v5
updating the csi-snapshotter and dependencies
to v5.0.1 released version.

Co-authored-by: Mathieu Parent <mathieu.parent@insee.fr>
Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-01-27 21:17:51 +05:30
Mathieu Parent 88a449d09c csi: bump csi resizer and volume replication images
Upgraded images:

- k8s.gcr.io/sig-storage/csi-resizer: v1.3.0 -> v1.4.0
- quay.io/csiaddons/volumereplication-operator: v0.1.0 -> v0.3.0

Detailed changelogs:

- https://github.com/kubernetes-csi/external-resizer/blob/release-1.4/CHANGELOG/CHANGELOG-1.4.md
- https://github.com/csi-addons/volume-replication-operator/tree/v0.2.0
- https://github.com/csi-addons/volume-replication-operator/tree/v0.3.0

Signed-off-by: Mathieu Parent <mathieu.parent@insee.fr>
2022-01-26 17:38:53 +01:00
Radoslaw Zarzynski 17ca41f557 osd: allow for injecting extra env. variables via ConfigMap
This patch brings a mechanism to define arbitrary environment
variables in OSD containers (both prepare and main ones).
It bases on idea proposed by Sebastien Han to use an optional
`ConfigMap` instance named `aook-ceph-daemon-env-override`
as the source of these settings.

The need for the patch comes from the fact that, although
crimson finally exposes the same CLI interface as the classical
OSD, the broadly used development builds have ASan built in.
As ASan, by default, complains if it isn't the very first loaded
DSO, we need a way to set the `ASAN_OPTIONS` environment variable
to `verify_asan_link_order=0` to mitigate the early aborts.

Signed-off-by: Radoslaw Zarzynski <rzarzyns@redhat.com>
2022-01-26 15:17:27 +00:00
Madhu Rajanna 39825f2302 csi: update cephcsi to 3.5.1 release
This PR updates the cephcsi version from
3.5.0 to 3.5.1 which includes minor fixes

fixes: #9619

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-01-21 23:26:07 +05:30
yati1998 07c5fc7e46 csi: updates the default csi-addons image
This commit updates the csi-addons image version
from v0.1.0 to v0.2.1.
Also, this updates the staging path from
{{ .KubeletDirPath }}/plugins/kubernetes.io/csi/pv/ to
{{ .KubeletDirPath }}/plugins/kubernetes.io/csi/.

This changes is done as the reclaimspace on block mode
was not working.
For more details:
 https://github.com/csi-addons/kubernetes-csi-addons/pull/97

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-01-21 17:09:59 +05:30
Blaine Gardner d0d83edc5f Merge pull request #9502 from cybozu-go/core-support-priority-class-for-crashcollector
core: support priority class for crashcollector
2022-01-19 10:38:29 -07:00
Travis Nielsen 49c7ff0612 Merge pull request #9547 from subhamkrai/annotation-on-resources
mon: add annotation to mon secret and cm
2022-01-19 07:51:05 -07:00
Satoru Takeuchi 5465481e0b core: support priority class for crashcollector
Support priorityClass to crashcollectors as mons, mgrs, and osds.

https://rook.io/docs/rook/v1.8/ceph-cluster-crd.html#priority-class-names-configuration-settings

The main use case is applying the high priority to crashcollectors to preempt normal pods
under heavy load. Without this feature, we might lose crash information.

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

Signed-off-by: Satoru Takeuchi <satoru.takeuchi@gmail.com>
2022-01-19 13:54:03 +00:00
yati1998 c559bbdf6b csi: restrict csiaddons to use only 1 port
This commit restrict csiaddons to open only 1 port
as per the requirement which is required for security.

Fixes: #9604

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-01-19 12:07:46 +05:30
subhamkrai 02d43e82e0 mon: add annotation to mon secret and cm
add annotations to secrets and configmaps to use
different tools to sync secrets and configmap.
Currently, these annotation is applied only on
the `rook-ceph-mon-endpoints` configmap and
the secrets `rook-ceph-mon` and `rook-ceph-admin-keyring`.

Closes: https://github.com/rook/rook/issues/8999
Signed-off-by: subhamkrai <srai@redhat.com>
2022-01-19 10:15:17 +05:30
Sébastien Han c6ca35eea1 Merge pull request #9534 from yati1998/csi-addon
csi: implement csi-addons sidecar
2022-01-18 17:55:07 +01:00
Sébastien Han 46ef24b5c9 Merge pull request #9571 from parth-gr/external-cluster-osd-blocklist
csi: Add osd blocklist capabilities to the external cephcluster
2022-01-18 17:42:14 +01:00
yati1998 2b92dc812c csi: implement csi-addons sidecar
This commit implements the csi-addons sidecar.

Signed-off-by: yati1998 <ypadia@redhat.com>
2022-01-18 21:52:01 +05:30
Jiffin Tony Thottan e90c36f255 docs: update scaledobject.yaml for applicable with keda v2.5
Even though mention about keda 2.x version, the scaledObject.yaml or
rgw-keda.yaml referring to older keda CRs

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-01-18 18:57:28 +05:30
parth-gr 7e851f15c6 csi: add osd blocklist capabilities to the external cephcluster
The CSI users created by the external script(both for rbd and cephfs)
need the blocklist capability so the CSI pods can execute the
`osd blocklist` commands for metro DR
update the mon caps of csi users with `profile simple-rados-client-with-blocklist`
so they have privileges to run osd blocklist cmds

Closes: https://issues.redhat.com/browse/RHSTOR-2451

Signed-off-by: parth-gr <paarora@redhat.com>
2022-01-18 18:01:01 +05:30
Humble Chirammal b7584f3007 csi: update sidecar to the latest releases
Below sidecars are updated to the latest releases with this commit.

csi-provisioner      : 3.1.0
csi-attacher         : 3.4.0
node-driver-registrar: 2.4.0

Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-17 23:32:48 +05:30
Humble Chirammal e8d9884f05 csi: update ceph csi images to release 3.5.0
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
2022-01-17 23:32:45 +05:30
Blaine Gardner 3b415ea15a Merge pull request #9482 from yuvalif/ceph-cloudevent-topic
rgw: add HTTP CloudEvent endpoints to CephBucketNotification CR
2022-01-13 08:40:07 -07:00
Yuval Lifshitz c99e2a37fd rgw: add HTTP CloudEvent endpoints to CephBucketNotification CR
this add a configuration parameter that allows an RGW, from
Ceph Quincy (v17) and on, to send bucket notifications to an HTTP CloudEvents
endpoint.
Header format:
https://github.com/cloudevents/spec/blob/main/cloudevents/adapters/aws-s3.md

Signed-off-by: Yuval Lifshitz <ylifshit@redhat.com>
2022-01-13 12:08:40 +02:00
Sébastien Han 511c250336 Merge pull request #9411 from parth-gr/external-cluster-permission-security
security: update auth permissions for external cluster
2022-01-10 16:12:42 +01:00
parth-gr 4a3088c580 security: make cephfs_filesystem_name flag optional
cephfs_filesystem_name flag isn't mandatory if restricted_auth_permission
is on.

Signed-off-by: parth-gr <paarora@redhat.com>
2022-01-07 20:27:05 +05:30
Blaine Gardner 684fe30126 core: limit use of wildcards in cluster-scoped rbac
Rook needs to be able to watch all `ceph.rook.io` resources to reconcile
them; however, it does not need blanket verb privileges. Reduce the
privileges as much as possible.

Ideally, Rook would only have update permissions to status and
finalizers of resources; however, finalizers are not a full-fledged
subresource at this time, and "update" permissions must be maintained
for `ceph.rook.io` resources.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-01-05 17:10:14 -07:00
parth-gr 6ed7423bac security: update auth permissions for external cluster
Added a clusterName, poolName , filesystemName, radosNamespace
as a suffix on ceph auth principals for external cluster so
every csi authentication would be unique if
restricted_auth_permission flag is specified.

Closes: https://github.com/rook/rook/issues/9192
Signed-off-by: parth-gr <paarora@redhat.com>
2022-01-05 13:51:41 +05:30
Blaine Gardner 5b9ac16670 Merge pull request #9468 from BlaineEXE/startup-probes
core: rgw: allow specifying daemon startup probes
2022-01-04 11:03:12 -07:00
Blaine Gardner c07d89d9ea core: rgw: allow specifying daemon startup probes
Allow specifying daemon startup probes where we also allow configuring
liveness probes. Startup probes allow Rook to tolerate when Ceph daemons
occasionally take a long time to start up while not also making
Kubernetes liveness probes slower to detect runtime failures of daemons.

Startup probes are beta in Kubernetes 1.18, so we should not enable
probes by default for earlier Kubernetes versions.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-21 15:12:41 -07:00
Sébastien Han 6e9eb33782 subvolumegroup: add new crd
This introduces a new CRD to add the ability to create subvolumegroup
for a given ceph filesystem volume. Typically the name of the volume is
the name of the filesystem created by rook.

Closes: https://github.com/rook/rook/issues/7036
Signed-off-by: Sébastien Han <seb@redhat.com>
2021-12-21 16:28:38 +01:00
Travis Nielsen 54d3c09dc4 osd: add label to osd purge job
The label was on the job, but not on the pod template,
so querying for the pod logs was not working as simply
as if we added the label.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-17 15:00:45 -07:00
Travis Nielsen 4c45856edb Merge pull request #9441 from crd1985/master
ceph: fix blockOwnerDeletion error
2021-12-17 09:21:48 -07:00
Sébastien Han 97978b5d24 Merge pull request #9189 from subhamkrai/readonly-external-script
security: add dry run mode for external cluster script
2021-12-17 09:45:41 +01:00
Daniel Ruiz Capilla 66cc46220f rgw: fix blockOwnerDeletion error
This restores the missing permissions to allow the object controller to
update the finalizers section in the spec. See https://sdk.operatorframework.io/docs/faqs/

Signed-off-by: Daniel Ruiz Capilla <crd1985@gmail.com>
2021-12-16 09:36:21 +01:00