Commit Graph
580 Commits
Author SHA1 Message Date
parth-gr bf5252e139 external: fix client healhchecker user keyring return
if the client.health checker already exited it was
returning extra information, It was making the structure and
return JSON non idempotent output, So fixed
that problem by returning a single value

Signed-off-by: parth-gr <paarora@redhat.com>
2023-10-05 16:04:13 +05:30
Blaine Gardner 0c721e05d5 multus: allow node profiles in validation test
Add the ability to specify node profiles in the multus validation test.

This addresses a few points of early feedback on the validation tool.
Statements below critique the tool's behavior before this patch.
1. The tool assumes all daemons are on public and cluster network, which
   means users who have a significantly smaller cluster net (a
   design choice) cannot run a single test to determine if Rook is
   likely to install correctly.
2. The tool does not have placement options to select only a subset of
   Kubernetes nodes to run validation on.
3. Users of multus seem to have a dedicated pool of storage nodes more
   often than the average Rook install. This makes sense for security-
   and perforance-minded users. The tool cannot run a single test to
   verify storage-only and general-workload nodes at one time.

These points are addressed by allowing users to specify configurations
for different "NodeTypes."

Each NodeType config has options for selecting the number of OSDs as
well as the number of other (non-OSD) Ceph daemons. This limits the
unnecessary exhaustion of cluster network addresses from critique 1.

Each NodeType config has its own placement (critique 2).

Users can define as many NodeTypes as needed to test the network for
their planned CephCluster. Specifically, this allows the tool to test
storage-only nodes and generalized-workload nodes at the same time. An
arbitrary number of NodeTypes are allowed to support even more highly
specialized cluster setups, such as multiple tiers of storage nodes
where some storage-only nodes may run more OSDs than others.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-10-04 15:26:35 -06:00
Blaine Gardner e74333ddcd Merge pull request #12633 from thotz/cosi-user-creation
object: create cosi user for each object store
2023-10-04 10:05:36 -06:00
Redouane Kachach aa59e3bb86 ci: fixing linter error
Fixing linter error (using variable 'urllib' before assignment)
Adding logic to properly import urlencode depending on python version

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

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-10-04 09:40:49 +02:00
Redouane Kachach b3dd74ea20 docs: fixing some spelling issues
closes: https://github.com/rook/rook/issues/12987

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-10-03 13:50:17 +02:00
Travis Nielsen b7eaba318c Merge pull request #12941 from subhamkrai/update-caps
external: update healthchecker caps for rbd command
2023-09-27 22:55:31 -06:00
subhamkrai c78bd1cbc6 external: update healthchecker caps for rbd command
when creating networkFence CR, it requires IP's to block
which we get from running `rbd status ...` command. But,
the client.healthchecker user didn't had the right caps
to run hence it was giving error. Now, adding the required
caps `profile rbd-read-only` to osd so that rbd command can
be executed.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-09-28 08:21:21 +05:30
Travis Nielsen 33fb7b801b Merge pull request #12926 from rkachach/fix_issue_12876
mgr: adding support for prometheus endpoint configuration
2023-09-27 08:09:13 -06:00
Redouane Kachach c763935436 mgr: adding support for prometheus endpoint configuration
Using the new configuration parameters prometheusEndpoint and
prometheusEndpointSSLVerify users can configure dashboard to
point to their prometheus instance.

closes: #12876

Signed-off-by: Redouane Kachach <rkachach@redhat.com>
2023-09-27 11:07:18 +02:00
Jiffin Tony Thottan a941b3c33f object: create cosi user for each object store
Create each cosi user for each object store and secret which holds
credentials.

Signed-off-by: Jiffin Tony Thottan <thottanjiffin@gmail.com>
2023-09-19 13:48:58 +05:30
Cyril Jouve 45d897b8b3 helm: obc rbac aggregation to user facing roles
add view & edit ClusterRole for obc.

the roles are added to the default user facing roles
view / edit / admin respectively using k8s ClusterRole aggregation.

feature disabled for backward compatibility
and controlled with rbacAggregate.enableOBCs.

Signed-off-by: Cyril Jouve <jv.cyril@gmail.com>
2023-09-19 10:14:20 +02:00
Travis Nielsen a3dafbe9cf Merge pull request #12715 from sp98/osd-sleep
osd: make osd pod to sleep when osds are flapping
2023-09-15 12:24:08 -06:00
sp98 4eb9f62205 osd: make osd pod to sleep when osds are flapping
When OSDs flap, ceph stops the OSD daemon if its marked down greater than
5 times in 600 seconds. But OSD pod restarts and marks the OSD `up` again.
This causes the PGs mapped to these OSDs to peer. While the PGs are peering,
IO to these PGs are blocked.

So we need to ensure that if ceph is marking OSD `down` due to flapping, OSD pod
should not restart to mark the OSDs `up` again.

This PR adds a sleep to the OSD pod if the container returned with a 0 exit code
Default behavior is to sleep for 6 hrs. But user can configure it from the
ceph cluster spec.

Signed-off-by: sp98 <sapillai@redhat.com>
2023-09-15 22:59:46 +05:30
Travis Nielsen 8da6deaafe Merge pull request #12895 from travisn/multiple-mgr
mgr: Allow more than two mgrs
2023-09-14 15:02:33 -06:00
travisn 66547d27be mgr: allow more than two mgrs
While two mgrs is considered sufficient, more mgr daemons are
now allowed in case the admin wants even more fault tolerance
to the active mgr going down, in case multiple mgrs go down.
Up to five mgr pods will be allowed. All mgrs will be in
standby mode except one active mgr. All mgr pods have a sidecar
that will update their respective pod specs with the active
or passive label.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-09-14 13:29:11 -06:00
Mike Hobbs 54d7839b0d helm: add servicemonitor namespace override
The prometheus helm chart (kube-prometheus-stack) allows you to restrict
which namespaces prometheus will check for ServiceMonitor objects,
because of this is is typical to be able to configure the namespace of
your ServiceMonitors in helm charts, which is the functionality I have
added here.

Signed-off-by: Mike Hobbs <biz812g@gmail.com>
2023-09-13 14:16:07 +01:00
Micah Nagel 0ff224d453 helm: update docs to reflect reef support
some helm comments incorrectly indicate ceph v18 is not supported

Signed-off-by: Micah Nagel <micah.nagel@defenseunicorns.com>
2023-09-08 12:11:58 -06:00
Blaine Gardner 17f0072d9d Merge pull request #12778 from BlaineEXE/multus-allow-cidr-spec
multus: allow using NADs without inspectable CIDRs
2023-09-07 13:42:41 -06:00
Blaine Gardner 3c43268d0a multus: detect network CIDRs via canary
Change how Rook detects network CIDRs for Multus networks. The IPAM
configuration is only defined as an arbitrary string JSON blob with a
"type" field and nothing more. Rook's detection of CIDRs for whereabouts
had already grown out of date since the initial implementation.
Additionally, Rook did not support DHCP IPAM, which is a reasonable
choice for users. And more, Rook did not support CNI plugin chaining,
which further complicates NADs. Based on the CNI spec, network chaning
can result in any changes to network CIDRs from the first-given plugin.

All these problems make it more and more difficult for Rook to support
Multus by inspecting the NAD itself to predict network CIDRs. Instead,
it is better for Rook to treat the CNI process as a black box. To
preserve legacy functionality of auto-detecting networks and to make
that as robust as possible, change to a canary-style architecture like
that used for Ceph mons, from which Rook will detect the network CIDRs
if possible.

Also allow users to specify overrides for CIDR ranges. This allows Rook
to still support esoteric and unexpected NAD or network configurations
where a CIDR range is not detectable or where the range detected would
be incomplete. Because it may be impossible for Rook to understand the
network CIDRs wholistically while residing only on a portion of the
network, this feature should have been present from Multus's inception.

Improving CIDR auto-detection and allowing users to specify overrides
for auto-detected CIDRs rounds out Rook's Multus support for CephCluster
(core/RADOS) installations. No further architectural changes should be
needed for CephClusters as regards application of public/cluster network
CIDRs for Multus networks.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2023-09-07 10:12:55 -06:00
Louis Bailleul e56122cbce operator: config default interval value for discovery daemon
Correctly set discoveryInterval default value by passing defaultDiscoverInterval to k8sutil.GetValue
Allow to set ROOK_DISCOVER_DEVICES_INTERVAL env var through discoveryDaemonInterval helm value

Signed-off-by: Louis Bailleul <louis.bailleul@pgs.com>
2023-09-07 10:28:13 +01:00
Stephen Muth 37d8de0993 helm: move discovery daemon settings into configmap
This allows the rook mgr module to check if the discovery daemon is enabled. The udev blacklist setting was also moved just to keep similar settings in the same place.

Signed-off-by: Stephen Muth <smuth4@gmail.com>
2023-09-02 19:27:38 -04:00
Travis Nielsen a06fd8a54d Merge pull request #12811 from parth-gr/external-name
external: change cluster_name to k8s_cluster_name
2023-08-31 08:14:00 -06:00
parth-gr 98c4567219 external: change cluster_name to k8s_cluster_name
it was confusing if we are calling a ceph cluster name
or k8s cluster name, so re-named

Signed-off-by: parth-gr <paarora@redhat.com>
2023-08-30 14:07:58 +05:30
Travis Nielsen 824a0a45d3 Merge pull request #12730 from travisn/object-user-different-ns
object: Allow creating an object user in different namespace
2023-08-25 13:00:43 -06:00
Travis Nielsen a72a4ffc7e Merge pull request #12782 from bh-tt/master
helm: Container security context in helm charts
2023-08-25 12:27:28 -06:00
travisn 2b1cc4c7b8 object: allow creating an object user in different namespace
The object user was previously required to be created in the
same namespace as the object store and the cluster. Now,
the object user can be reconciled even in a different namespace
from the cluster and object store. The namespace would be specified
in the object user CR.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-08-25 11:54:57 -06:00
Blaine Gardner 6a0f5fbf42 Merge pull request #12774 from obnoxxx/multus-validation-job-autogen
Multus validation job automated update
2023-08-25 11:51:40 -06:00
Michael Adam 8a6b7786e0 multus: commit updated validation job manifest from make docs
Signed-off-by: Michael Adam <obnox@samba.org>
2023-08-25 18:37:16 +02:00
Michael AdamandBlaine Gardner 22882c5358 multus: auto-update the validation job manifest file with help text
Signed-off-by: Michael Adam <obnox@samba.org>

this change  introduces a new 'make target 'docs'that generates part of the documentation

It particular, it runs the `helm-docs` target.

Additionally, `make docs`  updates the  multus validation job manifest
by inserting the output of `rook multus validation run --help` between
two newly introduced markers.

The result of running `make docs` is intended to be committed to git after running

Fixes: #12706

Signed-off-by: Michael Adam <obnox@samba.org>
Signed-off-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Co-authored-by: Blaine Gardner <b.blaine.gardner@gmail.com>
Co-authored-by: Michael Adam <obnox@samba.org>

Update build/deploy/generate-deploy-examples.sh

Signed-off-by: Michael Adam <obnox@samba.org>
2023-08-25 18:37:16 +02:00
test 330030e362 helm: container security context in helm charts
Allow setting container security context for operator and toolbox pods

Specify dropping capabilities for the operator and similar settings for the toolbox

Signed-off-by: test <bert@transtrend.com>
2023-08-25 08:59:25 +02:00
Travis Nielsen 9a5ea4c92b Merge pull request #12734 from parth-gr/helm-improvements
helm: improvement in docs
2023-08-21 10:17:14 -06:00
parth-gr 67f294b623 helm: update the default version tag to master
updating this to ease the local testing
using helm for master branch repo

Signed-off-by: parth-gr <paarora@redhat.com>
2023-08-21 20:05:14 +05:30
Travis Nielsen e2debde445 Merge pull request #12747 from rowanruseler/rr/charts-documentation-refs
helm: replaced broken documentation references
2023-08-18 08:12:52 -06:00
Rowan Ruseler 8f8f46dbd6 helm: replaced broken documentation references
Noticed that since the release of 1.9, the values.yaml file has some
old documentation references. Replaced them with the new locations.

Adjusted the link as requested by travisn
Placed extra line eof back as requested by path-gr

Signed-off-by: Rowan Ruseler <rowanruseler@gmail.com>
2023-08-18 10:21:37 +02:00
Travis Nielsen e84ba84af6 Merge pull request #12751 from travisn/crd-gen-update
build: Update crds gen for new descriptions
2023-08-17 12:45:04 -06:00
Travis Nielsen 0e3117bd6e Merge pull request #12507 from sp98/osd-migration
Replace OSD to use new backend store
2023-08-17 12:40:49 -06:00
travisn 438b61721f build: update crds gen for new descriptions
The CRDs were not generated for the latest since #12384
was merged without rebasing, and other updates with a newer
dependency required the newer descriptions.

Signed-off-by: travisn <tnielsen@redhat.com>
2023-08-17 12:03:33 -06:00
Travis Nielsen afaadd78c4 Merge pull request #12384 from ideepika/feature/ksd-174
mon: add mon storage class support
2023-08-17 11:52:20 -06:00
sp98 886bb357ef osd: replace osd to use new backend store
If osd store is updated in the ceph cluster, then
delete OSDs one by one, cleanup disks and provision a new OSD on
the same disk

Signed-off-by: sp98 <sapillai@redhat.com>
2023-08-17 21:40:55 +05:30
Travis Nielsen f3764cc7ad Merge pull request #12731 from cjyar/alert-for
monitoring: add "for" to CephOSDDownHigh alert
2023-08-16 14:11:54 -06:00
Travis Nielsen 29f984da3a Merge pull request #12691 from subhamkrai/operator-placement
operator: move most of discover pod setting to cm
2023-08-16 13:54:23 -06:00
Travis Nielsen 9efe0b7db0 Merge pull request #12672 from subhamkrai/fix-update-vault
build: update vault and other indirect imports
2023-08-16 11:11:06 -06:00
subhamkrai fb39580067 operator: move most of discover pod setting to cm
It's better to move most of discover daemon setting
from env to configmap rook-ceph-operator-config.
Although, we are moving to configmap, we keep reading settings
from env but the priority will be configmap settings.

Signed-off-by: subhamkrai <srai@redhat.com>
2023-08-16 22:17:47 +05:30
parth-gr 62e3ffb2ba helm: install rook in openshift cluster
The sccs were missing in the helm installation,
added it

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

Signed-off-by: parth-gr <paarora@redhat.com>
2023-08-16 14:43:36 +05:30
Chris Jones 9f1e5ec4ee monitoring: add "for" to CephOSDDownHigh alert
As part of a normal restart, an OSD can go down just as prometheus tries
to scrape it, causing this alert to fire. Alerts shouldn't fire as part
of normal operations. This change requires the OSD to be down for 5
consecutive minutes before the alert will fire.

Signed-off-by: Chris Jones <chris@cjones.org>
2023-08-15 19:37:46 -06:00
Blaine Gardner 853bab398a Merge pull request #12495 from Nikhil-Ladha/issue12172/multus-validation-job
multus: Add sample job manifest for multus config validation
2023-08-11 13:28:07 -06:00
Nikhil-Ladha 9fea9cd865 multus: add sample job manifest for multus config validation
added a sample job manifest named `multus-validation` that
validates the multus configuration in the cluster.

Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
2023-08-11 10:55:29 +05:30
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
Travis Nielsen 8e1090b3be Merge pull request #12624 from parth-gr/s5-cmd
object: fix s5cmd for s3 endpoint verification
2023-08-04 08:19:28 -06:00