Commit Graph
3355 Commits
Author SHA1 Message Date
Blaine Gardner b4a2285aa6 object: use advertise endpoint for admin ops
RGW can only serve a single certificate. This limitation means that the
prior behavior of using the default service for admin ops when TLS is
enabled may mean it requires additional complex certificate management
to make sure the object store uses a certificate valid for Rook internal
admin ops and user connections.

This is needlessly complex for users. Instead, change Rook's behavior
and documentation to clarify that it will use the same endpoint intended
for S3 client applications. This means that users have a more
straightforward path to enabling both Rook and consuming applications.

More info: https://github.com/rook/rook/issues/14530

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-08-05 14:32:59 -06:00
Travis Nielsen 9c98467f3c Merge pull request #14517 from iPraveenParihar/csi/explicitly-set-topology-flag
csi: explicitly set Topology feature-gate
2024-08-01 10:45:16 -06:00
Blaine Gardner b76631ace9 Merge pull request #14467 from BlaineEXE/object-advertise-endpoint
object: add hosting.advertiseEndpoint config
2024-07-31 16:17:24 -06:00
Praveen M e30e5e881f csi: explicitly set Topology feature-gate
issue:
external-provisioner (v5) enabled topology feature-gate by default
and the current implementation in Rook uses a conditional block to
enable the topology feature gate. This approach now does not directly
reflect the state of the `CSI_ENABLE_TOPOLOGY`.

fix:
replacing the conditional block with a direct use of the
`CSI_ENABLE_TOPOLOGY` for flag value.

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-07-31 20:37:20 +05:30
Travis Nielsen 2fb1e7af2c Merge pull request #14491 from travisn/ceph-18.2.4
manifest: Update the ceph recommended version to v18.2.4
2024-07-24 13:31:17 -06:00
Travis Nielsen 6ce616bf96 mgr: properly detect if dashboard cert already exists
If the dashboard cert already exists when ssl is enabled,
we need to not restart the dashboard module. The module
should only be restarted when there is a change to the
dashboard configuration. When ssl is enabled, the dashboard
is essentially being restarted every time there is a reconcile
which is causing issues with the mgr getting blocklisted
unnecessarily by ceph during failover.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-24 12:22:38 -06:00
Travis Nielsen e26920a483 manifest: update the ceph recommended version to v18.2.4
Since Reef v18.2.4 is released, set it to the default
ceph version that is deployed with Rook.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-24 11:06:09 -06:00
Artem Torubarov 3f2d0eb1f8 mgr: lookup cluster crd on active mgr watch
Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
2024-07-24 12:09:19 +02:00
Blaine Gardner a2b0b6449c object: add hosting.advertiseEndpoint config
Add CephObjectStore spec.hosting.advertiseEndpoint configuration. This
provides a clear documented default for which endpoint Rook "advertises"
to dependent resources like CephObjectStores, OBCs, and COSI
Buckets/Accesses and allows users to override the default behavior if
desired.

The current default is to round-robin an endpoint from
spec.hosting.dnsNames, which has proven to be troublesome for some
users' object store configurations. This change provides much-needed
disambiguation for users.

This may be a breaking change for some existing spec.hosting.dnsNames
users. This is unexpected but is documented.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-07-22 14:43:51 -06:00
yingshanghuangqiao 3d672a726a core: fix some comments
Signed-off-by: yingshanghuangqiao <yingshanghuangqiao@foxmail.com>
2024-07-22 22:09:52 +08:00
Travis Nielsen 88e952a3ac osd: update the device class if desired state changes
Normally the device class of an OSD is determined at provisioning
and is not updated thereafter. In some scenarios the admin may
want to force update the device class to a new value. The device
classes can be updated by first setting allowDeviceClassUpdate
in the storage spec of the cephcluster, then updating the
device class specified on the deviceSets or other OSDs.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-17 13:54:21 -06:00
Travis Nielsen 3ccdb53cb6 Merge pull request #14258 from subhamkrai/add-cephfs-fencing
mds: block of active mds ip only
2024-07-17 11:48:01 -06:00
subhamkrai 9f1b64be54 mds: block of active mds ip only
currently, it was blocking both the mds ip
instead its should block ip of of mds which is in
the same node which is down.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-17 13:30:35 +05:30
Madhu Rajanna cb87c3a845 csi: fix template render in logRotation
the templateParam need to be updated
with the right values before we are
rendering the template.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-07-17 08:15:30 +02:00
subhamkrai efe6ef4e45 csi: revert remove cephFs networkFence code temporarily
This reverts commit bd4250f56e.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-17 11:36:15 +05:30
Travis Nielsen 9967b161f9 Merge pull request #14420 from YiteGu/make-kube-api-limit-configurable
csi: make kube apiserver qps configurable
2024-07-16 07:40:56 -06:00
yite.gu 80541a23c9 csi: make kube apiserver qps configurable
This commit adds the flexibility to configure kube apiserver qps
as per the user requirement and also keeps the existing values as
the default one.

Signed-off-by: yite.gu <yitegu0@gmail.com>
2024-07-16 18:39:16 +08:00
Travis Nielsen 22d4139b74 core: add support for ceph squid
With the release of the first squid RC, we add squid
to the supported versions and add tests to run
Rook against the squid release.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-15 10:04:32 -06:00
Travis Nielsen 689b39de4f Merge pull request #14057 from travisn/deviceclass-log
pool: Return error if device class update fails
2024-07-12 08:50:35 -06:00
parth-gr 4ca8b12e12 csi: add log rotation for csi cephfs nfs pod containers
Use the same logrotate flow of rbd, as merged in #14305

1) Make the csi cephfs and nfs container logs persisted in a file

2) Use the cephcluster api specs to configure the log rotate

3) Add log rotation to rotate the log file and
Add a sidecar log collector container

And some fixes on the implementation:

1) Add a operator namespace in the log file path

2) Only add volume to the container if logrotate is enabled

Closes: https://github.com/rook/rook/issues/12809, https://github.com/rook/rook/issues/14429

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-12 12:50:35 +05:30
Travis Nielsen 0bea31ef7f pool: return error if device class update fails
Updating the device class swallowed any error if updated
for the pool. The error was not even logged, so we couldn't
troubleshoot why the new crush rule was not applied.
Log the error for troubleshooting and also fail the pool
reconcile since the desired configuration was not applied.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-07-10 12:59:43 -06:00
Travis Nielsen 28addd1301 Merge pull request #14216 from thotz/update-cosi-images
object: update cosi images
2024-07-10 12:47:07 -06:00
Travis Nielsen b8bcd71929 Merge pull request #14421 from subhamkrai/update-go-mods
build: update controller runtime to v0.18.4
2024-07-08 10:10:10 -06:00
parth-gr 2ca0d1390b csi: add securityContext to csi containers
With the recent enhancements csi containers for using
logrotate, they need to run with securityContext to privileged,
on platform like openshift.
Used the ROOK_HOSTPATH_REQUIRES_PRIVILEGED flag
wich is set with operator deployment to see
if the securityCOntext is needed or not

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-08 18:47:26 +05:30
subhamkrai d429ed8be4 build: update controller runtime to v0.18.4
this commit update cntrl runtime to v0.18.4 and other related deps/

Signed-off-by: subhamkrai <srai@redhat.com>
2024-07-05 09:05:12 +05:30
Travis Nielsen 8e25300ad5 Merge pull request #14199 from Nordix/update-cephfs-clusterroles
csi: add cephfs encryption support
2024-07-01 15:27:38 -06:00
Blaine Gardner d7eddfe98d Merge pull request #14305 from parth-gr/csi-logrotate
csi: add log rotation for csi rbd pod containers
2024-06-27 14:37:38 -06:00
parth-gr d3742119b9 csi: add log rotation for csi rbd pod containers
1) Make the csi rbd container logs persisted in a file
   (csi plugin, csi provisioner, csi addons sidecar)

2) Use the cephcluster api specs to configure the log rotate

3) Add log rotation to rotate the log file and
   Add a sidecar log collector container

part-of: https://github.com/rook/rook/issues/12809

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-06-27 14:20:18 +05:30
Blaine Gardner 7a53913049 Merge pull request #14294 from subhamkrai/skip-fence-when-csi-disabled
csi: skip creating networkFence when csi disabled
2024-06-25 09:36:02 -06:00
Blaine Gardner f2304bf8b8 osd: fix activate failure when block device moves
Block devices can move between reboots. In corner cases, an OSDs block
device might move to a lower-indexed device while the previous device
does not exist. For example, an OSD on /dev/sde might move to /dev/sdd
on reboot if the original /dev/sdd died. There would be no /dev/sde
after that.

Users report that NVMe drives commonly change names, even when there are
no disk failures.

For these cases, ensure the activate script properly handles cases where
the previous disk is not present on the node and where the OSD is still
available on a different disk.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-06-24 11:38:24 -06:00
subhamkrai e8aeb0d263 osd: revert limit storageClassDeviceSets to 63 chars
This reverts commit 6f5cc9b01d.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-06-21 11:24:25 +05:30
Travis Nielsen eed1033485 monitoring: set honor labels on the service monitor
The endpoint property honorLabels: true should be set so that
different rgw instances can show separate prometheus
values instead of being aggregated.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-06-14 15:38:34 -06:00
Travis Nielsen e90ed3b912 mon: allow overriding the mon endpoint with annotation
For an advanced network configuration, the mon endpoints
expected for the ceph public network may be different from
the public IP address that is set on the K8s node. When
host networking is enabled in rook, the IP address of the
node was only allowed previously. Now, the IP address
used for a mon when scheduled on a node can be determined
by setting an annotation on each node where mons can run:
    network.rook.io/mon-ip: <ip-address>
This annotation must be set before the mons are created.
Mon endpoints cannot be changed after they are already
running.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-06-05 10:32:55 -06:00
Jiffin Tony Thottan ba40f84123 object: update cosi images
Updating images for ceph cosi driver and side car.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2024-06-04 19:32:45 +05:30
subhamkrai 4be450ae4b csi: skip creating networkFence when csi disabled
skip creating networkFence when 'ROOK_CSI_DISABLE_DRIVER' is set to
'false'.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-06-04 18:17:38 +05:30
Travis Nielsen 2a5301a5cc Merge pull request #14269 from rook/dependabot/go_modules/github-dependencies-f460172902
build(deps): bump the github-dependencies group across 1 directory with 5 updates
2024-05-31 15:56:28 -06:00
dependabot[bot] 2ddbdebf43 build(deps): bump the github-dependencies group across 1 directory with 5 updates
Bumps the github-dependencies group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [github.com/IBM/keyprotect-go-client](https://github.com/IBM/keyprotect-go-client) | `0.13.0` | `0.14.0` |
| [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) | `1.53.0` | `1.53.10` |
| [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault) | `1.13.0` | `1.14.0` |
| [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) | `0.73.2` | `0.74.0` |
| [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator) | `0.73.2` | `0.74.0` |

Updates `github.com/IBM/keyprotect-go-client` from 0.13.0 to 0.14.0
- [Release notes](https://github.com/IBM/keyprotect-go-client/releases)
- [Changelog](https://github.com/IBM/keyprotect-go-client/blob/master/CHANGELOG.md)
- [Commits](https://github.com/IBM/keyprotect-go-client/compare/v0.13.0...v0.14.0)

Updates `github.com/aws/aws-sdk-go` from 1.53.0 to 1.53.10
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.53.0...v1.53.10)

Updates `github.com/hashicorp/vault/api` from 1.13.0 to 1.14.0
- [Release notes](https://github.com/hashicorp/vault/releases)
- [Changelog](https://github.com/hashicorp/vault/blob/main/CHANGELOG.md)
- [Commits](https://github.com/hashicorp/vault/compare/v1.13.0...v1.14.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.73.2 to 0.74.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.73.2...v0.74.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.73.2 to 0.74.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus-operator/prometheus-operator/compare/v0.73.2...v0.74.0)

---
updated-dependencies:
- dependency-name: github.com/IBM/keyprotect-go-client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/aws/aws-sdk-go
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github.com/hashicorp/vault/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-05-31 12:28:20 -06:00
Travis Nielsen e479b051bc osd: configure cluster full settings when osds fill up
When the clusters reach full, nearfull, or backfill full thresholds
ceph will raise health warnings and stop allowing IO or backfill
depending on the threshold. These settings require special ceph
commands instead of being generic ceph config. Allow these settings
to be set from the CephCluster CR in the spec.storage
section.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-05-30 12:10:41 -06:00
Travis Nielsen 48b657099d Merge pull request #14232 from sp98/configure-balancer-mode
mgr: setting balancer mode from cluster spec.
2024-05-29 10:44:29 -06:00
sp98 322549cbe1 osd: skip upgrade if migration is pending
Currently we allow upgrade of other OSDs while migration
of OSD, due to change in backing store, is pending. This
will not work if the updated OSD ceph version does not support
the currently applied backing store. So rook will skip any
OSD upgrade if the OSD migration is pending.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-28 11:27:28 +05:30
sp98 1ad37ecce9 mgr: setting balancer mode from cluster spec
This PR adds a `settings` option in the `Module` struct
which can help users to futher customize the `balancer`
module with a differet mode.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-27 11:30:10 +05:30
subhamkrai 85c25bbc6e ci: fix codespell ci by skipping some words
fixing 'secert' to `secret` and adding workds like
`NotIn, addin` to skip work list.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-05-27 10:26:34 +05:30
Blaine Gardner a138a38cdb Merge pull request #14248 from BlaineEXE/fix-mon-ipv6-networking
mon: fix bind addr when IPv6 and msgr2 are enabled
2024-05-23 07:31:12 -06:00
Blaine Gardner 573a47e736 mon: fix bind addr when IPv6 and msgr2 are enabled
When IPv6-only network mode is enabled and when mons are configured to
listen only on msgrV2 port, Rook has to add the port to the mon
--public-bind-addr in order to force mons to stop listening on the
msgrV1 port. This can cause problems for IPv6 clusters where adding
':<port>' to the end of an IP addr looks like a valid IPv6 address.

In IPv6 mode, Rook needs to set this to '[<ip>]:<port>' with the
brackets to be a non-ambiguous IPv6 address.

In IPv4 mode, Rook needs to keep its existing behavior. IPv4 mode should
also continue to be the defualt assumption if the network config isn't
specified.

If 'dualStack: true' is specified, Rook is informed that the environment
is dual stack, but Rook doesn't know which IP family to expect from the
pod IP. In this scenario, it is safest for Rook not to apply the port,
since assuming either IPv4 or IPv6 format could be incorrect. In this
scenario, mons may still listen on msgrV1 ports, but this is preferable
to an environment where mons perpetually crash.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-05-21 14:42:06 -06:00
subham rai 161306a484 Merge pull request #14186 from parth-gr/heartbeat-node
core: do not watch resourceversion and heartbeat node updates
2024-05-21 16:58:15 +05:30
parth-gr c235a99cf9 core: do not watch resourceversion and heartbeat node updates
currently node predicate watches for resourceVersion and heartbeat
changes, which are not critical things. So with the PR we will add
a early-exit condition for the predicate as an optimization and to
ignore considering for a reconcile of cephcluster if updates are
not crucial

closes: https://github.com/rook/rook/issues/14070

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-05-20 22:25:39 +05:30
NymanRobin 05315ae64f csi: add cephfs encryption support
Ceph-CSI support for fscrypt encryption of cephfs.
To achieve this commit add capability of mounting the
required `rook-ceph-csi-kms-config` configmap into
csi-cephfsplugin-provisioner and nodeplugin pods.

Further it modifies the ClusterRoles `cephfs-csi-nodeplugin` and
`cephfs-external-provisioner-runner` to grant privileges
required for reading encryption configuration and fetching
encryption secrets from either kubernetes secrets or
from a Key Management System (KMS).

These privileges are essential for the proper functioning of
ceph-csi-cephfs with fscrypt encryption.

The following privileges have been added:
- `secrets/get`: Allows reading of secrets for encryption.
- `configmaps/get`: Grants access to configuration maps,
    this is used to read encryption configuration.
- `serviceaccounts/get`: Enables retrieval of service accounts for
    authentication to KMS and for retrieving encryption secrets
    stored there.
- `serviceaccounts/token/create`: Allows creation of service account tokens,
    which are required for authenticating requests to KMS
    when retrieving encryption secrets.

The commit also updated the csi documentation to include cephfs
in the encryption section, with examples updated accordingly.

Signed-off-by: NymanRobin <robin.nyman@est.tech>
2024-05-20 14:03:02 +03:00
Travis Nielsen 2555e51cba Merge pull request #14234 from sp98/remove-owner-ref-in-cleanupjob
core: remove owner refs in resource cleanup jobs
2024-05-18 10:02:00 -06:00
sp98 33ce8f0c8e core: fix missing env in svg cleanup job
SVG cleanup job uses the cephSubvolumeGroup env name
from spec.Name. But sometimes it can be empty. In that
case rook should use the CR name.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-17 18:55:01 +05:30
sp98 c98fc86918 core: remove owner refs in resource cleanup jobs
Removed owner reference from Radosnamespace and
subVolumeGroup cleanup resources.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-05-17 18:39:34 +05:30