Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[release-4.14] Bug 2244609: external: honour support of cluster-name legacy flag #735

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading