feat: got it all working

This commit is contained in:
2026-01-01 15:07:44 -05:00
parent 380ddb8920
commit 4768c94b24
3 changed files with 79 additions and 1 deletions

View File

@@ -38,7 +38,7 @@
ansible.builtin.apt:
state: present
update_cache: true
name: [cri-o, kubelet, kubeadm, kubectl, python3-pip, helm]
name: [cri-o, kubelet, kubeadm, kubectl, python3-pip, helm, git]
- name: Install Kubernetes Python packages.
ansible.builtin.pip:
@@ -122,6 +122,15 @@
kubeadm join --config JoinConfiguration.yml
changed_when: true
- name: Install Helm Diff.
gather_facts: false
hosts: control
tasks:
- name: Install it.
kubernetes.core.helm_plugin:
plugin_path: https://github.com/databus23/helm-diff
state: present
- name: Install CNI.
gather_facts: false
hosts: control
@@ -200,6 +209,14 @@
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
@@ -207,3 +224,43 @@
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:
state: absent
name: "{{ item }}"
taints:
- key: node.cloudprovider.kubernetes.io/uninitialized
value: true
effect: NoSchedule
loop: [node-a, node-b]
- name: Add `ingress-nginx` repository.
kubernetes.core.helm_repository:
name: ingress-nginx
url: https://kubernetes.github.io/ingress-nginx
state: present
- name: Copy over values file.
vars:
values_template: ../templates/IngressValues.yml.jinja2
ansible.builtin.template:
src: "{{ values_template }}"
dest: IngressValues.yml
mode: preserve
- name: Install it.
kubernetes.core.helm:
name: ingress-nginx-controller
chart_ref: ingress-nginx/ingress-nginx
namespace: kube-system
state: present
update_repo_cache: true
values_files: [IngressValues.yml]

View File

@@ -0,0 +1,3 @@
networking:
enabled: "true"
clusterCIDR: "10.244.0.0/16"

View File

@@ -0,0 +1,18 @@
controller:
dnsPolicy: ClusterFirstWithHostNet
hostNetwork: true
kind: DaemonSet
service:
annotations:
load-balancer.hetzner.cloud/name: "hetzner-lb"
load-balancer.hetzner.cloud/location: "fsn1"
load-balancer.hetzner.cloud/type: "lb11"
load-balancer.hetzner.cloud/ipv6-disabled: "true"
load-balancer.hetzner.cloud/use-private-ip: "true"
load-balancer.hetzner.cloud/protocol: "https"
load-balancer.hetzner.cloud/network-zone: "eu-central"
load-balancer.hetzner.cloud/http-certificates: "managed_cert"
load-balancer.hetzner.cloud/http-redirect-http: "true"
enableHttp: false
targetPorts:
https: http