Commit Graph
69 Commits
Author SHA1 Message Date
Travis Nielsen 176c10f7ad build: set release version to v1.8.4
With the patch release we update the example manifests to v1.8.4.
At the same time the upgrade tests are updated to use the latest
v1.7.11.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-02-03 15:46:30 -07:00
Travis Nielsen ddc86b8416 Merge pull request #9666 from rook/mergify/bp/release-1.8/pr-9665
csi: bump csi snapshotter image to v5 (backport #9665)
2022-01-27 13:08:31 -07:00
Travis Nielsen 6ca7da2bb2 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>
(cherry picked from commit 3e4edc0f1d)
2022-01-27 12:14:05 -07:00
Madhu Rajanna 954624b5fa helm: add annotations and labels for VSC
add support to specify annotations and
labels for the volumesnapshotclass.

closes: #9655

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 08dadaa486)
2022-01-27 18:52:22 +00:00
Madhu Rajanna 1d7fea8f52 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>
(cherry picked from commit cf46615688)
2022-01-27 09:32:45 -07:00
Mathieu Parent 2cd55d7bd6 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>
(cherry picked from commit 88a449d09c)
2022-01-27 09:05:16 -07:00
Radoslaw Zarzynski 98e9fe0fbc 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>
(cherry picked from commit 17ca41f557)
2022-01-26 16:27:51 +00:00
Travis Nielsen beec916f00 helm: fix linter issue with end tag
Recent versions of helm are failing the linter on the end tag
if the tag is "{{- end -}}". Instead, the correct end tag
is "{{- end }}".

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit b1a0918d0e)
2022-01-24 23:47:36 +00:00
Travis Nielsen c0e46c5721 build: update the release version to v1.8.3
With the patch release the example manifests and docs are updated to v1.8.3

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-21 11:57:49 -07:00
Madhu Rajanna 64641a6ce8 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>
(cherry picked from commit 39825f2302)
2022-01-21 18:30:10 +00:00
yati1998 aadd5f7ef8 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>
(cherry picked from commit 07c5fc7e46)
2022-01-21 14:17:14 +00:00
Travis Nielsen 7470e51d5b helm: apply operator settings in configmap instead of deployment
Some operator settings can be applied dynamically in a configmap
instead of requiring the operator to restart. While these settings
may be infrequently updated, applying these settings in the configmap
can avoid an unnecessary operator restart. This will also make the
operator deployment more consistent with the non-helm install.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 741f211a13)
2022-01-20 22:38:33 +00:00
Satoru Takeuchi c8c0639704 Merge pull request #9611 from rook/mergify/bp/release-1.8/pr-9502
core: support priority class for crashcollector (backport #9502)
2022-01-20 03:43:22 +09:00
Satoru Takeuchi 638741890c 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>
(cherry picked from commit 5465481e0b)
2022-01-19 17:39:28 +00:00
Madhu Rajanna 6e45d4730a csi: add support to create volumesnapshotclass
add support for helm charts to create default
volumesnapshotclass for cephfs and rbd

fixes: #9566

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 85dc212704)
2022-01-19 17:00:33 +00:00
mergify[bot] 960bb7fcc8 Merge pull request #9607 from rook/mergify/bp/release-1.8/pr-9547
mon: add annotation to mon secret and cm (backport #9547)
2022-01-19 15:15:29 +00:00
subhamkrai 2e0c595d33 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>
(cherry picked from commit 02d43e82e0)
2022-01-19 14:51:31 +00:00
yati1998 d229cd4c8d 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>
(cherry picked from commit c559bbdf6b)
2022-01-19 14:43:50 +00:00
mergify[bot] 634bc47a62 Merge pull request #9600 from rook/mergify/bp/release-1.8/pr-9571
csi: Add osd blocklist capabilities to the external cephcluster (backport #9571)
2022-01-18 21:33:05 +00:00
yati1998 a399615828 csi: implement csi-addons sidecar
This commit implements the csi-addons sidecar.

Signed-off-by: yati1998 <ypadia@redhat.com>
(cherry picked from commit 2b92dc812c)
2022-01-18 16:55:25 +00:00
parth-gr 17099f56f2 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>
(cherry picked from commit 7e851f15c6)
2022-01-18 16:43:04 +00:00
Jiffin Tony Thottan f732a12c9d 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>
(cherry picked from commit e90c36f255)
2022-01-18 15:03:26 +00:00
Humble Chirammal b94b6cc84d 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>
(cherry picked from commit b7584f3007)
2022-01-18 11:17:07 +00:00
Humble Chirammal 3eb97c8c6b csi: update ceph csi images to release 3.5.0
Signed-off-by: Humble Chirammal <hchiramm@redhat.com>
(cherry picked from commit e8d9884f05)
2022-01-18 11:17:07 +00:00
Henry Zhang f8b65671d3 helm: use operatorNamespace if exists for monitoring RBAC
right now the RoleBinding for monitoring is created with the cluster namespace as the subject
this causes the operator to loop on reconcile due to it not having permissions to create monitors
in the other cluster

moving the subject to the operator namespace fixes this

Signed-off-by: Henry Zhang <me@henry.dev>
(cherry picked from commit 3d89834ee4)
2022-01-11 15:07:51 +00:00
parth-gr 9e18ae5cfa 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>
(cherry picked from commit 4a3088c580)
2022-01-10 15:13:40 +00:00
parth-gr a6e56a640f 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>
(cherry picked from commit 6ed7423bac)
2022-01-10 15:13:39 +00:00
Blaine Gardner 0fef8b043f 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>
(cherry picked from commit 684fe30126)
2022-01-06 20:14:13 +00:00
Travis Nielsen ecb91628e2 build: update release version to v1.8.2
With the patch release the examples and docs are updated to v1.8.2

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-01-06 10:15:13 -07:00
Blaine Gardner 86c2301cfc 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>
(cherry picked from commit c07d89d9ea)
2022-01-04 18:04:06 +00:00
Sébastien Han 7c5d0ed3ee build: use the same csv name for all platforms
Recently with the directory renaming to "deploy/olm" the CSV name
changed from "ceph" to "olm". Now we are using the same "rook-ceph" name
regardless of the platform.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 7cf9285501)
2022-01-04 16:41:13 +00:00
Sébastien Han 21c6a89541 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>
(cherry picked from commit 6e9eb33782)
2021-12-21 17:24:36 +00:00
Daniel Ruiz Capilla be085276db 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>
(cherry picked from commit 66cc46220f)
2021-12-17 16:22:54 +00:00
subhamkrai 714bd30272 security: add dry run mode for external cluster script
Adding dry run mode for external cluster script.
This will add cli argument `--dry-run`. By default
`dry-run` option will be `False`
which means it will only print something like below.

```
Execute: 'ceph fs ls'
Execute: 'ceph fsid'
Execute: 'ceph quorum_status'
Execute: 'ceph auth get-or-create client.healthchecker mon allow r, allow command quorum_status,
	allow command version mgr allow command config osd allow rwx pool=default.rgw.meta, allow r pool=
	.rgw.root, allow rw pool=default.rgw.control, allow rx pool=default.rgw.log, allow x
	pool=default.rgw.buckets.index'
Execute: 'ceph mgr services'
Execute: 'ceph auth get-or-create client.csi-rbd-node mon profile rbd osd profile rbd'
Execute: 'ceph auth get-or-create client.csi-rbd-provisioner mon profile rbd mgr allow rw osd
	profile rbd'
Execute: 'ceph status'

```

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit c891ddb57d)
2021-12-17 08:46:20 +00:00
Blaine Gardner d27303a074 build: update examples and manifests for v1.8.1
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2021-12-16 13:41:52 -07:00
Yuichiro Ueno 0d3462b163 osd: add CAP_MKNOD to PSP
This commit adds CAP_MKNOD to PodSecurityPolicy to allow OSD-prepare job
creating pods under PSP-enabled Kubernetes cluster.

Signed-off-by: Yuichiro Ueno <ueno@preferred.jp>
(cherry picked from commit bae6351a39)
2021-12-16 17:57:53 +00:00
Travis Nielsen d9fc61c3f2 pool: allow configuration of built-in pools with non-k8s names
The built-in pools device_health_metrics and .nfs created by ceph
need to be configured for replicas, failure domain, etc.
To support this, we allow the pool to be created as a CR.
Since K8s does not support underscores in the resource names
the operator must translate this special pool name into
the name expected by ceph.

This also sets the basis for allowing filesystem data
pools to specify the desired pool name instead of requiring
a generated name.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 7ee9cc9d56)
2021-12-15 23:04:34 +00:00
Blaine Gardner 5ca0e752ef helm: add optional monitoring RBAC to operator chart
An older version of the Helm chart always installed RBAC permissions for
enabling monitoring. In an effort to reduce the privileges Rook uses by
default, they were removed. We need to still include the monitoring RBAC
optionally since the change could break some users.

Co-authored-by: Mathieu Parent <mathieu.parent@insee.fr>
Co-authored-by: Blaine Gardner <blaine.gardner@redhat.com>

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit e3be7a30ba)
2021-12-14 22:36:31 +00:00
mergify[bot] df6167d792 Merge pull request #9421 from rook/mergify/bp/release-1.8/pr-9276
pool: add rbd ec pool support in external cluster (backport #9276)
2021-12-14 21:22:08 +00:00
mergify[bot] 74bd6f0712 Merge pull request #9426 from rook/mergify/bp/release-1.8/pr-9296
file: allow to create CephFS dataPools with predefined names (backport #9296)
2021-12-14 18:29:49 +00:00
Denis Egorenko 07fb393fca file: allow to create CephFS data pools with predefined names
Add an ability to create data pools for CephFS with predefined
names.

Related-Issue: rook#9295
Signed-off-by: Denis Egorenko <degorenko@mirantis.com>
(cherry picked from commit 3ff681e81d)
2021-12-14 18:05:19 +00:00
parth-gr 2a891a8eef build: update the securityContext of direct mount container
update securityContext to runAsUser: 0
so container can run as a root user

Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit bc355c695e)
2021-12-14 10:57:50 -07:00
parth-gr dbe0346294 build: updating tini init command in direct mount toolbox
the tini have been removed but was still present at direct mount
used the bin/bash shell in place of tini

Closes: https://github.com/rook/rook/issues/9382
Signed-off-by: parth-gr <paarora@redhat.com>
(cherry picked from commit bd3e558c24)

# Conflicts:
#	deploy/examples/direct-mount.yaml
2021-12-14 17:54:44 +00:00
subhamkrai 881c0b6db3 pool: update the failure domain of pool-ec file to host
Updating the failure domain of pool-ec file from
osd to host.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit fc88e4ff8e)
2021-12-14 08:51:18 +00:00
subhamkrai 5fa5a01c9f pool: add rbd ec pool support in external cluster
Adding cli agrument `--rbd-metadata-ec-pool-name` to read
rbd ec pool name to support ec pool in external cluster
and also updating the json blob.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 22865815cf)
2021-12-14 08:51:18 +00:00
Lennart Hagemann 7ea4e1dc45 security: use correct osd tags for restricted caps
The create-external-cluster-resources.py with
--create-external-cluster-resources set to true
sets a wrong osd application tag. It should use
the fs name and not the fs pools.

Closes: https://github.com/rook/rook/issues/9227
Signed-off-by: Lennart Hagemann <lennart.hagemann@continum.net>
(cherry picked from commit 7507790375)
2021-12-13 14:44:57 +00:00
Travis Nielsen d757c6bf13 build: update the release version to v1.8.0
The minor release v1.8.0 is ready to go! This updates the
example manifests and documents to point to the latest
release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2021-12-09 12:52:49 -07:00
Omar Pakker fbe102d5ef helm: rook-ceph chart: Set up webhook cert volume
The 1.8 (beta) relies on a volume when using the admission controller,
which is missing from the Helm chart.
This change sets up the volume so the operators starts properly
when set up to run the admission controller.

Closes: https://github.com/rook/rook/issues/9349
Signed-off-by: Omar Pakker <Omar007@users.noreply.github.com>
(cherry picked from commit 5841077549)
2021-12-09 13:41:11 +00:00
Blaine Gardner bbcc1f2a5f nfs: make rados.namespace optional
Fix the CephNFS spec.rados API specifiation to be clear that spec.rados
is optional for all Ceph v16 versions, including that
spec.rados.namespace is optional.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit 0bbab6dfc9)
2021-12-09 00:00:24 +00:00
Blaine Gardner 400e39e994 nfs: remove poolConfig
Remove the poolConfig in CephNFS to prevent different CephNFS CRs from
contending to change the replication spec of the default NFS pool.

Resolves #9355

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit aaecc93315)
2021-12-08 22:35:47 +00:00