-
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_oci_auth_key" | ||
fail: | ||
msg: "external_oci_auth_key is missing" | ||
when: | ||
- not oci_use_instance_principals | ||
- external_oci_auth_key is not defined or not external_oci_auth_key | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_auth_region" | ||
fail: | ||
msg: "external_oci_auth_region is missing" | ||
when: | ||
- not oci_use_instance_principals | ||
- external_oci_auth_region is not defined or not external_oci_auth_region | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_auth_tenancy" | ||
fail: | ||
msg: "external_oci_auth_tenancy is missing" | ||
when: | ||
- not oci_use_instance_principals | ||
- external_oci_auth_tenancy is not defined or not external_oci_auth_tenancy | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_auth_user" | ||
fail: | ||
msg: "external_oci_auth_user is missing" | ||
when: | ||
- not oci_use_instance_principals | ||
- external_oci_auth_user is not defined or not external_oci_auth_user | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_auth_fingerprint" | ||
fail: | ||
msg: "external_oci_auth_fingerprint is missing" | ||
when: | ||
- not oci_use_instance_principals | ||
- external_oci_auth_fingerprint is not defined or not external_oci_auth_fingerprint | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_compartment" | ||
fail: | ||
msg: "external_oci_compartment is missing. This is the compartment in which the cluster resides" | ||
when: | ||
- external_oci_compartment is not defined or not external_oci_compartment | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_vcn" | ||
fail: | ||
msg: "external_oci_vcn is missing. This is the Virtual Cloud Network in which the cluster resides" | ||
when: | ||
- external_oci_vcn is not defined or not external_oci_vcn | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_load_balancer_subnet1" | ||
fail: | ||
msg: "external_oci_load_balancer_subnet1 is missingg. This is the first subnet to which loadbalancers will be added" | ||
when: | ||
- external_oci_load_balancer_subnet1 is not defined or not external_oci_load_balancer_subnet1 | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_load_balancer_subnet2" | ||
fail: | ||
msg: "external_oci_load_balancer_subnet2 is missing. Two subnets are required for load balancer high availability" | ||
when: | ||
- external_oci_load_balancer_subnet2 is not defined or not external_oci_load_balancer_subnet2 | ||
|
||
- name: "External OCI Cloud Controller Manager | Credentials Check | external_oci_load_balancer_security_list_management_mode" | ||
fail: | ||
msg: "external_oci_load_balancer_security_list_management_mode is missing, or not defined correctly. Valid options are (All, Frontend, None)." | ||
when: | ||
- external_oci_load_balancer_security_list_management_mode is not defined or external_oci_load_balancer_security_list_management_mode not in ["All", "Frontend", "None"] |