Tagging Hypershift clusters for tracking#157
Conversation
Signed-off-by: Krishna Harsha Voora <krvoora@redhat.com>
|
When we run this wrapper from our forked repo: this will look like this: |
|
You can do the same just passing the tag you want on the extra params. This change requires that the command will be launched from a git based folder, which is not mandatory at this moment |
morenod
left a comment
There was a problem hiding this comment.
If we want to add this, we need to consider the option of running wrapper from outside a git based folder.
Anyway, I still recommend to use the extra-params option instead of this
| # Get the Git remote URL for the current working directory | ||
| old_wd = os.getcwd() | ||
| current_wd = os.path.dirname(os.path.abspath(__file__)) | ||
| os.chdir(current_wd) |
There was a problem hiding this comment.
@morenod This tackles the issue: even if the user triggers the wrapper script outside the GitHub repo.
| else: | ||
| GITHUB_USERNAME = "cloud-bulldozer" | ||
|
|
||
| cluster_cmd = [rosa_cmnd, "create", "cluster", "--cluster-name", cluster_name, f"--tags=User:{GITHUB_USERNAME}", "--replicas", str(worker_nodes), "--hosted-cp", "--sts", "--mode", "auto", "-y", "--output", "json", "--oidc-config-id", oidc_config_id] |
There was a problem hiding this comment.
@krishvoor I honeslty don't think that the github user is the most useful tag to apply here. I'd rather we take in a string from the CLI to tag whatever we need it to be, ie some financial tracking, username, or whatever
There was a problem hiding this comment.
@krishvoor I honeslty don't think that the github user is the most useful tag to apply here.
@dry923 I hear you, today the cloud expenses are tracked via GitHub user details just like the one defined here via ROSA DAGs and have proved useful.
I'd rather we take in a string from the CLI to tag whatever we need it to be, ie some financial tracking, username, or whatever
Agreed, will implement changes through with this as an additional change.
|
Im not saying I want to tag, but if we are going to do it, we need to also add this tags on:
|
Thanks, @morenod this would mean it will be easy to find all "resources" in the AWS belonging to the same cluster. |
Signed-off-by: Krishna Harsha Voora <krvoora@redhat.com>
Signed-off-by: Krishna Harsha Voora <krvoora@redhat.com>
|
@krishvoor Can you please attach the steps in detail on how these changes were tested and verified? I am somehow unable to reproduce the steps mentioned in README.md |
| logging.debug("Creating cluster on VPC %s, with subnets: %s" % (vpc_info[0], vpc_info[1])) | ||
| try: | ||
| thread = threading.Thread(target=_build_cluster, args=(ocm_cmnd, rosa_cmnd, cluster_name_seed, args.must_gather_all, args.provision_shard, args.create_vpc, vpc_info, args.workers_wait_time, args.add_cluster_load, args.cluster_load_duration, jobs, workers, my_path, my_uuid, loop_counter, es, args.es_url, args.es_index, args.es_index_retry, service_cluster, sc_kubeconfig_path, all_clusters_installed, oidc_config_id, args.workload_type, args.kube_burner_version, args.e2e_git_details, args.git_branch, operator_roles_prefix)) | ||
| thread = threading.Thread(target=_build_cluster, args=(ocm_cmnd, rosa_cmnd, cluster_name_seed, args.must_gather_all, args.provision_shard, args.create_vpc, vpc_info, args.workers_wait_time, args.add_cluster_load, args.cluster_load_duration, jobs, workers, my_path, my_uuid, loop_counter, es, args.es_url, args.es_index, args.es_index_retry, service_cluster, sc_kubeconfig_path, all_clusters_installed, oidc_config_id, args.workload_type, args.kube_burner_version, args.e2e_git_details, args.git_branch, operator_roles_prefix, tagging)) |
There was a problem hiding this comment.
I think we can use **kwargs or dictionaries here instead of passing these many arguments in the params.
|
Closing this in favor of #162 |
No description provided.