Skip to content

Commit

Permalink
Merge pull request #735 from openshift-cherrypick-robot/cherry-pick-5…
Browse files Browse the repository at this point in the history
…54-to-release-4.14

[release-4.14] Bug 2244609: external: honour support of cluster-name legacy flag
  • Loading branch information
travisn authored Sep 27, 2024
2 parents 5968319 + b8b87c3 commit e5d9d76
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 @@ -323,6 +323,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 @@ -1463,6 +1468,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 e5d9d76

Please sign in to comment.