Commit Graph
77 Commits
Author SHA1 Message Date
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
Angelos Kolaitis 9e4a6ddee5 external: do not enforce need for monitoring endpoint
Add --skip-monitoring-endpoint to create-external-cluster-resources.py
to allow the script to work with Ceph clusters without an enabled
prometheus module.

Document the new flag in external-cluster.md and add relevant unit tests

Signed-off-by: Angelos Kolaitis <neoaggelos@gmail.com>
2023-04-12 21:04:48 +03:00
parth-gr 6c3dabcf5f external: add alias rbd pool name to support . pools name
if restricted permission was on the . was appended to k8s secret and
failed to create the secret so added a alias name is user wan't to suuport
pool with . in name

Signed-off-by: parth-gr <paarora@redhat.com>
2023-04-12 19:26:20 +05:30
parth-gr b60da0b8c1 external: add support for multisite in external cluster
Add support for realm, zone and zonegroup

Signed-off-by: parth-gr <paarora@redhat.com>
2023-04-10 20:03:16 +05:30
parth-gr 626d1c44ff external: name correction of validate_rgw_metadata_ec_pool_name function
The function is used for rbd so it should be name to validate_rbd_metadata_ec_pool_name

Signed-off-by: parth-gr <paarora@redhat.com>
2023-04-05 20:54:13 +05:30
parth-gr e44df84687 external: make rgw call separate from cephfs and rbd
if the rge endint is not reachable don't block the creation
of rbd and cephfs sc, just print the error instead of raising exception

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-30 19:54:33 +05:30
Sheetal Pamecha 6dbbc9d71c external: use f-strings for formatting
Replace the old formatting method with the f-string
and fix few pylint errors

Signed-off-by: Sheetal Pamecha <spamecha@redhat.com>
2023-03-17 11:20:26 +05:30
Matt 8bdabf85a8 external: pool and metadata ec pools were reversed in scripts
Pool and Metadata Pool Appear to be reversed.

dataPool needs to contain the EC Data pool
pool needs to contain the Metadata Pool
Closes: https://github.com/rook/rook/issues/11918

Signed-off-by: Matt P <dragon@fbdragon.co.uk>
2023-03-16 22:33:23 +00:00
parth-gr 96ea7817f8 external: add realm support for external cluster
if a cluster won't use the deafult realm and try to
execute the python script it will fail to vaildate rgw
as the rgw-admin-user would be created on default realm
So creating user in specific realm if the realm name is passed

Signed-off-by: parth-gr <paarora@redhat.com>
2023-03-01 20:55:48 +05:30
parth-gr def9fd9056 external: dont do rgw validation if python version < 3
Signed-off-by: parth-gr <paarora@redhat.com>
2023-01-23 20:38:49 +05:30
parth-gr fb7b67c3f4 external: fix endpoint_dial check for rgw endpoint
the validate rgw endpoint tls cert returns the certificate instead
of returning whether it exist or not,
So updatd the flow how to use it

Closes: https://github.com/rook/rook/issues/11060
Signed-off-by: parth-gr <paarora@redhat.com>
2022-10-14 19:16:30 +05:30
Travis Nielsen eaee34872b Merge pull request #10912 from parth-gr/restricted-upgrade
docs: add upgrade steps for multi-tenant custer
2022-09-14 07:44:07 -06:00
parth-gr 0ad1b52005 docs: add upgrade steps for multi-tenant custer
Currently for external clustr multitenancy is only applicable for new
deployments, but adding doc change so multi-tenancy can be achieved for
upgraded cluster also

Closes: https://github.com/rook/rook/issues/10678
Signed-off-by: parth-gr <paarora@redhat.com>
2022-09-14 12:48:18 +05:30
Blaine Gardner 2b0eaa974f Merge pull request #10909 from subhamkrai/remove-import-error
external: fix import errors for python2
2022-09-13 08:49:12 -06:00
subhamkrai 9a952df419 external: fix import errors for python2
remove duplicate import urllib.parse which is handled below
with try and except no need to import separately. Also, change
the way to get the python version.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-09-13 10:59:18 +05:30
parth-gr 54425803b6 external: do not add info=read cap if ceph version doesn't support it
The rgw ip validation feature was needing to update the rgw user
cap to add info=read permission, but this permission is only backported
till ceph pacific, so we added a check that only add this cap
when ceph version support it,
But this cap was also adding with the other caps, so removed it from there
Now it will only add this cap if ceph version support it

Signed-off-by: parth-gr <paarora@redhat.com>
2022-09-09 15:46:18 +05:30
Josh Soref 6e7b8767f3 core: fix spelling
* another
* are
* availability
* available
* bootstrap
* boundaries
* ceph
* certificate
* class
* codifies
* consuming
* corrupted
* createor
* csi
* deployments
* exceeded
* execute
* filesystem
* healthiness
* heuristics
* immediately
* insecure
* installed
* isolated
* maintained
* maximum
* minute
* monitor
* new
* nginx
* nonexistent
* not
* occurs
* omitempty
* operator
* orchestration
* persistentvolumes
* placement
* preexisting
* prometheus
* protecting
* provisioner
* purposes
* reconcile
* regex
* related
* requests
* returns
* rubbish
* running
* schedulable
* schedule
* serviceaccount
* simulating
* snapshots
* statement
* static
* tenants
* the
* unavailable
* volumeattachment
* waiting
* with
* wrapper
* zonegroup

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2022-07-07 18:10:47 -04:00
parth-gr c9a864ccdb external: add support for subvolumegroup and rados namespace
Using subvolume group and rados namespace for external deployment
was complicated and not documented,
Automating the process for the users, so they just need to pass
the respective names by cli flag for creation

Closes: rook#10427

Signed-off-by: parth-gr <paarora@redhat.com>
2022-06-28 21:57:54 +05:30
subhamkrai fa1eed1d4e core: fix lint issue in python files
Signed-off-by: subhamkrai <srai@redhat.com>
2022-06-27 16:53:01 +05:30
parth-gr b7c165b411 csi: make storage class updated with csi-users in external cluster
For using restricted auth users we need to update the
restricted users in the Storage class, so updating
it in the json output for external cluster

Signed-off-by: parth-gr <paarora@redhat.com>
2022-06-08 14:49:46 +05:30
parth-gr dcba689129 csi: update restricted auth flag
remove the restriction of per rados namespace as
there can be multiple namespaces and the csi-users
can only have 1 type in a storage class

Signed-off-by: parth-gr <paarora@redhat.com>
2022-06-08 14:21:49 +05:30
subhamkrai 00f21c0866 external: format python files using tool black
`black` is python formatter tool which
automatically formats python files without
manual changing. just run `black <python-file>`
and done.

Signed-off-by: subhamkrai <srai@redhat.com>
2022-06-06 20:01:27 +05:30
Sébastien Han eb08db40e9 Merge pull request #10350 from subhamkrai/support-py2
external-script: remove signature import
2022-06-03 08:49:58 +02:00
parth-gr fed91ddb81 rgw: make fqdn rgw converted to ip everywhere
During the recent addtions of rgw validation
changes there are too many places where we use
rgwendpoint, so making fqdn to ip conversion globally

Signed-off-by: parth-gr <paarora@redhat.com>
2022-05-31 15:11:36 +05:30