Commit Graph
4409 Commits
Author SHA1 Message Date
Peter Razumovsky 516eab4d8a core: define empty securityContext for pods to fix CIS 5.7.3
Resolves CIS benchmark rule 5.7.3, Pods part. SecurityContext
should be explicitly defined in pod level of Pod spec section.
It is sufficient to specify empty securityContext to satisfy
CIS 5.7.3 rule.

5.7.3 Apply Security Context to Your Pods and Containers

When designing your containers and pods, make sure
that you configure the security context for your pods,
containers, and volumes.

Signed-off-by: Peter Razumovsky <prazumovsky@mirantis.com>
2024-10-09 16:10:03 +04:00
Travis Nielsen 82eada0f98 Merge pull request #14805 from travisn/remove-extra-mon
mon: Do not remove extra mon in middle of failover
2024-10-07 07:19:12 -06:00
subham rai 681f38b888 Merge pull request #14798 from BlaineEXE/mds-liveness-probe-fix-timeout
mds: fix liveness probe timeout
2024-10-07 11:47:15 +05:30
Blaine Gardner ad1bae9e1b mds: fix liveness probe timeout
When the MDS liveness probe times out, it should not fail the probe. If
the cluster has a network partition or other issue that causes the Ceph
mon cluster to become unstable, `ceph ...` commands can hang and cause
a timeout. In this case, the MDS should not be restarted so as to not
cause cascading cluster disruption.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-10-04 16:20:47 -06:00
Travis Nielsen e2cadab6fe mon: do not remove extra mon in middle of failover
If the mon failover is in progress, ensure the removal
of an extra mon deployment is skipped since that code
path only has one mon in the list for the mon that was
just newly started. The extra mon was erroneously removing
a random mon in that case, followed immediately by the mon
failover completing and removing the expected failed mon,
and potentially causing mon quroum loss.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-10-04 14:29:57 -06:00
Travis Nielsen 4083282687 Merge pull request #14801 from rook/bugfix/cephobjectzone-existing-pools
rgw: fix CephObjectZone failing with pre-existing pools
2024-10-03 13:49:15 -06:00
Travis Nielsen e26d5f80ed Merge pull request #14795 from travisn/remove-quincy
core: Remove support for Ceph Quincy
2024-10-03 12:07:39 -06:00
Joshua Hoblitt 76fa776795 rgw: change CephObjectZone.spec.{dataPool,metadataPool} to optional
These fields must be optional in order to allow usage of pre-existing
pools managed by CephBlockPool CR(s).

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2024-10-03 10:56:24 -07:00
Joshua Hoblitt 9b952e0a55 rgw: fix cephObjectStore failing with pre-existing pools
When attempting to use pre-existing (or cephBlockPool managed) pools and
the cephObjectStore.spec.{metadataPool,dataPool} fields are not
specified, rgw creation will fail with this error:

    2024-09-25 21:00:17.744358 E | ceph-object-controller: failed to reconcile CephObjectStore "rook-ceph/test1". failed to create object store deployments: failed to create object pools: failed to create metadata pools: failed to create pool "test1.rgw.control": pool "test1.rgw.control" type is not defined as replicated or erasure coded

Signed-off-by: Joshua Hoblitt <josh@hoblitt.com>
2024-10-03 10:16:30 -07:00
Travis Nielsen b665d7a7b7 core: remove support for ceph quincy
Given that Ceph Quincy (v17) is past end of life,
remove Quincy from the supported Ceph versions,
examples, and documentation.

Supported versions now include only Reef and Squid.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-10-03 11:12:55 -06:00
Michael Adam ab8fd90aa6 core: add ROOK_REVISION_HISTORY_LIMIT operator setting
This adds an operator config setting ROOK_REVISION_HISTORY_LIMIT
defaulting to kubernetes'value for RevisionHistoryLimit.

If configured, the provided value will be used as RevisionHistoryLimit

for all Deployments rook creates.

Fixes: #12722

Signed-off-by: Michael Adam <obnox@samba.org>
2024-10-02 19:40:37 +02:00
Travis Nielsen 9bd70ef152 Merge pull request #14755 from sp98/pool-application
core: preserve pool application name change
2024-10-01 11:00:44 -06:00
Travis Nielsen 4eb278915a Merge pull request #14782 from parth-gr/csi-fix-logrotate
csi: add sc privileged to logrotate sidecar container
2024-10-01 09:55:24 -06:00
parth-gr 21ca333ed7 csi: add sc privileged to logrotate sidecar container
deployments on openshift where we need csi container pods
to be run on privileged, the logrotate sidecar container was missing the
privileged permission letting, side car to not run properly

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-09-30 20:14:09 +05:30
Santosh Pillai 1a95d6f533 core: preserve pool application name change
default application name is updated inside the `CreatePool` method. Send
pool spec as address in order to preserve this change.

Signed-off-by: Santosh Pillai <sapillai@redhat.com>
2024-09-25 12:12:01 +05:30
subhamkrai b818dd1c7d build: keep specific z version in go mod 1.22.5
let's keep specific z version in go.mod 1.22.5.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-09-24 18:14:19 +05:30
parth-gr 166e4f35b2 csi: fix the disable driver flag in the csi driver reconcile
ROOK_CSI_DISABLE_DRIVER was not working accurate
from https://github.com/rook/rook/pull/14489
The csi driver was installed even if its not
expected

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-09-20 20:30:17 +05:30
Travis Nielsen ab9fa00e7a Merge pull request #14731 from travisn/crash-annotations
core: Enable annotations on crash collector
2024-09-19 11:48:19 -06:00
Travis Nielsen d4f3bf3f2c Merge pull request #14717 from cobaltcore-dev/ceph_exporter_config
Configure prio-limit for ceph exporter container
2024-09-18 14:15:17 -06:00
Praveen M afad40e404 csi: update csi-addons to v0.10.0
The csi-addons v0.10.0 release is now available.
Ref: https://github.com/csi-addons/kubernetes-csi-addons/releases/tag/v0.10.0

Signed-off-by: Praveen M <m.praveen@ibm.com>
2024-09-18 12:19:46 +05:30
Travis Nielsen fa2941d098 core: enable annotations on crash collector
The crash collector daemon had missed the ability to
add custom annotations via the cephcluster CR, as already
supported for all the other daemons.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-09-17 14:24:44 -06:00
subham rai 27877339d3 Merge pull request #14726 from rook/dependabot/go_modules/k8s-dependencies-05f9a3f484
build(deps): bump the k8s-dependencies group with 6 updates
2024-09-17 12:13:28 +05:30
dependabot[bot] c8a64c4975 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.31.0` | `0.31.1` |
| [k8s.io/apiextensions-apiserver](https://github.com/kubernetes/apiextensions-apiserver) | `0.31.0` | `0.31.1` |
| [k8s.io/apimachinery](https://github.com/kubernetes/apimachinery) | `0.31.0` | `0.31.1` |
| [k8s.io/cli-runtime](https://github.com/kubernetes/cli-runtime) | `0.31.0` | `0.31.1` |
| [k8s.io/client-go](https://github.com/kubernetes/client-go) | `0.31.0` | `0.31.1` |
| [k8s.io/cloud-provider](https://github.com/kubernetes/cloud-provider) | `0.31.0` | `0.31.1` |

Updates `k8s.io/api` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/api/compare/v0.31.0...v0.31.1)

Updates `k8s.io/apiextensions-apiserver` from 0.31.0 to 0.31.1
- [Release notes](https://github.com/kubernetes/apiextensions-apiserver/releases)
- [Commits](https://github.com/kubernetes/apiextensions-apiserver/compare/v0.31.0...v0.31.1)

Updates `k8s.io/apimachinery` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/apimachinery/compare/v0.31.0...v0.31.1)

Updates `k8s.io/cli-runtime` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/cli-runtime/compare/v0.31.0...v0.31.1)

Updates `k8s.io/client-go` from 0.31.0 to 0.31.1
- [Changelog](https://github.com/kubernetes/client-go/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kubernetes/client-go/compare/v0.31.0...v0.31.1)

Updates `k8s.io/cloud-provider` from 0.31.0 to 0.31.1
- [Commits](https://github.com/kubernetes/cloud-provider/compare/v0.31.0...v0.31.1)

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

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 14:22:01 -06:00
dependabot[bot] 18d32ba381 build(deps): bump the github-dependencies group with 4 updates
Bumps the github-dependencies group with 4 updates: [github.com/hashicorp/vault/api](https://github.com/hashicorp/vault), [github.com/k8snetworkplumbingwg/network-attachment-definition-client](https://github.com/k8snetworkplumbingwg/network-attachment-definition-client), [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) and [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator).

Updates `github.com/hashicorp/vault/api` from 1.14.0 to 1.15.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.14.0...v1.15.0)

Updates `github.com/k8snetworkplumbingwg/network-attachment-definition-client` from 1.7.1 to 1.7.3
- [Release notes](https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/releases)
- [Commits](https://github.com/k8snetworkplumbingwg/network-attachment-definition-client/compare/v1.7.1...v1.7.3)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.76.1 to 0.76.2
- [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.76.1...v0.76.2)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.76.1 to 0.76.2
- [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.76.1...v0.76.2)

---
updated-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/k8snetworkplumbingwg/network-attachment-definition-client
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
- dependency-name: github.com/prometheus-operator/prometheus-operator/pkg/client
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: github-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-09-16 14:20:26 -06:00
Artem Torubarov b2c39ace25 exporter: move config to cluster CRD
allows to set prio-limit and stats-period options to ceph exporter

Signed-off-by: Artem Torubarov <artem.torubarov@clyso.com>
2024-09-16 14:51:49 +02:00
Blaine Gardner 645ae2b86f object: add missing codegen from pool placements
When pool placements were recently added to the object store CRD, it
seems that codegen didn't get run, and Rook's CI didn't accurately catch
the codegen issue. This will address adding the missing generated code.
Follow-up work will address fixing CI so that it doesn't continue
missing when codegen needs to be run.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-09-11 11:05:52 -06:00
Travis Nielsen b9188c793a pool: allow negative step num in crush rule
The crush rules may have a negative step num.
Rook had assumed negative values were not possible,
but just had not been encountered previously in
a custom crush rule.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-09-09 13:27:54 -06:00
Travis Nielsen b16c1f223e Merge pull request #14588 from cobaltcore-dev/rgw-pool-placement
Rgw pool placement
2024-09-09 11:16:54 -06:00
Travis Nielsen b47e739de1 Merge pull request #14693 from subhamkrai/skip-deleting-csi-op
csi: stop deleting csi-operator resources
2024-09-09 10:42:22 -06:00
Travis Nielsen 32cac16b27 Merge pull request #14653 from sp98/check-duplicate-fs-pool-name
core: check for duplicate ceph fs pool names
2024-09-09 10:39:56 -06:00
subhamkrai a16ad75c92 csi: stop deleting csi-operator resources
to keep it simple we'll not delete the csi-operator resources
we'll only document this for users who want to switch to csi-drivers.
Anyways by next release we'll only support csi-operator only.

Signed-off-by: subhamkrai <srai@redhat.com>
2024-09-08 10:57:53 +05:30
Madhu Rajanna d041be4bcf csi: update to new cephcsi release
we have 3.12.2 as the new cephcsi release
updating the rook to use the same.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-09-06 16:17:24 +02:00
Artem Torubarov 59175f0b40 rgw: pool placement
Signed-off-by: Artem Torubarov <torubarov.a.a@gmail.com>
2024-09-06 16:02:53 +02:00
Travis Nielsen 772a4fa73c Merge pull request #14667 from travisn/remove-mon-race
mon: Remove extra mon from quorum before taking down pod
2024-09-05 11:11:46 -06:00
Michael Adam e378588359 network: add a new operator config setting ROOK_ENFORCE_HOSTNETWORK
This new setting is of Boolean type and defaults to "false".

    When set to "true", it changes the behavior of the
     rook operator to
    nable host network on all pods created by the cephcluster controller

     new method to check the setting:  opcontroller.EnForceHostNetwork()

Signed-off-by: Michael Adam <obnox@samba.org>
2024-09-05 17:34:13 +02:00
Travis Nielsen 8987d26a6d mon: remove extra mon from quorum before taking down pod
When removing a mon from quorum, there is a race condition that
can result in mon quorum going being lost at least temporarily.
The mon pod was being deleted first, and then the mon removed
from quorum. If any other mon went down between the time the
pod of the bad mon was deleted and when the mon was removed from
quorum, there may not be sufficient quorum to complete the
action of removing the mon from quorum and the operator would
be stuck.

For example, there could be 4 mons temporarily due to timing
of upgrading K8s nodes where mons may be taken down for some
number of minutes. Say a new mon is started while the down
mon also comes back up. Now the operator sees it can remove
the 4th mon from quorum, so it starts to remove it. Now say
another mon goes down on another node that is being updated
or otherwise drained. Since the 4th mon pod was deleted
and another mon is down, there are only two mons remaining
in quorum, but 3 mons are required in quorum when there
are 4 mons. Therefore, the quorum is stuck until the
third mon comes back up.

The solution is to first remove the extra mon from quorum
before taking down the mon pod.

Signed-off-by: Travis Nielsen <tnielsen@redhat.com>
2024-09-04 13:06:22 -06:00
Travis Nielsen 04eecf7ab1 Merge pull request #14645 from Papawy/cleanup-metadata-wal
osd: discover metadata and wal devices for raw device cleanup
2024-09-03 13:50:17 -06:00
Madhu Rajanna 05d579b607 csi: update csi-addons to v0.9.1
updating csi-addons to latest
v0.9.1 release.

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
2024-09-03 12:52:00 +02:00
Mathias Chapelain 52ca68d46e osd: discover metadata and wal devices for raw device cleanup
When doing the clean-up of raw device OSDs, it was not taking metadata
and wal devices into account. This commit discover them via the output
of `ceph-volume raw list`, which is returning `device_db` and/or
`device_wal` if they are present.

After discovering the metadata and wal device it also clean them and
close the encrypted device if any.

Signed-off-by: Mathias Chapelain <mathias.chapelain@proton.ch>
2024-08-29 08:47:32 +02:00
Blaine Gardner 6a4c87dc92 Merge pull request #14616 from BlaineEXE/rgw-allow-extra-volumes
rgw: allow users to add custom volume mounts
2024-08-28 16:47:23 -06:00
Blaine Gardner eea43b7b79 rgw: allow users to add custom volume mounts
Allow RGW users to mount arbitrary volumes to RGW pods. This follows the
pattern that was established for NFS to support SSSD and LDAP, and
reuses much of the same code.

This opens the door wider for advanced users to take advantage of some
Ceph RGW features that Rook doesn't have first class support for.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-08-27 16:16:53 -06:00
sp98 8fa8612201 core: check for duplicate ceph fs pool names
Only single pool will get created if there are multiple
data pool entries with same name. This PR just adds a check
to fail if duplicate pools are present.

Signed-off-by: sp98 <sapillai@redhat.com>
2024-08-27 10:40:35 +05:30
Travis Nielsen 5218e1d70e Merge pull request #14630 from chanyoung/fix_osx_make_test
tests: fix unit test failure on macOS due to temp directory path
2024-08-23 07:15:49 -06:00
Benoît Knecht 1c45677f5e core: fix Ceph monitor deployment in separate zones
Previously, Rook would fail to create monitors for a `CephCluster` spec that
required them to be located in distinct failure domains:

```yaml
spec:
  mon:
    count: 3
    failureDomainLabel: topology.kubernetes.io/zone
    zones:
    - eu-central-1a
    - eu-central-1b
    - eu-central-1c
```

This was due to the fact that Rook was mistakenly getting the
`failureDomainLabel` from `spec.mon.stretchCluster.failureDomainLabel`.

This commit ensures `spec.mon.failureDomainLabel` is being used instead, which
fixes the cluster deployment for the spec above.

Signed-off-by: Benoît Knecht <bknecht@protonmail.ch>
2024-08-23 09:06:55 +02:00
chanyoung d77f6e5e3d tests: fix unit test failure on macOS due to temp directory path
Use os.TempDir() instead of '/tmp'. This is for the peermap tests.

Signed-off-by: chanyoung <park910113@gmail.com>
2024-08-23 09:38:32 +09:00
subhamkrai 1a5c3662b9 build(deps): bump the github-dependencies group with 3 updates
Bumps the github-dependencies group with 3 updates: [github.com/ceph/go-ceph](https://github.com/ceph/go-ceph), [github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring](https://github.com/prometheus-operator/prometheus-operator) and [github.com/prometheus-operator/prometheus-operator/pkg/client](https://github.com/prometheus-operator/prometheus-operator).

Updates `github.com/ceph/go-ceph` from 0.28.0 to 0.29.0
- [Release notes](https://github.com/ceph/go-ceph/releases)
- [Changelog](https://github.com/ceph/go-ceph/blob/master/docs/release-process.md)
- [Commits](ceph/go-ceph@v0.28.0...v0.29.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/apis/monitoring` from 0.75.2 to 0.76.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](prometheus-operator/prometheus-operator@v0.75.2...v0.76.0)

Updates `github.com/prometheus-operator/prometheus-operator/pkg/client` from 0.75.2 to 0.76.0
- [Release notes](https://github.com/prometheus-operator/prometheus-operator/releases)
- [Changelog](https://github.com/prometheus-operator/prometheus-operator/blob/main/CHANGELOG.md)
- [Commits](prometheus-operator/prometheus-operator@v0.75.2...v0.76.0)

---
updated-dependencies:
- dependency-name: github.com/ceph/go-ceph
  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: subhamkrai <srai@redhat.com>
2024-08-21 16:02:30 +05:30
Blaine Gardner afdfffac67 Merge pull request #14435 from parth-gr/osd-resize
osd: reweight osd while resizing
2024-08-20 12:14:22 -06:00
Justin Cichra 74a79b24b3 core: add configuration option for metrics bindAddress
Alerting on controller-runtime's workqueue_depth can be useful for
debugging controllers. Also having a prometheus target for a pod gives
another data point that the system is working as expected. It is useful
for uptime alerts.

Make the bind address configurable via the configmap while still retaining the default
behavior that it is disabled.

Resolves: #14538

Signed-off-by: Justin Cichra <jcichra@cloudflare.com>
2024-08-20 13:38:38 -04:00
Travis Nielsen 128dcddfcf Merge pull request #14599 from subhamkrai/update-csi-operator-version
csi: update csi-operator to use latest tag v0.1
2024-08-20 11:26:44 -06:00
parth-gr 17cfda5bd6 osd: reweight osd while resizing
osd got resized by cryptsetup bluestore cmd
but it should also be reweight to balance the pgs properly

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-08-20 22:52:33 +05:30