Commit Graph
100 Commits
Author SHA1 Message Date
parth 6cf97fd32b external: allow cephfs or rgw only deployments
currently there was a restriction to always create rbd pool
with this change only cephfs or rgw volumes created

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-02-04 14:27:36 +05:30
parth-gr 61de34a11d external: fix rados namespace sc name
Currently, the sc name is hardcoded,
in future if we support multiple rados
namespace per tenant we need a variable name
updating sc names to contain rados-namespace name
ocs pr: https://github.com/red-hat-storage/ocs-operator/pull/2955

Signed-off-by: parth-gr <partharora1010@gmail.com>
2025-01-08 19:46:56 +05:30
Blaine Gardner 7bb72a0171 object: also use system certs for validating RGW cert
When generating the HTTP client used for RGW admin ops, use both system
certs as well as the user-given cert.

As a real world example, admins may use ACME to rotate Letsencrypt certs
every 2 months. For an external CephObjectStore, the cert used by Rook
and RGW may not be rotated at the same time. This can cause the Rook
operator to fail CephObjectStore reconciliation until both certs agree.

When Rook also relies on system certs in the container, Rook's
reconciliation will not have reconciliation failures because
Letsencrypt's well-known and trusted root certificates can be loaded
from the system to validate the RGW's newly-rotated cert.

Signed-off-by: Blaine Gardner <blaine.gardner@ibm.com>
2024-10-25 11:22:11 -06:00
subhamkrai 32c5d99ef5 external: mds caps to healthchecker/cephfs users
for cephfs fencing in external mode, we run command `ceph tell mds ***`
which requires user user to include cap mds allow * in permission. So,
we need to add this in healthchercker and cephfs provisioner user

Signed-off-by: subhamkrai <srai@redhat.com>
2024-09-17 22:51:04 +05:30
parth-gr d2f8ce4c47 external: remove the false bool values from config file
currently we created a new config file or user creation,
Which was have the user config.

We were also appending the script deafult values to the config file
With that all the boolean values were appended to the config.ini file

v2-port-enable = False
....

But the config.ini treat all the bolean values as true, irrespective of they
are set to, it is  because the boolean cli flag doesnt accept the argument

So now removed all the false values from the config.ini

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-08-21 22:19:30 +05:30
parth-gr cb30f66862 external: fix the output of user config
currently the output in the cm was not human readable
and can not easily used to create a config.ini file

Also for now removed the support of printing arg in upstream

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-22 22:23:57 +05:30
parth-gr 7cfbe09a94 external: config file should have more priority then defaults
Priority: command-line-args > config.ini file values > default values
Currently default was having more priority so fixed it

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-05 14:55:08 +05:30
parth-gr 26cecb568a external: add final args used to the upgrade configmap
Recently we have introuced external-cluster-user-command cm
Which help user to look at the previous command run,
So with this PR we will add another data field arg
on this confimap which will have the final processed flags
that are being used
So user can use them directly either in config.ini or cmd line args

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-07-03 21:50:29 +05:30
Blaine Gardner bd02cf1f6f Merge pull request #14353 from parth-gr/external-seamless-upgrade1
external: add support for config file in external mode
2024-06-26 09:48:56 -06:00
parth-gr 5387ef16fd external: add support for config file in external mode
Now user can pass the cli flags using config file and
also command line argument,
if mentioned at both the place priority is given to
command line argument

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-06-26 17:07:49 +05:30
parth-gr 951c683786 external: create a configmap for the command line args
user can look back to there configurations by
looking at the configmap created with command
line arguments
This will be useful for them during upgrades when they
need to re run the python script with the same flags

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-06-25 16:50:48 +05:30
parth-gr cf1a39ee84 external: remove support of python2 for external clusters
fix pylint issue and remove pyhn2 support

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-06-04 20:25:01 +05:30
NymanRobin dcec080468 ci: fix pylint errors
Afte pylint was updated to version 3.2.0
a set of new errors appeared. This makes
ci passing by either fixing the problem
or ignoring it in the check

Signed-off-by: NymanRobin <robin.nyman@est.tech>
2024-05-14 22:28:24 +03:00
Travis Nielsen 4b9ada6ade Merge pull request #13769 from parth-gr/rados-ec
external: add support for rados namespace for rbd ec pools
2024-04-22 11:11:15 -06:00
Travis Nielsen dc53405132 Merge pull request #13982 from parth-gr/v2-fix-external
external: fix v2 port check in external script
2024-03-27 11:19:14 -06:00
parth-gr 58f96b6aee external: remove replicated 3 pool for the rbd sc
csi pr get merged ceph/ceph-csi#4459
so, This reverts commit 812a9c02b0.
The csi PR removes the dependency of the pool parameter from the
rbd storage class if the topology pools are passed,
so removing them in the examples and making it optional

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-03-27 21:48:48 +05:30
parth-gr 800d2f11f5 external: fix v2 port check in external script
v2 port can be avalaible without v1,
so fixing the current check

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-03-27 19:00:40 +05:30
parth-gr 0aa431c7e1 external: add ci and design documet
Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-03-18 22:17:25 +05:30
parth-gr 812a9c02b0 external: add replicated 3 pool for the rbd sc
till the csi pr get fix
https://github.com/ceph/ceph-csi/pull/4459
we can still make
use of topology by adding the replicated 3 pool
once the pr gets merged will revert this commit

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-03-11 12:47:41 +05:30
parth-gr 04b71cf63e external: add toplogyconstraintpool support for rbd storageclass
with topologyconstrain pool we can enable any
replica pool usage and also can store data at any
topology

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-03-11 12:47:41 +05:30
parth-gr 117bc76f20 external: enable the use of only v2 mon port
currently  the script requires to have both v2 and v1 port
to enable v2 port, but that is not the necessary condition,
so removing the chek, and enabling it only v2 is present to
successfully configure with v2 only

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-03-04 17:08:41 +05:30
parth-gr adf40b1944 external: add support for rados namespace for rbd ec pools
currently addded the support for rados namesapce
for rbd ec pools upstream

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

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-02-14 20:26:37 +05:30
parth-gr 75fcffd08c ci: reformat the python scripts
currently there is a new release of black
formatter so updating it with new release

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

Signe-off-by: parth-gr <partharora1010@gmail.com>
Signed-off-by: parth-gr <paarora@redhat.com>
2024-01-30 20:17:49 +05:30
parth-gr 8e4ec01cbb external: honour support of cluster-name legacy flag
we have changed the --cluster-name flag to --k8s-cluster-name
but to support automation while upgrade we should support
the legacy flag

Signed-off-by: parth-gr <partharora1010@gmail.com>
2024-01-09 21:20:16 +05:30
parth-gr 8d89faf615 external: fix the run as a user flag
there is a hardcoded value of "client.healthchecker"
which needs to be replaced by self.run_as_user

Signed-off-by: parth-gr <partharora1010@gmail.com>
2023-12-13 14:18:42 +05:30
Anthony D'Atri 59d0240676 doc: improve ceph-csi-drivers.md and lintrolling
Signed-off-by: Anthony D'Atri <anthonyeleven@users.noreply.github.com>
2023-12-01 16:10:11 -07:00
parth-gr df7c401d35 external: add support for rados namespace for external cluster
change the json output of storageclass to also inclusde rados namespace,
and also added the changes in the csi secret

Signed-off-by: parth-gr <paarora@redhat.com>
2023-11-28 11:52:30 +05:30
Travis Nielsen 63ba241ded Merge pull request #13060 from parth-gr/external-updation
external: fix monitoring endpoint check
2023-10-25 07:43:35 -06:00
parth-gr 3363a195a8 external: fix monitoring endpoint check
if the monitoring endpoint is not present
we were not returning any error, but the
field is the mandatory output, so return error if not found

Signed-off-by: parth-gr <paarora@redhat.com>
2023-10-24 00:06:48 +05:30
parth-gr 40008bf18d external: automatically init the rbd pool
Sometimes the pool is not enabled and the ceph cluster
shows health warning, so automatically initalize the pool
from the script

Signed-off-by: parth-gr <paarora@redhat.com>
2023-10-23 20:45:50 +05:30
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
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
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
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 3757951eca Merge pull request #12534 from Nikhil-Ladha/issue12297/add-v2-flag
external: added an optional flag for enabling v2 mon port
2023-07-31 13:20:21 -06:00
Nikhil-Ladha 5daddbe379 external: added an optional flag for enabling v2 mon port
Added a new flag `--v2-port-enable` to enable the v2 mon port.

Signed-off-by: Nikhil-Ladha <nikhilladha1999@gmail.com>
2023-07-26 18:16:06 +05:30
Travis Nielsen cb44c7b88f Merge pull request #12508 from parth-gr/external0cluster-namesapce
external: create ceph cluster namespace
2023-07-18 16:45:30 -06:00
parth-gr f9f880e528 external: create ceph cluster namespace
We need to create the namespace with the import script,
As per the documentation

The import script creates the secrets and
cm which is later used by the operator for cluster creation.

Signed-off-by: parth-gr <paarora@redhat.com>
2023-07-19 00:37:42 +05:30
Travis Nielsen 0253353add Merge pull request #12502 from neoaggelos/feat/external-keyring
external: support custom ceph keyring file
2023-07-18 11:19:25 -06:00
Angelos Kolaitis c021256e96 external: support custom ceph keyring file
When the ceph.conf is not in a well-known location, it is typical
for a custom ceph.keyring to be required as well. Currently, the
create-external-cluster-resources.py only tries to load the keyring
from well-known paths, and fails.

This commit adds a new optional argument `--keyring` to help in this
situation. When specified, create-external-cluster-resources.py will
attempt to use this as the keyring to authenticate with Ceph.

Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
2023-07-17 20:34:29 +03:00
parth-gr 53413e5a24 external: pin the default csi subvolume
set the csi subvolume to pin type distributed and pin setting 1
So to statically balance the PVs across all MDS ranks

Signed-off-by: parth-gr <paarora@redhat.com>
2023-07-12 20:32:27 +05:30
parth-gr de61187eb4 external: add support for IPV6 ceph daemons
updated some function which were strictly used for IPV4

Signed-off-by: parth-gr <paarora@redhat.com>
2023-07-05 17:13:06 +05:30
Travis Nielsen f6da90d539 Merge pull request #12264 from parth-gr/rgw-external-tls
external: fqdn should be persisted
2023-05-31 14:00:59 -06:00
parth-gr f66de7b9df external: fqdn should be persisted
1) donot change rgw fqdn to ip if provided,
As now the bucket class supports the
entry of fqdn

2) update crds with new description in EndpointAddress

Signed-off-by: parth-gr <paarora@redhat.com>
2023-05-31 17:36:29 +05:30
parth-gr ec2681f82b external: fix rgw check if no multisite flag is passed
if there is no multisite config pass, it will still checks for
the zones and zones group and not able to query anything

Signed-off-by: parth-gr <paarora@redhat.com>
2023-05-16 20:10:29 +05:30
parth-grandSergio Pérez Fernández c50c308abe external: fix rgw multisite config check
the check validate_rgw_multisite was always checking for realm
updated it to check the specific config

fixed validate_rgw_endpoint pool validation

added missing realm zonegroup and zone while interacting with user resources

Co-authored-by: Sergio Pérez Fernández <sergioperez794@gmail.com>
Signed-off-by: parth-gr <paarora@redhat.com>
2023-05-05 00:56:18 +05:30
parth-gr e02942ab77 external: check for pool and cluster name is provided
While adding the support for dot and special rbd pools
the check for pool and cluster name check was removed,
Adding it back as it is needed
https://github.com/rook/rook/pull/12056

Signed-off-by: parth-gr <paarora@redhat.com>
2023-04-25 18:48:27 +05:30
Travis Nielsen eaf3e3662d Merge pull request #12037 from parth-gr/external-multisite-zone
external: add support for multisite in external cluster script
2023-04-13 07:55:44 -06:00
Travis Nielsen 6103cb93dd Merge pull request #12061 from neoaggelos/feat/external
external: do not enforce need for monitoring endpoint
2023-04-12 16:08:54 -06:00