Commit Graph
1674 Commits
Author SHA1 Message Date
Travis Nielsen d82f6dee97 Merge pull request #16584 from subhamkrai/ceph-exporter-logcollector
exporter: add log collector for ceph exporter pod
2026-02-10 08:51:43 -07:00
Travis Nielsen ef7ca49281 Merge pull request #16963 from rook/dependabot/go_modules/k8s-dependencies-487114aae1
build(deps): bump sigs.k8s.io/controller-runtime from 0.22.4 to 0.23.0 in the k8s-dependencies group
2026-02-09 12:52:49 -07:00
Blaine Gardner 50ff29140a Merge pull request #17052 from BlaineEXE/osd-cephx-key-init-fix
osd: in cephx key init, don't overwrite key on failure
2026-02-09 12:21:54 -07:00
Blaine Gardner d69ffdfd2c osd: in cephx key init, don't overwrite key on failure
Previously, if the OSD cephx-keyring-update init container couldn't
contact the mons, the output redirect would overwrite the on-disk
keyring file with no text, removing the on-disk keyring.

Modify the init container to only overwrite the keyring file when the
ceph command to get the latest key suceeds, to avoid removing the
on-disk key.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2026-02-09 10:06:27 -07:00
subhamkrai 08344f39f6 build: update deprecated api GetEventRecorderFor
with controller runtime latest version vO.23.0, golangci lint
is complaining about deprecated api deprecated.
This commit updates the api and adds the requried rbacs

Signed-off-by: subhamkrai <srai@redhat.com>
2026-02-09 21:48:02 +05:30
Travis Nielsen 14cb3bd7c2 Merge pull request #16969 from kyrbrbik/fix-osd-info
operator: fix OSD info
2026-02-05 12:54:20 -07:00
subhamkrai 201f6ae104 exporter: add log collector for ceph exporter pod
similar to other ceph pods like osd,mon,mgr,mirror
pod this commit add log collector container to the
main exporter pod to rotate the logs of exporter pod.

Signed-off-by: subhamkrai <srai@redhat.com>
2026-02-05 16:18:05 +05:30
Jan Breitkopf 1ff6f70311 operator: fix OSD info
This fixes OSD info being incomplete when a sidecar container is first
in the .spec.Template.Spec.Containers list.
I added a small helper function to find a container named "osd" instead
of always assuming the first one.

Signed-off-by: Jan Breitkopf <jan.breitkopf@prorocketeers.com>
2026-01-27 11:20:41 +01:00
subhamkrai 20f350a71a csi: remove automated node fencing code
since node fencing is disabled in rook for sometime
and this feature is implemented in csi. So, this
commits remove obsolete code related to node loss

Signed-off-by: subhamkrai <srai@redhat.com>
2026-01-22 15:19:12 +05:30
Travis Nielsen d315d0ce46 mon: change do not reconcile to be more granular
The do-not-reconcile label on the mon deployments was
causing the mon reconcile to be skipped for all mons,
even if the label was only on a single mon. Now, the
skipping of reconcile will only be scoped to a single
mon.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2026-01-20 14:47:19 -07:00
Parth Arora 06ee0db7a2 Merge pull request #16882 from parth-gr/fix-external-admin
external: if admin creds is provided stop creating csi secret
2026-01-12 19:53:06 +05:30
parth-gr 3b07adcd1f external: if admin creds is provided dont stop creating csi secret
if admin secret is created stop creating csi secret from
the rook operator

the csi creds and secret will still be created by the python and
the import script

Signed-off-by: parth-gr <partharora1010@gmail.com>
2026-01-12 19:43:26 +05:30
Travis Nielsen 59e8c41319 Merge pull request #16874 from OdedViner/allow_skipping_reconcile
core: allow skipping cephcluster reconcile via do-not-reconcile label
2026-01-09 12:06:24 -07:00
Oded Viner 5be726b386 core: allow skipping cephcluster reconcile via do-not-reconcile label
add support for ceph.rook.io/do-not-reconcile on cephcluster crs
skip reconcile early and emit a normal reconcile-skipped event
avoid reloadmanager on updates for labeled cephclusters
add unit test for skip behavior

Signed-off-by: Oded Viner <oviner@redhat.com>
2026-01-09 16:29:10 +02:00
Travis Nielsen dfa1a35ddf osd: always mount udev during cleanup
The udev is required for cleanup in both host-based clusters
and pvc-based clusters since the tentacle release.
The cleanup jobs were failing in pvc-based clusters
with tentacle where we skipped adding the udev mount.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2026-01-08 13:33:07 -07:00
dependabot[bot] 3c51e808f2 build(deps): bump the k8s-dependencies group with 6 updates
Bumps the k8s-dependencies group with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [k8s.io/api](https://github.com/kubernetes/api) | `0.34.2` | `0.34.3` |
| [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.34.2` | `0.34.3` |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.34.2` | `0.34.3` |
| [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) | `0.34.2` | `0.34.3` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.34.2` | `0.34.3` |
| [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) | `0.34.2` | `0.34.3` |

Updates `k8s.io/api` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/api/compare/v0.34.2...v0.34.3)

Updates `k8s.io/apiextensions-apiserver` from 0.34.2 to 0.34.3
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.34.2...v0.34.3)

Updates `k8s.io/apimachinery` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.34.2...v0.34.3)

Updates `k8s.io/cli-runtime` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.34.2...v0.34.3)

Updates `k8s.io/client-go` from 0.34.2 to 0.34.3
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.34.2...v0.34.3)

Updates `k8s.io/cloud-provider` from 0.34.2 to 0.34.3
- [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.34.2...v0.34.3)

---
updated-dependencies:
- dependency-name: k8s.io/api
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apiextensions-apiserver
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/apimachinery
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cli-runtime
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/client-go
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
- dependency-name: k8s.io/cloud-provider
  dependency-version: 0.34.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: k8s-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-01-07 07:59:21 -07:00
Travis Nielsen ac73b87256 Merge pull request #16786 from cyanidium/feat/reconcile-secret-config
operator: watch cephConfigFromSecret changes
2025-12-09 09:55:12 -07:00
Travis Nielsen 023608e6fd core: enhance logging with namespaced names
For all of the controllers besides the cluster controller,
the logging now includes the namespaced name of the resource
that is being reconciled. This will help with log troubleshooting
to help analyze logs consistently for the resource being
reconciled.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-12-04 12:00:42 -07:00
subhamkrai 304cdc8c83 core: remove support for reef v18 in Rook v1.19
For Rook v1.19,removing support for Ceph Reef. It is at end of life.
Users on Reef can continue to use Rook v1.18.x or older.
The latest two Ceph versions Squid and Tentacle are supported.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-12-04 13:11:35 +05:30
Martin Rowe 816c67847d operator: watch cephConfigFromSecret changes
Add a resource watch to reconcile clusters when any referenced Secrets
in cephConfigFromSecret are updated. This matches the behaviour of
reconciling clusters when cephConfig changes. Without this change, if a
Secret that is referenced by cephConfigFromSecret is updated, then the
cluster is not immediately updated, so the cluster state will not match
the configuration until something else triggers a reconcile.

Resolves #16371

Signed-off-by: Martin Rowe <martin.p.rowe@gmail.com>
2025-12-04 10:49:05 +10:00
Travis Nielsen f08c5cea27 Merge pull request #16750 from subhamkrai/ceph-tentacle
core: make Ceph Tentacle default version in test clusters
2025-12-01 10:51:16 -07:00
subhamkrai ae41dafb0b core: rename ceph urchin to umbrella
Renaming urchin to umbrella as ceph name for
v21 has been changed from urchin to umbrella.

Signed-off-by: subhamkrai <srai@redhat.com>
2025-12-01 13:41:50 +05:30
Travis Nielsen ac1fa3a4c3 core: shorten the logger names
The logger names are seen on each line of logging. As
long as they are unique, they really don't need to be
long and descriptive, so let's make them a bit more
concise, and independent from controller names.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-11-21 13:12:56 -07:00
Travis Nielsen 93adc5dd6b core: include namespace more consistently in logging
When writing to the operator log, where possible
the namespace of the resource on which the operator
is working will be logged as a standard prefix
to more easily troubleshoot what resource is being reconciled

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-11-20 15:49:43 -07:00
Travis Nielsen 83047a17d1 operator: fix concurrency issues in the cluster controller
Use a sync map for the clusterMap in the cluster controller
and fix other issues to allow for concurrent cluster
reconcile.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-11-17 11:46:33 -07:00
Travis Nielsen b1ce9f226e operator: allow setting concurrent cluster reconciles
The cephcluster controller allows setting concurrent reconciles
with a setting in the operator configmap.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-11-17 11:46:33 -07:00
Travis Nielsen c7dc2439f8 Merge pull request #16505 from elias-dbx/cleanup_preprovision_jobs
osd: cleanup orphaned osd provision jobs
2025-11-13 09:44:59 -07:00
Elias Carter 82a7edc268 osd: cleanup orphaned osd provision jobs
In a running cluster, I noticed that a node which was provisioning was removed from k8s
and the following log was emitted by the rook operator:
```
op-osd: cleaning up dangling OSD prepare status configmap "rook-ceph-osd-xxx-status"
```

But the osd provisioning job was still trying to run on the removed node:
```
rook-ceph-osd-prepare-xxx         Running    0/1           4d22h      4d22h
```

This PR implements a mechanism to remove any osd provision jobs which are bound to a
node which no longer exists within kubernetes. I added a test for this cleanup as
there wasn't a pre-existing test.

Signed-off-by: Elias Carter <elias@dropbox.com>
2025-11-12 12:35:49 -08:00
Travis Nielsen 23fd211544 Merge pull request #16675 from parth-gr/deviceclass-prepare
osd: add device class label to the osd prepare pods
2025-11-12 11:16:08 -07:00
subham rai ca440a6d1b Merge pull request #16679 from huyejia/master
osd: replace Split in loops with more efficient SplitSeq
2025-11-12 15:37:26 +05:30
huyejia a6239dedfe osd: replace Split in loops with more efficient SplitSeq
Signed-off-by: huyejia <huyejia@outlook.jp>
2025-11-12 16:52:12 +08:00
parth-gr 4fcdfaad1f osd: add device class label to the osd prepare pods
currently the device class label was added to the osd pod,
we need the device class label on prepare pod,
so to spread across prpeare pods evenly among the faiure domains
per device class

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-11-10 17:10:05 +05:30
Travis Nielsen d34eeee786 Merge pull request #16669 from YiteGu/use-sync-map-for-monitoringRoutines
core: use sync.Map for cluster.monitoringRoutines
2025-11-06 11:18:35 -07:00
Travis Nielsen a5180adb92 Merge pull request #16617 from Nordix/Sunnatillo/add-networkHost-field-cephMgr
mgr: add hostNetwork field to Manager spec
2025-11-06 09:28:19 -07:00
Yite Gu bf6c295d02 core: use sync.Map for cluster.monitoringRoutines
`cluster.monitoringRoutines` stores three types of
daemon health: "mon", "osd", and "status". These are
used by three goroutines respectively, resulting in:
fatal error: concurrent map reads and map writes.

Signed-off-by: Yite Gu <guyite@bytedance.com>
2025-11-06 19:36:40 +08:00
Sunnatillo b9a4685f65 mgr: add hostNetwork field to Manager spec
Add optinal hostnetwork field for Ceph Mgr to control whether the
mgr pods to run in host network. If unset, this defaults to
cluster level Network.HostNetwork value. This particulary useful
when user wants to restrict ceph mgr pod from exposing metrics
port in all host interfaces.

Signed-off-by: Sunnatillo <sunnat.samadov@est.tech>
2025-11-05 21:52:49 +02:00
Joshua Hoblitt 43f26534ed osd: add CephCluster.spec.storage.OSDMaxUpdatesInParallel
Configures the maximum number of OSDs to update in parallel.

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2025-11-03 12:10:28 -07:00
Travis Nielsen e8e013d88b Merge pull request #16619 from sp98/mon-canary-deletion
mon: wait for the canary pods to be terminated
2025-10-23 10:38:19 -06:00
Travis Nielsen 66ca290f98 Merge pull request #16614 from travisn/osd-resources-device-class
osd: Set osd resources for specific device class
2025-10-23 09:55:09 -06:00
Santosh Pillai 3137a857df mon: wait for the canary pods to be terminated
Wait for the mon-canary pods to be terminated before starting the actual
mons. When topology spread constraints are added to evenly spread the
mons, then pod-anti affinity does not allow mons to be created on the
same node where other mons are running, this also includes the
mon-canary pods. We delete the mon-canary pods and then start the actual
mon pods. Sometimes the termination of the canary pods might take more
time, so schedular won't schedular mon pods on that node.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2025-10-23 21:11:13 +05:30
Travis Nielsen 48b70500fa mon: trap the sigterm in the mon canary
The mon canary should quickly shut down after the pod is
deleted, since it has no purpose to continue running.
Since the sleep does not catch the SIGTERM as pid 1,
use a bash trap to exit quickly.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-10-22 15:37:13 -06:00
Travis NielsenandMatthias Osthues d3c0bacd88 osd: set osd resources for specific device class
The OSDs may require different resources based on their device
class. The overall osd resources were only being used, rather
than properly looking up the specific device class resources.
Now the expected resources will take affect per device class.

Co-authored-by: Matthias Osthues <osthues.matthias@gmail.com>
Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2025-10-22 10:21:40 -06:00
Parth Arora 21536e496e Merge pull request #16610 from parth-gr/fix-v2-v1-mix
external: update rook ceph mon endpoint cm to use v2
2025-10-22 15:39:45 +05:30
parth-gr 3ba911e79e external: update rook ceph mon endpoint cm to use v2
if v2 is enabled update the rook ceph mon endpoint cm
with v2 ports

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-10-21 18:31:55 +05:30
Parth Arora 9277c4f13b Merge pull request #16594 from parth-gr/fix-osd-create-upgrade-loops
osd: add a timeout for osd create and update process
2025-10-15 14:52:20 +05:30
Blaine Gardner 038638e5bc Merge pull request #16603 from BlaineEXE/osd-make-key-pull-best-effort
osd: allow OSD init keyring update to be best-effort
2025-10-14 13:00:24 -06:00
Travis Nielsen 96dda041ee Merge pull request #16595 from parth-gr/fix-status-check
core: fix ceph health check up status check
2025-10-14 10:37:46 -06:00
Blaine Gardner d9d31fe527 osd: allow OSD init keyring update to be best-effort
When OSDs start, init containers attempt to get the latest CephX key for
the OSD to allow OSDs to potentially continue working after key rotation.

However, in Ceph corner cases, mons could be unavailable while OSDs
could still be viable with existing on-disk keys. Since key rotation is
a rare event, it's likely that the on-disk keys are still good.

The worst case scenario is that key updates were needed but didn't
succeed in init containers. In this case, instead of the init container
failing, the OSD startup will fail instead. Thus, this should introduce
no extra risk but merely shift the failure to a different container.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2025-10-14 10:19:21 -06:00
parth-gr 3f5ebe2f4f external: add cluster connected condition in case of external mode
external mode was dependednt on the ceph status to
update the cluster connected condition,
BUt as now the status check will only update the ceph status,
so we will explicitly update the ceph status condition in the
end of the reconcile

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-10-14 18:08:22 +05:30
parth-gr 454c221c53 core: fix cep health check up status check
currently the health checkup was reporting the
condition and reason to be always connected,
But which might not be the case,
So instead of that dont report the condition and
its phase during the health checkups

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-10-13 20:22:07 +05:30