test: try doing the lb separately
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
vars_files:
|
||||
- ../vault.yml
|
||||
tasks:
|
||||
- name: Destroy
|
||||
- name: Destroy Terraform.
|
||||
community.general.terraform:
|
||||
project_path: '../terraform'
|
||||
state: "absent"
|
||||
|
||||
@@ -179,58 +179,12 @@
|
||||
value: "true"
|
||||
effect: NoSchedule
|
||||
|
||||
- name: Install Hetzner Cloud Controller.
|
||||
- name: Install `nginx` Controller.
|
||||
gather_facts: false
|
||||
hosts: control
|
||||
vars_files:
|
||||
- ../vault.yml
|
||||
- ../secrets/tf_outputs.yml
|
||||
tasks:
|
||||
- name: Create `hcloud` secret.
|
||||
kubernetes.core.k8s:
|
||||
name: hcloud
|
||||
namespace: kube-system
|
||||
kind: Secret
|
||||
state: present
|
||||
definition:
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: hcloud
|
||||
namespace: kube-system
|
||||
type: Opaque
|
||||
data:
|
||||
token: "{{ secrets.hcloud_token | b64encode }}"
|
||||
network: "{{ private_network_id.value | b64encode }}"
|
||||
|
||||
- name: Add Cloud Controller repository.
|
||||
kubernetes.core.helm_repository:
|
||||
name: hcloud
|
||||
url: https://charts.hetzner.cloud
|
||||
state: present
|
||||
|
||||
- name: Copy over values file.
|
||||
vars:
|
||||
values_template: ../templates/HCCMValues.yml.jinja2
|
||||
ansible.builtin.template:
|
||||
src: "{{ values_template }}"
|
||||
dest: HCCMValues.yml
|
||||
mode: preserve
|
||||
|
||||
- name: Install it.
|
||||
kubernetes.core.helm:
|
||||
name: hccm
|
||||
chart_ref: hcloud/hcloud-cloud-controller-manager
|
||||
namespace: kube-system
|
||||
state: present
|
||||
update_repo_cache: true
|
||||
force: true
|
||||
values_files: [HCCMValues.yml]
|
||||
|
||||
|
||||
- name: Install `nginx` Controller.
|
||||
gather_facts: false
|
||||
hosts: control
|
||||
tasks:
|
||||
- name: Remove schedule taint to nodes.
|
||||
kubernetes.core.k8s_taint:
|
||||
@@ -251,6 +205,9 @@
|
||||
- name: Copy over values file.
|
||||
vars:
|
||||
values_template: ../templates/IngressValues.yml.jinja2
|
||||
load_balancer_name: "{{ variables.load_balancer_name }}"
|
||||
network_zone: "{{ variables.network_zone }}"
|
||||
certificate_name: "{{ certificate_name.value }}"
|
||||
ansible.builtin.template:
|
||||
src: "{{ values_template }}"
|
||||
dest: IngressValues.yml
|
||||
|
||||
Reference in New Issue
Block a user