Commit Graph
2661 Commits
Author SHA1 Message Date
FengJiankui f9620ad594 mon: quorumStatus.MonMap.Mons changed to quorumStatus.Quorum
The path use quorum instead of monMap to determine if there is enough mon. (bug #10165).

Signed-off-by: FengJiankui <fengjiankui@inspur.com>
(cherry picked from commit d335dc59eb)
2022-05-04 15:26:23 +00:00
Sébastien Han e1e89d5df2 osd: close the encrypted disk after cleanup is done
Once we are done cleaning up the content of the encrypted osd, let's
close the main LUKS device.
This avoids having dm devices on the system after the cleanup.

Closes: https://github.com/rook/rook/issues/10181
Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 6ef491d9fc)
2022-05-04 09:13:45 +02:00
Alexander Trost cf139d2fc8 rgw: fix dashboard admin creation for multiple object stores
Check the radosgw-admin realm user list per object store instead of relying
on the ceph dashboard get-rgw-api- command.

Resolves #9099

Signed-off-by: Alexander Trost <galexrt@googlemail.com>
(cherry picked from commit 5d03061d47)
Signed-off-by: Alexander Trost <galexrt@googlemail.com>
2022-04-27 20:08:26 +02:00
Sébastien Han 7503d1a558 core: fix csi-cephfsplugin pod restart on non-hostnetworking env
Implementation of the design proposed in
https://github.com/rook/rook/pull/9903.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 73b1347675)
2022-04-27 09:42:39 +00:00
Sébastien Han 4079a66a8d core: move clusterInfo code to the controller package
The CSI package needs to load clusterInfo, today this code is in the mon
package which makes the call of LoadClusterInfo impossible without
having a circular import.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 583791c45c)
2022-04-27 09:42:39 +00:00
Jiffin Tony Thottan 6edbd1bcb8 object: allocate keys for user after the creation
The access/secrets keys for the user struct need to allocate only if
ceph user creation succeeds.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit 60da73a786)
2022-04-26 22:06:04 +00:00
Travis Nielsen e4cc14f70d build: update min version to k8s 1.17
Support is removed for k8s for various limitations such as
priority classes not working and csi driver feature
incompleteness and missing snapshots. Documentation is updated
with the new min version of k8s 1.17 and also the tests are
updated to run on the min version of 1.17.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit d26b6cf403)
2022-04-26 13:02:34 -06:00
Sébastien Han fbca65c738 csi: update cephcsi to v3.6.1 release
A new Ceph-CSI release is out so let's use it.

Signed-off-by: Sébastien Han <seb@redhat.com>
(cherry picked from commit 1093b0a166)
2022-04-25 09:05:38 +00:00
mergify[bot] 0d7b63d6a7 Merge pull request #10138 from rook/mergify/bp/release-1.9/pr-10124
csi: move setting csi param to setParams (backport #10124)
2022-04-24 12:12:47 +00:00
Madhu Rajanna 2a3a90c34f csi: add/remove mon IP from csi config
If a mon is added or removed in a ceph
cluster all the CSI clusterID's belongs
to the ceph cluster should also gets updated.

Added a new cluster identifier to the csi configmap,
i.e ceph clusterNamespace which helps to identify
the clusterID's belongs to that ceph cluster.

Note:- to support the upgraded clusters,we
can ask users to update the mon IP's for the
problamatic clusterID as it wont be updated
by the operator.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 8ab17e3b83)
2022-04-22 17:57:11 +00:00
Madhu Rajanna 5febd0de26 csi: move setting csi param to setParams
moving setting csi parameter to setParams
function as `setParams` is mostly used to set
the csi parameters for the templates.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit c255e35225)
2022-04-22 13:59:59 +00:00
Travis Nielsen 81a9bc4894 Merge pull request #10117 from rook/mergify/bp/release-1.9/pr-10111
subvolumegroup: refractor subvolumegroup controller (backport #10111)
2022-04-20 13:54:39 -06:00
subhamkrai 5328491880 core: make code changes to support latest cntrl runtime
making necessary code changes to support controller
runtime version.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit bf7daccf60)
2022-04-20 17:52:53 +00:00
Madhu Rajanna 7c6c1beb59 subvolumegroup: refractor subvolumegroup controller
improved the logging and also reorganized code to
handle external and non external cases for better
code readability.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 541d63d31e)
2022-04-20 17:50:10 +00:00
Madhu Rajanna d4be1ee1c7 csi: use k8s.gcr.io for csi nfsplugin image
use k8s.gcr.io like other kubernetes sidecar
image to pull the nfsplugin image.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 52c8211e43)
2022-04-20 14:02:22 +00:00
mergify[bot] be2fb09893 Merge pull request #10104 from rook/mergify/bp/release-1.9/pr-9940
csi: add CSI encryption support (backport #9940)
2022-04-19 20:28:55 +00:00
Travis Nielsen b2815830c4 Merge pull request #10103 from rook/mergify/bp/release-1.9/pr-10074
csi: make GRPC timeout configurable (backport #10074)
2022-04-19 14:09:12 -06:00
Rakshith R 1f9a614e08 csi: add CSI encryption support
Ceph-CSI supports LUKS encryption for RBD volumes.
This commit adds support for the same by adding capability
of mounting required `rook-ceph-csi-kms-config` configmap
into csi-rbdplugin-provisioner and nodeplugin pods.
Required documentations, helm charts and examples yamls
are also updated.

Resolved: #7032

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 2e18d5bbaa)
2022-04-19 15:27:31 +00:00
Madhu Rajanna b85c79f9df csi: make GRPC timeout configurable
setting the GRPC timeout configurable helps
in some cases where ceph cluster takes more time
to respond.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 54de442e22)
2022-04-19 13:55:22 +00:00
Travis Nielsen 9b2bef7334 osd: enable quincy osd release version
After all OSDs are updated to each major release of Ceph, the
require-osd-release version is set to that release so all the latest
functionality for osds can be enabled by Ceph. In Quincy there is
a warning if all osds are on Quincy and this flag is not set, so
this will resolve the health warning.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
(cherry picked from commit 03b0546fec)
2022-04-15 14:46:59 +00:00
mergify[bot] 92358e374c Merge pull request #10055 from rook/mergify/bp/release-1.9/pr-9927
csi: add nfs nodeplugin & provisioner (backport #9927)
2022-04-14 14:42:20 +00:00
Madhu Rajanna 1d8aa05a23 subvolumegroup: add webhook for subvolumegroup
As we are not suppose to update the filesystem name
once the subvolumegroup is created.
added webhook validation for subvolumegroup update.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 74c4397973)
2022-04-13 17:06:45 +00:00
Madhu Rajanna c0697432fd namespace: add webhook for radosnamespace
As we are not suppose to update the pool name
once the rados namespace is created.
added webhook validation for radosnamespace
update.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 6aea438288)
2022-04-13 17:06:44 +00:00
Madhu Rajanna 106171a68e core: add code to update the webhook configurations
As we are adding new webhook configuration we
need to update the webhooks validations.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit 024c034a95)
2022-04-13 17:06:44 +00:00
Travis Nielsen 20aa0dfa5c Merge pull request #10052 from rook/mergify/bp/release-1.9/pr-10003
core: support arbitrary node affinity inputs (backport #10003)
2022-04-13 08:43:29 -06:00
Travis Nielsen a54923b891 Merge pull request #10050 from rook/mergify/bp/release-1.9/pr-10043
core: refactor webhook config (backport #10043)
2022-04-13 08:40:00 -06:00
Blaine Gardner 727d6dcf53 nfs: create config pool by default
Create the ".nfs" config pool by default so that users aren't required
to create it via CephBlockPool.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit 254a7adb4c)
2022-04-12 19:33:10 +00:00
Blaine Gardner 0a1bbfed67 pool: built-in pools must be replicated
Built in Ceph pools (device_health_metrics, .mgr, .nfs) must be
replicated and not erasure coded.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
(cherry picked from commit bcd5b66e43)
2022-04-12 17:55:26 +00:00
Rakshith R d402f8b286 csi: add nfs provisioner deployment
This commit adds nfs provisioner deployment.
This will allow rook to deploy nfs provisioner
which can create backend cephfs subvolumes to be
exported as nfs volumes.

refer:
https://github.com/ceph/ceph-csi/blob/devel/docs/design/proposals/nfs.md

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 5f48ad8026)
2022-04-12 17:38:34 +00:00
Rakshith R 7eead51c6f csi: add nfs nodeplugin daemonset
This commit adds nfs nodeplugin daemonset.
This will allow rook to deploy nfs nodeplugin
which can mount/unmount nfs volumes.

refer:
- https://github.com/ceph/ceph-csi/blob/devel/docs/design/proposals/nfs.md
- https://github.com/kubernetes-csi/csi-driver-nfs

Signed-off-by: Rakshith R <rar@redhat.com>
(cherry picked from commit 34162c3dc5)
2022-04-12 17:38:34 +00:00
Pranshu Srivastava 750e8efdc3 core: support arbitrary node affinity inputs
Adds support for valid arbitrary NodeAffinity JSON input by the user while
maintaining backward compatibility with the older parsing code.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
(cherry picked from commit 6e49a090a3)
2022-04-12 16:32:32 +00:00
subhamkrai 3eb5f0c7b8 core: refactor webhook config
refactor validating webhook config.

Closes: https://github.com/rook/rook/issues/10025
Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 948e2851dc)
2022-04-12 15:45:49 +00:00
subhamkrai 0cd2cbb0d4 core: start admission controller without any script
finally, admission controller will be enabled default
without any script/manual step. But it still requires cert-manager
to be installed which I believe is already installed in clusters.

**Note**
Code doesn't return error it just logs the error since
we don't want to stop reconciling if the admission controller fails.
We can work on this once the admission controller is stable.

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit f6f03d272b)
2022-04-11 15:07:56 +00:00
Travis Nielsen 81f5003510 Merge pull request #10005 from rook/mergify/bp/release-1.9/pr-10002
csi: update cephcsi to v3.6.0 release (backport #10002)
2022-04-06 13:27:52 -06:00
Madhu Rajanna ad4c6ac92a csi: update cephcsi to v3.6.0 release
Removed v3.4.0 as its deprecated in cephcsi
and updated the templates to point to latest
v3.6.0 release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit a1ded0f27f)
2022-04-06 14:01:49 +00:00
Madhu Rajanna baa2c90568 namespace: add new CRD
This introduces a new CRD to add the ability
to create rados namespace for a given
ceph block pool. Typically the name of the pool
is the name of the blockpool created by rook.

Closes: #7035

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
(cherry picked from commit b0fc7c9b92)
2022-04-05 13:33:54 +00:00
subhamkrai 7ac76bd0d0 core: fix golangci linter
fix golangci linter

Signed-off-by: subhamkrai <srai@redhat.com>
(cherry picked from commit 24802c559e)
2022-04-04 10:24:11 -06:00
Jiffin Tony Thottan 0b8440cff5 object: add service account for RGW pod
For supporting features like service account authentication for vault
KMS , a service account account need to attach with pod.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
(cherry picked from commit 5e72b26948)
2022-04-04 13:41:44 +00:00
Sébastien Han 05506e7a68 core: reload go routine after CR is edited
Previously, the struct maintaining the list of cluster was still
initialized with a cluster item. Then the monitoring check will see that
the cluster is part of the struct already and thus won't run the
monitoring go routine again.
Now each time we cancel the context, we also remove the cluster item
from the map so that when the controller runs again, the monitoring
struct is re-populated and the go routine runs and statuses are updated.

Closes: https://github.com/rook/rook/issues/9911
Signed-off-by: Sébastien Han <seb@redhat.com>
2022-03-31 08:49:42 +02:00
Travis Nielsen 6c50530737 Merge pull request #9685 from weirdwiz/context-remove
Remove context.TODO and add context parameter
2022-03-30 12:20:30 -05:00
Rakshith R ec6f2e31b1 csi: mount serviceaccount oidc-token into csi-driver
This oidc-token is used to authenticate with OpenID Connect (OIDC)
Provider. Currently, Ceph-CSI uses it to assume role with amazon STS
to get access to aws kms for encryption.

Signed-off-by: Rakshith R <rar@redhat.com>
2022-03-29 14:04:28 +05:30
Jiffin Tony Thottan fc2b8012c6 object: use us-east-1 for aws go lang sdk
The aws go lang sdk needs value for region, it is set differently in
various part of current code. With PR the value is always `us-east-1` so
that it will work RGW server without any issues.

This reverts commit 280c29f330.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2022-03-24 14:37:39 +05:30
Divyansh Kamboj 9008409f87 core: add context parameter to functions
This commit adds context parameter to various functions, and remove the
usage of context.TODO.

Closes: https://github.com/rook/rook/issues/8701
Signed-off-by: Divyansh Kamboj <dkamboj@redhat.com>
2022-03-22 08:19:07 +05:30
Travis Nielsen 4edcff04f7 monitoring: create prometheus rules with helm chart
The prometheus rules had been previously created if the cephcluster CR
setting monitoring.enabled was set to true. The rules were not customizable
and therefore not flexible enough. Now the rules are installed by the helm
chart. To customize the rules, a post-processor can be applied to the helm
chart.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-21 14:47:52 -06:00
Travis Nielsen 86eebc7486 mon: set the msgr1 port by default for csi driver
Older kernels still fail to connect for rbd/cephfs with
the msgr2 port due to a difference in http protocol expected.
For now, we keep the default port as msgr1 for the csi driver
and other client connections, unless msgr2 is strictly required
for encryption or compression.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-17 16:34:13 -06:00
Sébastien Han 18b19de639 Merge pull request #9687 from parth-gr/observedGeneration
core: add observedGeneration to CR status
2022-03-17 10:36:11 +01:00
Travis Nielsen 48be000b4f core: add quincy to the supported versions
Ceph Quincy is now supported as of Rook v1.9.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-16 14:26:20 -06:00
Travis Nielsen ad99f9e205 pool: update the quincy default pool to .mgr
In Quincy, the device_health_metrics pool is renamed to .mgr.
In the example cluster-test.yaml, we therefore update the
example to create the pool with the new name.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2022-03-16 14:18:49 -06:00
parth-gr 2dfd64a97c core: add observedGeneration to CR status
adding observedGeneration field in the cephcluster cr
status for having better control on reconciling,
as observedGeneration field will be updated by the controller

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

Signed-off-by: parth-gr <paarora@redhat.com>
2022-03-16 19:58:35 +05:30
Blaine Gardner 1bbe39a81b Merge pull request #9710 from rexagod/9025
rgw: add unit tests for the external ceph object store reconciler
2022-03-15 16:23:49 -06:00