Commit Graph
3645 Commits
Author SHA1 Message Date
subham rai 3bca305a64 Merge pull request #16013 from travisn/contains-images
namespace: Report empty condition for rados namespace
2025-06-17 10:01:41 +05:30
Travis Nielsen d7d399819d Merge pull request #16000 from OdedViner/delete-csi-cm
csi: delete rook-ceph-csi-config if csi operator is enabled
2025-06-16 10:27:53 -06:00
Oded Viner 0a9100be83 csi: delete rook-ceph-csi-config if csi operator is enabled
removes the rook-ceph-csi-config configmap when
switching to external csi operator

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-06-15 12:48:24 +03:00
Travis Nielsen b47f297608 namespace: report empty condition for rados namespace
The rados namespace status was not reporting if the namespace
was empty. Now the condition will be properly updated if
it is empty.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-06-13 10:06:37 -06:00
Travis Nielsen 433a16c090 Merge pull request #15951 from OdedViner/target_size_ratio_negative
pool: support targetSizeRatio=0 and default compressionMode=""
2025-06-11 07:35:24 -06:00
Oded Viner 41d6baf0e1 core: fix radosnamespace log message
change logger.info to logger.infof to correctly print
radosnamespace name and namespace

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-06-11 14:29:28 +03:00
Oded Viner dd65dc15d8 pool: support targetSizeRatio=0 and default compressionMode=""
allow targetSizeRatio == 0
enforce targetSizeRatio >= 0 via +kubebuilder:validation
set targetSizeRatio and compressionMode="" if unset
remove IsTargetRatioEnabled() and IsCompressionEnabled()

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-06-11 12:36:19 +03:00
Blaine Gardner 029c345372 Merge pull request #15813 from BlaineEXE/auth-rotate
object: automate RGW cephx key rotation
2025-06-10 12:51:50 -06:00
Blaine Gardner 5f50e85a25 object: implement cephx key rotation for rgw keys
This is the first implementation of CephX key rotation in Rook.
Adds key rotation API from design PR 15915.

Also add helper methods for rotating keys, determining when keys
need to be rotated, and for generating CephX key statuses. These will be
reusable for other Rook reconciles beyond object/RGW.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-06-10 09:06:58 -06:00
Santosh Pillai 2c1bb7443a Merge pull request #15796 from sp98/clean-osd-disks-from-old-clusters
osd: clean osd disks before reinstalling cluster
2025-06-09 14:03:49 +05:30
Santosh Pillai 2bcf196b15 osd: clean osd disks before reinstalling cluster
Allow force creation of OSD on a device previously configured in a different ceph cluster.
The OSD prepare pod job will zap the OSD disk using ceph-volume lvm zap
if that disk has metadata from a different ceph cluster.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-06-06 16:32:18 +05:30
Praveen Hosamani 0c0e94e43c build: make imagePullPolicy dynamic
Signed-off-by: Praveen Hosamani <praveen.h119@gmail.com>
2025-06-06 12:51:03 +02:00
parth-gr 58eb75b13b nfs: use tabs instead of spaces in nfs rgw config
currently it was using two tabs, but
others config are using one tab
So update the config to use one tag

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-06-03 19:44:53 +05:30
Travis Nielsen a44940d924 Merge pull request #15887 from travisn/debug-log-label
osd: Debug log for long image names in label
2025-05-30 13:34:25 -06:00
Travis Nielsen 232bf862a0 Merge pull request #15909 from parth-gr/add-do-not-reconcile-master
nfs: fix the skip reconcile call
2025-05-30 11:11:11 -06:00
parth-gr 79f44a4660 nfs: fix the skip reconcile call
currently nfs is used as the unique selector
for daemon id, which returns  nfs: ocs-storagecluster-cephnfs-a

Updating the has() to function to check the same label value
(n.Name + "-" + id)

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-05-30 09:11:49 +05:30
subhamkrai d86aa28f30 osd: don't set dmcrypt env in prepare pod job spec
this commit remove the code which sets the dmcrypt encryption
key from secret as environment variable in the prepare pod job
spec. Now, the env will be set under function `setKEKinEnv`, which
tries to reads secret from k8s first method `c.IsK8s()`under
`GetSecret` and then check for KMS to ready and apply env directly.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-05-29 14:31:33 +05:30
Oded Viner 0b988e4e05 core: fix comment for reconcilecephcluster
update comment to correctly state that reconcilecephcluster
manages the cephcluster object, not cephfilesystem.

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-05-28 21:48:56 +03:00
Travis Nielsen 1d93da0987 Merge pull request #15889 from patrostkowski/feature/skip-nfs-15876
nfs: skip NFS daemon reconciliation when labeled with skip-reconcile
2025-05-27 16:11:08 -06:00
Carlos Barria c63ebbe0e3 core: fix golangci-lint check ST1019
This change cleans up and standardizes import statements across the Ceph operator code. It removes redundant or duplicate imports and reorganizes alias names for improved clarity and consistency. Additionally, the ST1019 exception was removed from .golangci.yaml now that the code complies with the rule.

Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-27 17:38:22 -04:00
Patryk Rostkowski 612e54e1ae nfs: skip NFS daemon reconciliation when labeled with skip-reconcile
This change adds support for skipping reconciliation of CephNFS daemons
that are labeled with `ceph.rook.io/skip-reconcile=true`.
Similar to MDS, MGR, and RGW components, this allows cluster operators
to prevent Rook from modifying specific NFS daemon deployments.

Signed-off-by: Patryk Rostkowski <patrostkowski@gmail.com>
2025-05-27 23:35:53 +02:00
Carlos Barria 030ada45b0 core: fix golangci-lint check QF1003 QF1002
Refactored multiple conditional if-else blocks into switch statements to improve readability and maintainability. Also removed outdated staticcheck rule comments (QF1002, QF1003) from .golangci.yaml.

Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-27 13:49:49 -04:00
Carlos Barria 8afc4ee548 core: fix golangci-lint check QF1004
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-22 11:21:45 -04:00
Travis Nielsen 57585ba151 osd: debug log for long image names in label
Labels cannot be longer than 64 characters, and if the image name
is too long we log a verbose message about the label that we can
just log now as debug level.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-05-21 15:21:30 -06:00
Oded Viner 83ce9a6a63 core: improve reporting for reconcile requeue cases
when a reconcile returns a requeue result without an error
(e.g. due to a missing cephcluster), the previous logic reported
it as a successful reconcile. this was misleading and made it
hard to understand the actual controller behavior this
change adds a new condition to log and emit a "requeuing" event
when reconcileResponse.Requeue is true and err is nil.
this ensures more accurate event reporting and improves observability across
all controllers using reportreconcileresult.

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-05-21 15:43:05 +03:00
Travis Nielsen 232012ecc8 Merge pull request #15879 from cbarria/fix-staticcheck-ST1023-QF1011
core: fix golangci-lint check ST1023 QF1011
2025-05-20 16:03:19 -06:00
Carlos Barria 4555522335 core: fix golangci-lint check ST1023 QF1011
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-20 14:53:10 -04:00
Travis Nielsen 7feb7ef42f Merge pull request #15867 from OdedViner/enable-csi-metadata
csi: enable CSI Metadata Injection by Default
2025-05-20 10:46:43 -06:00
Niels de Vos a168c40008 csi: update Kubernetes CSI sidecar images to current versions
The Kubernetes CSI sidecars have had several releases that were not
included in deployments by Rook yet, update them to the versions that
are available today:

- csi-attacher:v4.8.1
- csi-provisioner:v5.2.0
- csi-resizer:v1.13.2
- csi-snapshotter:v8.2.1

This change is important, because Ceph-CSI will implement the new
Controller.GetSnapshot CSI procedure. A bug in csi-lib-utils causes a
panic when a ControllerCapability is provided, but not (yet) known to
the CSI sidecars. The updated sidecars consume a version of
csi-lib-utils with a fix for that panic.

See-also: kubernetes-csi/csi-lib-utils#188
Signed-off-by: Niels de Vos <ndevos@ibm.com>
2025-05-20 14:24:02 +02:00
Carlos Barria 61494d1baf core: fix golangci-lint check ST1005
Signed-off-by: Carlos Barria <cbarria@yahoo.com>
2025-05-19 17:52:22 -04:00
subham rai 9cd9ffa9c5 Merge pull request #15853 from subhamkrai/add-cache-index-svg
core: delete old svg/rns cr with same svg/rns  name
2025-05-19 21:32:11 +05:30
subhamkrai ebc1671ab7 namespace: delete old rns cr with same block pool name
there can be a scenario where a new RNS CR is created with
the same spec.blockPoolName and spec.name, in that case we want to delete
the old RNS CR without checking dependent child resources.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-05-19 20:53:24 +05:30
Oded Viner ce59c72eb1 csi: enable CSI Metadata Injection by Default
This PR sets CSI_ENABLE_METADATA to true by default in the
Rook configuration, ensuring that the --setmetadata=true
flag is added to CSI nodeplugin pods

Signed-off-by: Oded Viner <oviner@redhat.com>
2025-05-19 16:17:13 +03:00
subham rai 50877aa937 Merge pull request #15862 from travisn/prometheus-error
mgr: Continue cluster reconcile even if prometheus not installed causing service monitor to fail creation
2025-05-16 21:58:56 +05:30
subhamkrai 1ef660f749 subvolumegroup: delete old svg cr with same svg fs name
there can be a scenario where a new svg cr is created with
the same svg.filesystem and svg.spec.name, in that case we want to delete
the old svg CR without checking dependent child resources.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-05-16 11:46:19 +05:30
Travis Nielsen 0ce40c4fef Merge pull request #15824 from parth-gr/osd-resize-pv
osd: osd should watch for pvc resize
2025-05-15 14:11:44 -06:00
Travis Nielsen ca12916438 mgr: continue reconcile if prometheus not installed
When monitoring is enabled, if the service monitor fails
creation, the reconcile will fail and rook will never
create the OSDs. A number of users have been blocked during
install due to this issue. Let's allow reconcile of the
full cluster even in this error case. After they install
prometheus, they would then need to trigger a reconcile again
perhaps by restarting the rook operator to enable
the service monitor.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-05-15 13:11:29 -06:00
parth-gr 94450c0db7 osd: osd should watch for pvc resize
With a osd resize operation, currently pvc and pv may
takes more time then expected.
And so the osd dont get resized and need manual re-start
as currently we don't have a watch on osd's
controller that watches pv and get it resized.

add a wait time till pvc is not resized

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-05-15 12:42:04 +05:30
Santosh Pillai fe77108e1e rgw: fix do-not-reconcile label
fix do-not-reconcile label to prevent RGW deployment reconcile if
`ceph.rook.io/do-not-reconcile:<storeName>` is applied.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-05-12 16:59:56 +05:30
Joshua Hoblitt f1fad531eb object: change CephObjectStore "foo" found log level to debug
When multiple `CephObjectStoreUser` CRs are present, the operator logs a
high volume of `CephObjectStore "foo" found` messages during reconcile.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-05-08 09:28:19 -07:00
Travis Nielsen 530223c5b4 namespace: add conditions blocking deletion for rados namespace
When a rados namespace is deleted, it cannot be purged
until its images and snapshots are deleted. Now a condition
is being added to the rados namespace CR status so the user
does not need to read the operator log to discover the cause.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-05-07 15:42:17 -06:00
Travis Nielsen 0a3a599580 block: add condition for deletion blocked with images
When the blockpool is deleted and there are images or
snapshots in the pool, the deletion is blocked by the
finalizer until they are all removed. The condition added
to the cephblockpool status only indicated if there were
radosnamespace dependencies. A new condition is now added
to describe if there are images or snapshots.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-05-07 15:42:17 -06:00
Blaine Gardner e3149e36e8 Merge pull request #15605 from cobaltcore-dev/rgw-ops-log-rename
rgw: use pod name in ops log filename
2025-04-30 09:41:04 -06:00
subham rai a4615c5eaa Merge pull request #15793 from flx5/feature/cephfs-encryption-caps
ceph: Update caps to include executable permission
2025-04-30 20:01:38 +05:30
Artem Torubarov d5e4df2186 rgw: cleanup prev ops log config from mon db
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2025-04-30 10:00:14 +02:00
Travis Nielsen 9237157e0c Merge pull request #15801 from jrcichra/exporter-containerport-name
exporter: add name to containerPort
2025-04-29 13:13:59 -06:00
Justin Cichra 12c36e9472 exporter: add name to containerPort
Named containerPort is a useful feature when generating dynamic scrape
targets with prometheus.

This makes it clear that the containerPort is intended for metrics
scraping.

The name matches that which is on the mgr deployment.

Signed-off-by: Justin Cichra <jcichra@cloudflare.com>
2025-04-29 14:34:25 -04:00
Felix Prasse 8f53522162 csi: update caps to include executable permission
ceph-csi uses an exclusive lock for cryptfs operations. This needs the x capability on the metadata pool.

Fixes #15283

Signed-off-by: Felix Prasse <1330854+flx5@users.noreply.github.com>
2025-04-29 19:48:40 +02:00
subhamkrai fe776fd4fe rbdmirror: logs message should not end with period
improving logging to include name and namespace of resource
and also namespace should not end with period.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-04-29 20:55:36 +05:30
Artem Torubarov c1fd2f2ee8 rgw: use pod name in ops log filename
Signed-off-by: Artem Torubarov <artem.torubarov@sap.com>
2025-04-29 09:43:35 +02:00