-
Notifications
You must be signed in to change notification settings - Fork 6.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: migrate external OCI CCM config check from OCI cloud provider
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
roles/kubernetes-apps/external_cloud_controller/oci/tasks/main.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
65 changes: 65 additions & 0 deletions
65
roles/kubernetes-apps/external_cloud_controller/oci/tasks/oci-credential-check.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
--- | ||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_auth_key" | ||
ansible.builtin.assert: | ||
that: | ||
- not external_oracle_auth_use_instance_principals | ||
- external_oracle_auth_key is not defined or not external_oracle_auth_key | ||
fail_msg: "external_oci_auth_key is missing" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_auth_region" | ||
ansible.builtin.assert: | ||
that: | ||
- not external_oracle_auth_use_instance_principals | ||
- external_oracle_auth_region is not defined or not external_oracle_auth_region | ||
fail_msg: "external_oracle_auth_region is missing" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_auth_tenancy" | ||
ansible.builtin.assert: | ||
that: | ||
- not external_oracle_auth_use_instance_principals | ||
- external_oracle_auth_tenancy is not defined or not external_oracle_auth_tenancy | ||
fail_msg: "external_oracle_auth_tenancy is missing" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_auth_user" | ||
ansible.builtin.assert: | ||
that: | ||
- not external_oracle_auth_use_instance_principals | ||
- external_oracle_auth_user is not defined or not external_oracle_auth_user | ||
fail_msg: "external_oracle_auth_user is missing" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_auth_fingerprint" | ||
ansible.builtin.assert: | ||
that: | ||
- not external_oracle_auth_use_instance_principals | ||
- external_oracle_auth_fingerprint is not defined or not external_oracle_auth_fingerprint | ||
fail_msg: "external_oracle_auth_fingerprint is missing" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_compartment" | ||
ansible.builtin.assert: | ||
that: | ||
- external_oracle_compartment is not defined or not external_oracle_compartment | ||
fail_msg: "external_oracle_compartment is missing. This is the compartment in which the cluster resides" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_vcn" | ||
ansible.builtin.assert: | ||
that: | ||
- external_oracle_vcn is not defined or not external_oracle_vcn | ||
fail_msg: "external_oracle_vcn is missing. This is the Virtual Cloud Network in which the cluster resides" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_load_balancer_subnet1" | ||
ansible.builtin.assert: | ||
that: | ||
- external_oracle_load_balancer_subnet1 is not defined or not external_oracle_load_balancer_subnet1 | ||
fail_msg: "external_oracle_load_balancer_subnet1 is missingg. This is the first subnet to which loadbalancers will be added" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_load_balancer_subnet2" | ||
ansible.builtin.assert: | ||
that: | ||
- external_oracle_load_balancer_subnet2 is not defined or not external_oracle_load_balancer_subnet2 | ||
fail_msg: "external_oracle_load_balancer_subnet2 is missing. Two subnets are required for load balancer high availability" | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oracle_load_balancer_security_list_management_mode" | ||
ansible.builtin.assert: | ||
that: | ||
- external_oracle_load_balancer_security_list_management_mode is not defined or external_oracle_load_balancer_security_list_management_mode not in ["All", "Frontend", "None"] | ||
fail_msg: "external_oracle_load_balancer_security_list_management_mode is missing, or not defined correctly. Valid options are (All, Frontend, None)." |