-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
99e9d87
commit 636dd5c
Showing
31 changed files
with
5,683 additions
and
6 deletions.
There are no files selected for viewing
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 @@ | ||
.vagrant |
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
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,38 @@ | ||
# Kubernetes | ||
kube_package_version: 1.20.11 | ||
kube_version: v{{ kube_package_version }} | ||
token: b0f7b8.8d1767876297d85c | ||
|
||
# 1.8.x feature: --feature-gates SelfHosting=true | ||
init_opts: "" | ||
|
||
# Any other additional opts you want to add.. | ||
kubeadm_opts: "" | ||
# For example: | ||
# kubeadm_opts: '--apiserver-cert-extra-sans "k8s.domain.com,kubernetes.domain.com"' | ||
|
||
service_cidr: "10.96.0.0/12" | ||
pod_network_cidr: "10.244.0.0/16" | ||
|
||
# Network implementation('flannel', 'calico', 'canal') | ||
network: calico | ||
|
||
# Change this to an appropriate interface, preferably a private network. | ||
# For example, on DigitalOcean, you would use eth1 as that is the default private network interface. | ||
network_interface: "" | ||
|
||
systemd_dir: /lib/systemd/system | ||
system_env_dir: /etc/sysconfig | ||
network_dir: /etc/kubernetes/network | ||
kubeadmin_config: /etc/kubernetes/admin.conf | ||
kube_addon_dir: /etc/kubernetes/addon | ||
|
||
# temporary directory used by additional features | ||
tmp_dir: /tmp/kubeadm-ansible-files | ||
|
||
# Container runtimes ('containerd', 'crio') | ||
container_runtime: containerd | ||
|
||
# Timezone and language configuration | ||
locale_lang: fr_FR.UTF-8 | ||
ntp_timezone: Europe/Paris |
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,4 @@ | ||
--- | ||
|
||
calico_cni_opts: "interface={{ network_interface }}" | ||
flannel_cni_opts: "--iface={{ network_interface }}" |
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,27 @@ | ||
--- | ||
|
||
- name: Create Kubernetes addon directory | ||
file: | ||
path: "{{ network_dir }}" | ||
state: directory | ||
|
||
- name: "Copy {{ network }} YAML files" | ||
template: | ||
src: "{{ item }}" | ||
dest: "{{ network_dir }}/{{ item | basename | regex_replace('\\.j2','') }}" | ||
with_fileglob: | ||
- ../templates/{{ network }}*.j2 | ||
|
||
- name: "Check {{ network }} daemonset is working" | ||
shell: kubectl --kubeconfig={{ kubeadmin_config }} get ds --all-namespaces | grep {{ network }} | ||
delegate_to: "{{ groups['master'][0] }}" | ||
run_once: true | ||
register: check_net | ||
ignore_errors: true | ||
changed_when: false | ||
|
||
- name: "Create {{ network }} network daemonset" | ||
when: check_net is failed | ||
command: kubectl create --kubeconfig={{ kubeadmin_config }} -f {{ network_dir }}/ | ||
delegate_to: "{{ groups['master'][0] }}" | ||
run_once: true |
Oops, something went wrong.