Skip to content

Commit

Permalink
Merge pull request #554 from parth-gr/exernal-legacy-flag
Browse files Browse the repository at this point in the history
Bug 2244609: external: honour support of cluster-name legacy flag
  • Loading branch information
travisn authored Feb 12, 2024
2 parents 4cc2e49 + 161d673 commit 3e3dba0
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/canary-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -161,6 +161,11 @@ jobs:
toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}')
kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --k8s-cluster-name rookstorage --restricted-auth-permission true
- name: test external script with restricted_auth_permission flag and with --cluster-name legacy flag
run: |
toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}')
kubectl -n rook-ceph exec $toolbox -- python3 /etc/ceph/create-external-cluster-resources.py --rbd-data-pool-name replicapool --cluster-name rookstorage --restricted-auth-permission true
- name: test external script with restricted_auth_permission flag
run: |
toolbox=$(kubectl get pod -l app=rook-ceph-tools -n rook-ceph -o jsonpath='{.items[*].metadata.name}')
Expand Down
8 changes: 8 additions & 0 deletions deploy/examples/create-external-cluster-resources.py
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ def gen_arg_parser(cls, args_to_parse=None):
type=str,
help="Provides a user name to check the cluster's health status, must be prefixed by 'client.'",
)
common_group.add_argument(
"--cluster-name",
default="",
help="Kubernetes cluster name(legacy flag), Note: Either use this or --k8s-cluster-name",
)
common_group.add_argument(
"--k8s-cluster-name", default="", help="Kubernetes cluster name"
)
Expand Down Expand Up @@ -1507,6 +1512,9 @@ def validate_rgw_multisite(self, rgw_multisite_config_name, rgw_multisite_config
def _gen_output_map(self):
if self.out_map:
return
# support legacy flag with upgrades
if self._arg_parser.cluster_name:
self._arg_parser.k8s_cluster_name = self._arg_parser.cluster_name
self._arg_parser.k8s_cluster_name = (
self._arg_parser.k8s_cluster_name.lower()
) # always convert cluster name to lowercase characters
Expand Down

0 comments on commit 3e3dba0

Please sign in to comment.