feat!: Use Ansible and Terraform to provision Nodes and DNS and create configure script (#84)

This commit is contained in:
Devin Buhl authored and GitHub committed 2021-09-27 11:24:55 -04:00
1 parent 528d617c94
commit 8d5516a546
37 files changed
+1247 -153

No files matched your search

@@ -0,0 +1,32 @@
---
#
# Below vars are for the xanmanning.k3s role
# ...see https://github.com/PyratLabs/ansible-role-k3s
#
# (string) Use a specific version of k3s
k3s_release_version: "v1.21.5+k3s1"
# (bool) Install using hard links rather than symbolic links.
k3s_install_hard_links: true
# (bool) Escalate user privileges for all tasks
k3s_become_for_all: true
# (bool) Enable debug logging on the k3s service
k3s_debug: false
# (bool) Enable etcd embedded datastore
k3s_etcd_datastore: true
# (bool) Allow the use of unsupported configurations in k3s
k3s_use_unsupported_config: false
# (string) Control Plane registration address
k3s_registration_address: "{{ kubevip_address }}"
# (list) A flat list of templates to deploy on the primary control plane
# /var/lib/rancher/k3s/server/manifests
k3s_server_manifests_templates:
- "kube-vip/kube-vip-rbac.yaml.j2"
- "kube-vip/kube-vip-daemonset.yaml.j2"
@@ -0,0 +1,6 @@
---
# (string) Timezone for the servers
# timezone: "America/New_York"
# (list) Additional ssh public keys to add to the nodes
# ssh_authorized_keys:
@@ -0,0 +1,42 @@
---
# https://rancher.com/docs/k3s/latest/en/installation/install-options/server-config/
# https://github.com/PyratLabs/ansible-role-k3s
# (bool) Specify if a host (or host group) are part of the control plane
k3s_control_node: true
# (dict) k3s settings for all control-plane nodes
k3s_server:
node-ip: "{{ ansible_host }}"
tls-san:
# kube-vip
- "{{ kubevip_address }}"
docker: false
flannel-backend: "host-gw" # This needs to be in quotes
disable:
- traefik
- servicelb
- metrics-server
disable-network-policy: true
disable-cloud-controller: true
write-kubeconfig-mode: "644"
# Network CIDR to use for pod IPs
cluster-cidr: "10.42.0.0/16"
# Network CIDR to use for service IPs
service-cidr: "10.43.0.0/16"
kubelet-arg:
- "feature-gates=GracefulNodeShutdown=true"
- "feature-gates=MixedProtocolLBService=true"
# Required to use monitor these components with kube-prometheus-stack
kube-controller-manager-arg:
- "address=0.0.0.0"
- "bind-address=0.0.0.0"
kube-proxy-arg:
- "metrics-bind-address=0.0.0.0"
kube-scheduler-arg:
- "address=0.0.0.0"
- "bind-address=0.0.0.0"
etcd-expose-metrics: true
# Required for HAProxy health-checks
kube-apiserver-arg:
- "anonymous-auth=true"
@@ -0,0 +1,13 @@
---
# https://rancher.com/docs/k3s/latest/en/installation/install-options/agent-config/
# https://github.com/PyratLabs/ansible-role-k3s
# (bool) Specify if a host (or host group) are part of the control plane
k3s_control_node: false
# (dict) k3s settings for all worker nodes
k3s_agent:
node-ip: "{{ ansible_host }}"
kubelet-arg:
- "feature-gates=GracefulNodeShutdown=true"
- "feature-gates=MixedProtocolLBService=true"
Whitespace-only changes.
+11
View File
@@ -0,0 +1,11 @@
---
kubernetes:
children:
master:
hosts:
k8s-0:
ansible_host: 192.168.42.10
worker:
hosts:
k8s-1:
ansible_host: 192.168.42.13