Skip to content

Commit

Permalink
Feat: migrate external OCI CCM config check from OCI cloud provider
Browse files Browse the repository at this point in the history
Signed-off-by: tico88612 <17496418+tico88612@users.noreply.github.com>
  • Loading branch information
tico88612 committed Jul 13, 2024
1 parent 6eea519 commit 466ec5c
Show file tree
Hide file tree
Showing 2 changed files with 69 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
---
- name: External OCI Cloud Controller Manager | Check OCI credentials
include_tasks: oci-credential-check.yml
tags: external-oci

- name: External OCI Cloud Controller Manager | Get base64 cloud-config
set_fact:
external_oci_cloud_config_secret: "{{ lookup('template', 'external-oci-cloud-config.j2') | b64encode }}"
Expand Down
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"]

0 comments on commit 466ec5c

Please sign in to comment.