Commit Graph
5036 Commits
Author SHA1 Message Date
Travis Nielsen c36692ccaa Merge pull request #10094 from subhamkrai/update-golang
build: update golang version to v1.17
2022-04-19 07:25:46 -06:00
Madhu Rajanna 99224ad102 block: validate updating name in BlockPool CR
Currently we are allowing users to change the name
of the pool to be created in the BlockPool CR. with
this we have a bug of leaving stale resources in the
cluster. With new changes we are blocking the update
of the pool name in the BlockPool CR.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2022-04-19 10:23:54 +05:30
subhamkrai 81d696652d build: update golang version to v1.17
update golang version to v1.17

Signed-off-by: subhamkrai <srai@redhat.com>
2022-04-19 09:04:29 +05:30
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
Sébastien Han aae4e79a3d Merge pull request #10035 from leseb/fix-ibm-kms-corner-case
osd: only set kek to env var on encryption scenario
2022-04-11 17:26:04 +02:00
Sébastien Han 6bc7827150 osd: only set kek to env var on encryption scenario
There is a corner case where an env variable populated with the prepare
job could influence and trigger some encryption code. We have an env
variable to discover whether the prepare job will encrypt a drive or not
so let's use that instead of running code as a noop and sometimes
trigger a corner case. In this scenario, the prepare job had an "IBM_"
env variable present in the OS image (IBM OS) so the setKEKinEnv()
  function would get called for no reason.

Signed-off-by: Sébastien Han <seb@redhat.com>
2022-04-11 16:54:18 +02:00
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
Travis Nielsen 2357cb7a1e Merge pull request #9964 from thotz/add-service-account-rgw
object: add service account for RGW pod
2022-04-04 07:41:13 -06:00
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
Krzysztof Nazarewski 352df4e62f osd: add NixOS specific PATHs
This commits makes Rook usable on NixOS.

NixOS system holds "installed" binaries in `/run/current-system/sw/{bin,sbin}`.
The only binaries residing outside those paths are `/usr/bin/env` and `/bin/sh`.

I got a suggestion on Slack to simply add those NixOS specific paths

Signed-off-by: Krzysztof Nazarewski <3494992+nazarewk@users.noreply.github.com>
2022-04-01 16:37:23 +02: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
Blaine Gardner ba3cf9cea6 Merge pull request #9898 from yuvalman/logcollector
core: fix GetLogCollectorResources to get the right resources
2022-03-28 12:27:33 -06:00
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
Yuval Manor d222ad65e3 core: fix GetLogCollectorResources to get the right resources
Fix GetLogCollectorResources to use the logcollector instead of the crashcollector key

Closes: https://github.com/rook/rook/issues/9897
Signed-off-by: Yuval Manor <yuvalman958@gmail.com>
2022-03-21 17:55:03 +02:00
Travis Nielsen 833c458f60 Merge pull request #9910 from subhamkrai/all-crs-printColumn
core: add `Phase` in `additionalPrinterColumns` for all CRs
2022-03-21 07:15:07 -06:00
subhamkrai dc488591e2 core: add Phase in additionalPrinterColumns for all CRs
this commit adding `Phase` in `additionalPrinterColumns` for
all the CRs.

this is how it looks now, example:

```
$ kc get cephfilesystem
NAME   ACTIVEMDS   AGE     PHASE
myfs   1           4m57s   Ready
srai@ ~
$ kc get cephblockpool
NAME                    PHASE
device-health-metrics   Ready
replicapool             Progressing
srai@ ~
$ kc get cephclient
NAME     PHASE
cinder   Ready
glance   Ready
```

Closes: https://github.com/rook/rook/issues/9883
Signed-off-by: subhamkrai <srai@redhat.com>
2022-03-21 09:13:26 +05:30
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