Commit Graph
3904 Commits
Author SHA1 Message Date
Sébastien Han 1093b0a166 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>
2022-04-25 10:26:10 +02:00
Travis Nielsen ab4ae017d2 Merge pull request #10135 from Madhu-1/fix-mon-problem
csi: add/remove mon IP from csi config
2022-04-22 11:56:55 -06:00
Madhu Rajanna 8ab17e3b83 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>
2022-04-22 22:26:06 +05:30
Madhu Rajanna c255e35225 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>
2022-04-22 15:14:50 +05:30
Travis Nielsen 622f3c09b8 Merge pull request #10023 from subhamkrai/update-cntrl-runtime
core: update controller-runtime version to v0.11.2
2022-04-20 11:52:46 -06:00
subhamkrai bf7daccf60 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>
2022-04-20 22:30:15 +05:30
Madhu Rajanna 541d63d31e 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>
2022-04-20 20:30:09 +05:30
Travis Nielsen 09c7b305c7 Merge pull request #10059 from Madhu-1/update-nfs-image-reg
csi: use k8s.gcr.io for csi nfsplugin image
2022-04-20 08:01:47 -06:00
Travis Nielsen 6cd1de4776 Merge pull request #9940 from Rakshith-R/csi/add-kms-support
csi: add CSI encryption support
2022-04-19 09:26:52 -06:00
Travis Nielsen 4d23911fd9 Merge pull request #10074 from Madhu-1/make-rpc-timeout-configurable
csi: make GRPC timeout configurable
2022-04-19 07:54:50 -06:00
Travis Nielsen 03b0546fec 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>
2022-04-14 12:37:29 -06:00
Madhu Rajanna 54de442e22 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>
2022-04-14 18:15:00 +05:30
Rakshith R 2e18d5bbaa 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>
2022-04-13 19:52:51 +05:30
Madhu Rajanna 52c8211e43 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>
2022-04-13 11:54:35 +05:30
Madhu Rajanna 74c4397973 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>
2022-04-13 10:57:30 +05:30
Madhu Rajanna 6aea438288 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>
2022-04-13 10:45:04 +05:30
Madhu Rajanna 024c034a95 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>
2022-04-13 10:38:38 +05:30
Blaine Gardner 254a7adb4c 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>
2022-04-12 12:05:43 -06:00
Blaine Gardner 8ea14f77d5 Merge pull request #10053 from BlaineEXE/built-in-pools-must-be-replicated
pool: built-in pools must be replicated
2022-04-12 11:54:48 -06:00
Blaine Gardner 0d2e43bd77 Merge pull request #9927 from Rakshith-R/csi/add-nfs-nodeplugin
csi: add nfs nodeplugin & provisioner
2022-04-12 11:37:55 -06:00
Blaine Gardner bcd5b66e43 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>
2022-04-12 11:14:04 -06:00
Travis Nielsen 38dc2fae2d Merge pull request #10003 from rexagod/9711
core: support arbitrary node affinity inputs
2022-04-12 10:31:58 -06:00
Pranshu Srivastava 6e49a090a3 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>
2022-04-12 21:11:01 +05:30
subhamkrai 948e2851dc core: refactor webhook config
refactor validating webhook config.

Closes: https://github.com/rook/rook/issues/10025
Signed-off-by: subhamkrai <srai@redhat.com>
2022-04-12 19:49:15 +05:30
Rakshith R 5f48ad8026 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>
2022-04-12 11:25:08 +05:30
Rakshith R 34162c3dc5 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>
2022-04-12 11:07:38 +05:30
subhamkrai f6f03d272b 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>
2022-04-11 19:44:54 +05:30
Madhu Rajanna a1ded0f27f 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>
2022-04-06 09:51:46 +05:30
Madhu Rajanna b0fc7c9b92 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>
2022-04-05 10:10:04 +05:30
subhamkrai 24802c559e core: fix golangci linter
fix golangci linter

Signed-off-by: subhamkrai <srai@redhat.com>
2022-04-04 20:59:31 +05:30
Jiffin Tony Thottan 5e72b26948 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>
2022-04-04 11:24:50 +05:30
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
Pranshu Srivastava 5e414666cc rgw: add unit tests for the external ceph object store reconciler
Added few test cases to check for the following:
* creation of an external object store
* deletion of an external object store
* creation of an external object store with a missing secret
* creation of an external object store with ExternalRGWEndpoints set to
  nil.

Signed-off-by: Pranshu Srivastava <rexagod@gmail.com>
2022-03-15 18:08:54 +05:30
Blaine Gardner 177ba1103d file: add events to filesystem reconcile
Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-03-14 10:29:25 -06:00
subhamkrai 6a9ff434d2 core: add k8s events in controller reconciler
adding k8s event in controller reconciler when
1. when reconciler starts
2. when deletion reconcile triggered.

Closes: https://github.com/rook/rook/issues/9462
Signed-off-by: subhamkrai <srai@redhat.com>
2022-03-14 18:55:26 +05:30
Blaine Gardner afd38a57c5 Merge pull request #9873 from BlaineEXE/report-reconcile-rework
core: rework usage of ReportReconcileResult
2022-03-11 10:02:30 -07:00
Travis Nielsen c580e8f09c Merge pull request #9118 from travisn/network-encryption
mon: Options for enabling msgr2 encryption and compression
2022-03-11 09:49:55 -07:00
Travis Nielsen 360de78263 Merge pull request #9878 from travisn/csi-mon-config
csi: Populate mon endpoints even if driver not enabled
2022-03-11 07:36:20 -07:00
Blaine Gardner c92c6fbc36 core: rework usage of ReportReconcileResult
ReportReconcileResult should never be given an object that is nil. It is
impossible to force compile-time checking for this because the object's
type is an interface. We can't force this, but we can rework the
function definition to handle more cases where the object may not be
returned fully-complete, and we can rework callers to return structs
(not pointers-to-structs) so it is less likely a caller will pass nil
to the function.

Signed-off-by: Blaine Gardner <blaine.gardner@redhat.com>
2022-03-10 16:53:25 -07:00