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

Deprecate hypershift none cluster #62

Merged
merged 4 commits into from
Nov 22, 2023
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
8 changes: 4 additions & 4 deletions roles/acm_hypershift/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@ At this time the role supports creating the Openshift required endpoints under t
| ----------------------- | ----------------------------------------- | --------- | -------------------------------------------------------------------------------------- |
| ah_cluster_name | Random string | No | Name of the hosted cluster |
| ah_base_domain | | No | The base domain, DNS resolution for OCP endpoints must be prepared in advance. If undefined, the hosted cluster routes will be created as subdomains for \<hc\>.apps.\<hub-cluster-domain\>|
| ah_node-pool-replicas | [0|2] | No | Zero for none cluster, two for other provider types |
| ah_node-pool-replicas | 2 | No | Number of pool replicas, minimum 2 is required |
| ah_cluster_network_cidr | 10.132.0.0/14 | No | Cluster network CIDR |
| ah_clusters_ns | clusters | No | The prefix for the namespace |
| ah_cluster_type | none | No | The type infrastructure provider, currently only supported is none "None" and "Kubevirt"|
| ah_cluster_type | kubevirt | No | The type infrastructure provider, currently only only supports "kubevirt" |
| ah_force_deploy | false | No | Force redeploy of a cluster |
| ah_no_log | true | No | Allow logging on sensitive tasks |
| ah_ocp_version | 4.13.13 | No | Full OCP version to install on the hypershift cluster. <major>.<minor>.<patch> |
| ah_ocp_version | 4.14.0 | No | Full OCP version to install on the hypershift cluster. <major>.<minor>.<patch> |
| ah_pullsecret_file | "" | Yes | Required to pull the hosted cluster release image |
| ah_release_image | quay.io/openshift-release-dev/ocp-release | No | The release image to install, from the specified OCP version |
| ah_node_memory | 8Gi | No | Memory which is visible inside the Guest OS (type BinarySI, e.g. 5Gi, 100Mi) |
Expand All @@ -54,7 +54,7 @@ See below for some examples of how to use the `acm_hypershift` role
- name: Deploy hypershift cluster
vars:
ah_cluster_name: hypershift
ah_ocp_version: 4.13.4
ah_ocp_version: 4.14.0
ah_pullsecret_file: /<path_to_ps>
include_role:
name: acm_hypershift
Expand Down
12 changes: 4 additions & 8 deletions roles/acm_hypershift/defaults/main.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
---
ah_cluster_network_cidr: 10.132.0.0/14
ah_clusters_ns: clusters
ah_cluster_type: "none"
ah_cluster_type: "kubevirt"
ah_force_deploy: false
ah_no_log: true
ah_ocp_version: 4.13.13
ah_ocp_version: 4.14.0
ah_pullsecret_file: ""
ah_release_image: quay.io/openshift-release-dev/ocp-release:{{ ah_ocp_version }}-x86_64
ah_node_memory: 8Gi
ah_node_pool_replicas: |-
{%- if ah_cluster_type == "none" %}
0
{%- else %}
2
{%- endif %}
ah_node_pool_replicas: 2
...
6 changes: 3 additions & 3 deletions roles/acm_hypershift/tasks/create-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
--pull-secret={{ ah_pullsecret_file }}
--namespace={{ ah_clusters_ns }}
--cluster-cidr={{ ah_cluster_network_cidr }}
{% if ah_node_memory is defined and ah_cluster_type != "none" %} --memory="{{ ah_node_memory }}" {% endif %}
{% if ah_node_memory is defined %} --memory="{{ ah_node_memory }}" {% endif %}
--node-pool-replicas={{ ah_node_pool_replicas }}
--release-image={{ ah_release_image }}
notify: Remove working directory
Expand Down Expand Up @@ -52,8 +52,7 @@
- ah_hc_info | json_query('resources[0].status.version.history[0].state') == "Completed"
retries: 20
delay: 60
when:
- ah_cluster_type != "none"

#
# TODOs:
# For Baremetal:
Expand All @@ -64,3 +63,4 @@
# Add disconnected support
# - "Get the user_ca_bundle content"
# - Pullsecrets from within? or from the agent?
...
1 change: 1 addition & 0 deletions roles/acm_hypershift/tasks/delete-cluster.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,4 @@
--name={{ ah_cluster_generated_name }}
--namespace={{ ah_clusters_ns }}
--infra-id={{ ah_cluster_name }}
...
2 changes: 1 addition & 1 deletion roles/acm_hypershift/tasks/download-cli.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
- name: Get hcp cli version
shell:
cmd: >
{{ ah_tmp_dir.path }}/hcp version
{{ ah_tmp_dir.path }}/hcp -v
register: result

- name: Print hcp cli version
Expand Down
1 change: 0 additions & 1 deletion roles/acm_hypershift/tasks/validations.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@
- "A MetalLB instance is required to configure hypershift on baremetal environments"
when:
- mlb_instance.resources | length == 0
- ah_cluster_type != "none"

- name: "Validate that a pull secret file is defined"
fail:
Expand Down
1 change: 0 additions & 1 deletion roles/acm_hypershift/vars/main.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,2 @@
ah_cluster_types:
- none
- kubevirt