Commit Graph
5036 Commits
Author SHA1 Message Date
Madhu Rajanna 22bfc9de3d csi: add holder pods to the list to delete pod
Add holder pods label to the list so that Rook
can get all the pods on the failed node and
force delete the pods stuck in terminating state.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-08-08 09:24:19 +02:00
subhamkrai ab3763767f build: update vault and other indirect imports
update vault and other indirect imports. Also,
updating k8s package to `v0.28.0-rc.0` since with
v0.27.4 it was through build error.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-08-08 08:24:19 +05:30
karthik-us 2675c976d5 csi: add maxUnavailable for cephfs csi daemonset
Adding maxUnavailable parameter to the cephfs csi daemonset. The
default value of maxUnavailable = 1 can make the upgrade process
slower in environments with large number of nodes.

Fixes: #12636
Signed-off-by: karthik-us <ksubrahm@redhat.com>
2023-08-07 19:48:21 +05:30
Lucas Henry c948183c0e operator: fix formatting of some logger methods
Some logging instructions use formatting syntax `%q`, but the logging method is
`Info` or `Debug` instead of `Debugf` and `Infof`. As a result, the arguments of
the method were concatenated instead of formatted properly.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-08-04 15:45:54 +02:00
Travis Nielsen 5f2a8bca61 Merge pull request #12561 from henrydavies1/remove-duplicate-ParseMonEndpoints
mon: delete ParseMonEndpoints from mon package
2023-08-03 08:00:46 -06:00
Deepika Upadhyay b67bf2d6f0 mon: update mon deployment
* fixes mon zonal deployment of 2 per zone to 1 if zones field is
  specified.
* adds zones field doc to CRDs Documentation.
* add code for picking up failureDomainLabel if specified for zones
  field in mon deployment

Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-03 17:01:51 +05:30
Deepika Upadhyay 0d86588620 mon: fix some of the zonal storageclass support failures
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-03 16:41:24 +05:30
Deepika Upadhyay 764f6597c0 mon: add failure domain label for zonal topology
Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-03 16:41:24 +05:30
Deepika Upadhyay 2231d73259 mon: add mon storage class support
if zones field is specified, deploy the mon based on the zone specified,
this will help with higher mon availability.

See also: https://github.com/rook/rook/pull/11407/

Signed-off-by: Deepika Upadhyay <deepika@koor.tech>
2023-08-03 16:41:23 +05:30
Henry Davies 2c8949e195 mon: delete ParseMonEndpoints from mon package
The function ParseMonEndpoints existed twice, once in the mon package
and once in the controller package. It has now been deleted from the
mon package. Usages in the mon package now reference the function
in the controller package.

Signed-off-by: Henry Davies <henrydavies@hotmail.co.uk>
2023-08-01 19:36:28 +01:00
Travis Nielsen e7b23a779e Merge pull request #12537 from parth-gr/v2-external
external: set RequireMsgr2 if v2 port is configured
2023-07-31 13:19:37 -06:00
parth-gr 2c4897f88c external: set RequireMsgr2 if v2 port is configured
Currently if we use the msgr2 port,
cs-cluster-config-json looks like
"monitors":["192.59.109.11:3300","192.59.109.13:6789","192.59.109.12:6789"]

The first monitor is passed by python script and rest are
Discovered by rook operator, so if the first mon is using the v2 port
lets update the other mons also by setting up the RequireMsgr2 flag

Signed-off-by: parth-gr <paarora@redhat.com>
2023-07-31 23:29:03 +05:30
Sheetal Pamecha d86fa2abbc osd: use cp -a command for copying init-containers
remove copy-binaries cmd and related code

Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
2023-07-31 09:31:38 +05:30
Sachin Prabhu 6cf4627ccd nfs: fix null pointer deref in generateSssdSidecarResources()
0a151e913 results in a bug which causes null pointer dereference when
Kerberos is not setup. This causes a failure in Unit test
TestReconcileCephNFS_addSecurityConfigsToPod

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
2023-07-28 11:53:10 +01:00
Blaine Gardner a2658b13fd Merge pull request #12517 from spuiuk/sssd_kerberos
nfs: mount krb5.conf and krb5.keytab in the sssd container
2023-07-26 16:52:30 -06:00
subhamkrai 72386eb1d0 core: node fencing, skip pv when pv is not backed by csi
when node fencing is triggered and a negative case where
one deployment pod consuming pv not provisioned by csi
and another deployment pod with rbd rwo are on the same
node and node fencing is triggered.

In this case rook operator panics since it is trigger to get
field `pv.Spec.CSI.Driver` which will be nil.

Also, skip static pv as there is no `imageName` in the spec
rbd status command will fail.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-07-26 14:35:41 +05:30
Blaine Gardner 5979b38162 Merge pull request #12560 from polyedre/do-not-add-objectstore-endpoint-to-zone-when-sync-is-disabled
object: do not add objectstore endpoint to zone when sync is disabled
2023-07-25 15:31:42 -06:00
Blaine Gardner 6e12df32ad Merge pull request #12466 from sp98/osd-store
osd: configure backend store
2023-07-25 15:20:13 -06:00
Blaine Gardner 75e31a126c Merge pull request #12575 from sp98/delete-exportor-pod
core: force delete rook-ceph-exporter pod
2023-07-25 15:17:42 -06:00
sp98 dd90ef5db2 core: force delete rook-ceph-exporter pod
Force delete rook-ceph-exporter pod that is stuck in terminating
state due to unavailability of node.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-07-24 20:50:26 +05:30
sp98 c13d34f8d3 osd: configure backend store
Configure osd backend store from the cephCluster spec

Signed-off-by: sp98 <sapillai@redhat.com>
2023-07-24 09:16:30 +05:30
Jiffin Tony Thottan 1bf33f125e object: update ceph cosi driver image to v0.1.1
Update the ceph cosi driver image to v0.1.1, so that it can
work on both amd and arm platforms.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-07-20 14:19:15 +05:30
Lucas Henry 564afef4c7 object: do not add objectstore endpoint to zone when sync is disabled
Gateways that do not run the sync threads should not be accessible from one of
the Zone endpoint. If this is the case, the synchronization might stop working.

When the CephObjectStore has the option
`spec.gateway.disableMultisiteSyncTraffic` set to `true`, we must ensure that
the objectstore endpoint is not present in the Zone endpoint.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-07-20 08:34:41 +02:00
travisn 4c98669148 cosi: handle deletion of the cosi driver
The controller was attempting to delete the cosi driver
again and again, always failing the reconcile when the
driver did not exist. Since the desired state is for the
driver not to exist when disabled, return a successful
reconcile.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-07-18 14:53:22 -06:00
travisn 990cb40043 cosi: change the default deployment strategy to never
While experimental, the cosi driver should not be enabled by
default.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-07-18 14:35:54 -06:00
Travis Nielsen 2e7f9045ab Merge pull request #12460 from pgoron/admin-caps-spelling
object: align spelling of user admin capabilities with ceph
2023-07-18 13:23:15 -06:00
Travis Nielsen 91fea5395e Merge pull request #12415 from thotz/ceph-cosi-driver
object: adding ceph cosi driver
2023-07-18 12:12:12 -06:00
Jiffin Tony Thottan b48dc8a335 object: intial cosi driver controller design
Adding CephCOSIDriver CRD and controller. The controller will bring up
the ceph cosi driver when first object store is created in the rook
operator namespace. Then admin can defined COSI CRDs like BucketClass
and BucketAccessClass for different object stores deployed via Rook.
Using the BucketClass and BucketAccessClass, user can define
BucketAccess for backend bucket in the RGW. The CephCOSIDriver CRD
defines configuration options for ceph cosi driver. In the first version
its usability is minimal. Even if it is not defined Rook will bring up
the ceph cosi driver with default values.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-07-18 22:49:41 +05:30
Lucas Henry 393d09347e rgw: add option to disable synchronization traffic
Some users want to deploy two CephObjectStores for a single Zone. The first
configures RGWs to process the synchronization of the data, while the second
CephObjectStore configures the client RGWs.

Currently, this can be implemented by setting the RGW option
'rgw_run_sync_thread' in the 'rook-config-override' ConfigMap, though it is not
really user friendly.

Ref: https://docs.ceph.com/en/latest/radosgw/config-ref/#confval-rgw_run_sync_thread

This commit adds a new option in the CephObjectStore CRD as defined in issue
https://github.com/rook/rook/issues/12272. The new option
'disableMultisiteSyncTraffic' determine whether the operator should disable the
multisite sync threads for the RGWs.

If the option is set to 'false', or if the option is not specified, the operator
does nothing. This ensures that the multisite sync threads will not be enabled
for users that disabled explicitely the multisite sync threads either manually
or with the 'rook-config-override' ConfigMap.

This commit also recommends to use two objectstore when scaling Ceph Objectstore
Multisite replication, with one objectstore configured with disabled replication
traffic.

Signed-off-by: Lucas Henry <polyedre@disroot.org>
2023-07-17 09:27:20 +02:00
Sachin Prabhu 0a151e913d nfs: mount krb5.conf and krb5.keytab in the sssd container
This will enable us to use GSSAPI in sssd for authentication when
connecting to the remote LDAP server.

Signed-off-by: Sachin Prabhu <sprabhu@redhat.com>
2023-07-15 18:55:09 +01:00
Javier 46cb9435a6 test: support Ceph Reef v18 with updated integration tests
update test files to support the next version of ceph, ceph reef v18

Signed-off-by: Javier <sjavierlopez@gmail.com>
2023-07-10 15:24:36 -06:00
Rakshith R 12e2cd550f core: add check for pv access modes' multinode support
During faster node loss recovery,
Rook needs to check and blocklist only rbd pvs
that do not support multinode access modes such as
ReadOnlyMany(ROX) and ReadWriteMany(RWX).
This commit adds check for the same.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-10 16:12:13 +05:30
Travis Nielsen 65f413ce1f Merge pull request #12286 from subhamkrai/fix-node-loss-rbd
core: faster recovery from rbd rwo node loss
2023-07-07 10:35:59 -06:00
subhamkrai 39b5c057ce core: faster recovery from rbd rwo node loss
in the existing node watcher, we'll check for node update
event and see if there are `out-of-service` taints are applied
and `ROOK_WATCH_FOR_NODE_FAILURE` is enabled in rook-ceph-operator-configmap,
if then we'll create the networkFence cr and delete the cr if nodes come back.
And, added the unit test too.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-07-07 21:16:25 +05:30
Travis Nielsen 3ffec84100 Merge pull request #12462 from Madhu-1/fix-holderpod
csi: update csi holder daemonset template
2023-07-07 08:32:00 -06:00
Travis Nielsen 18e2502a69 Merge pull request #12295 from subhamkrai/remve-default-scc
security: remove default scc privileges
2023-07-07 08:24:37 -06:00
subhamkrai 48f84b37e8 security: drop all capabilities to the container
adding drop `ALL` capabilities in rook operator container
as this is not required and will remove warning in ocp cluster.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-07-07 17:06:48 +05:30
Travis Nielsen 46dd374e30 Merge pull request #12478 from Rakshith-R/csi/rm-checks
csi: drop checks for k8s version below the support minimum version
2023-07-06 11:53:47 -06:00
Rakshith R aa0aa34c23 csi: update csi sidecars' image version
Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-06 16:18:35 +05:30
Rakshith R 76f4b1f586 csi: remove code related to betav1CsiDriver
This commit removes code related to betav1CsiDriver
since minimum k8s version support by rook is now
k8s v1.22 which does not support betav1 csi driver crd.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-06 15:55:57 +05:30
Rakshith R d6b8a8f380 csi: remove k8s version check for oidc token
This commit removes k8s version check for oidc token
which required k8s v1.20 or above since minimum
k8s version that rook supports now is v1.22.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-07-06 15:44:45 +05:30
travisn a74a945202 core: remove vault server module dependencies
The vault server dependencies were pulling a lot of indirect modules
that are not necessary for Rook. The modules were only used
for testing. The vault github explicitly indicates that:

"Some other projects have made a practice of doing so in order to
take advantage of testing tooling that was developed for testing Vault itself.
This is not, and has never been, a supported way to use the Vault project."

When attempting to update to vault v1.13.3, we are hitting
such an unsupported configuration with go modules
that are impossible to satisfy. By removing the tests
that were using the vault server project, we can remove
this large set of dependencies, enable updating to v1.13.3,
and also reduce the modules pulled in by vault.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-07-05 11:33:03 -06:00
Madhu Rajanna 1ba3aa4d19 csi: update csi holder daemonset template
Currently the holder daemonset is never updated
which will leaves the images the daemonset also
not updated. we should update the daemonset
template but not restart the csi holder pods
which causes the CSI volume access problem,
set the updateStrategy to OnDelete (already set in
yaml files) which allow us to update the holder
daemonset but not restart/update the pods, when a
pod is deleted or node is rebooted
the new changes will take effect.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2023-07-03 14:13:38 +02:00
Peter Goron 40eed236cf object: align spelling of user admin capabilities with ceph
users & buckets admin capabilities aren't spelled the same
way between rook crd (singular) and ceph (plural). It's a bit
misleading when comparing ceph admin cap and rook users.

Signed-off-by: Peter Goron <peter.goron@gmail.com>
2023-07-01 19:05:26 +02:00
travisn 4ff18dadf4 object: remove obsolete bucket health checker removal
The bucket health checker was removed in 1.10. Now in 1.12
we no longer need this removal of the bucket health
checker since it will no longer exist to remove.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-28 16:07:51 -06:00
Rakshith R fa1be14bca csi: update csiaddons k8s-sidecar to v0.7.0
This commit updates k8s-sidecar to v0.7.0
and all links now point to v0.7.0 tag.

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-28 20:38:29 +05:30
Rakshith R 1af70aca60 csi: update cephcsi to v3.9.0
This commit updates cephcsi image to
v3.9.0 release and also removes support
for v3.7.x.

refer:
https://github.com/ceph/ceph-csi/releases/tag/v3.8.0

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-28 20:38:29 +05:30
Rakshith R c488693cb3 csi: add SeLinuxMount: true Option to csidriver obj
This feature is alpha and available from k8s 1.25.
This enabled faster mounting of volumes using
RWOP access pod.

refer:
https://kubernetes.io/blog/2023/04/18/kubernetes-1-27-\
efficient-selinux-relabeling-beta/

Signed-off-by: Rakshith R <rar@redhat.com>
2023-06-28 20:23:51 +05:30
subhamkrai a2e3d30526 security: remove default scc privileges
with `requiredDropCapabilities: ["All"]` we can
drop all the default privileges and we can add the
privileges required `allowedCapabilities:` here.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-06-28 15:14:41 +05:30
travisn 96ff80f8b0 ci: add exporter to commit prefixes
Add the exporter to the list of commit prefixes

Signed-off-by: travisn <tnielsen@redhat.com>
2023-06-27 11:03:03 -06:00