-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* upgrade to Cilium v1.14.1 * update README * molecule/kvm/molecule.yml: use minikube 1.31.2 (K8s 1.27.4) * rename Molecule scenario kvm to default * update README * refactor Molecule tests * molecule/default/prepare.yml: install githubixx.cilium_cli to make Molecule verify step work * update README * update CHANGELOG * Molecule tests: fix ansible-lint issues
- Loading branch information
Showing
38 changed files
with
1,285 additions
and
166 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
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
4 changes: 2 additions & 2 deletions
4
molecule/kvm/collections.yml → molecule/default/collections.yml
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 |
---|---|---|
@@ -1,7 +1,7 @@ | ||
--- | ||
# Copyright (C) 2022 Robert Wimmer | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
collections: | ||
- ansible.posix | ||
- kubernetes.core | ||
- community.docker |
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,40 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
- name: Setup Cilium | ||
hosts: k8s_worker | ||
become: true | ||
gather_facts: true | ||
tasks: | ||
- name: Include Cilium role | ||
ansible.builtin.include_role: | ||
name: githubixx.cilium_kubernetes | ||
vars: | ||
cilium_action: "install" | ||
|
||
- name: Setup tooling to make worker nodes usable | ||
hosts: test-assets | ||
become: true | ||
gather_facts: true | ||
tasks: | ||
- name: Setup tooling | ||
when: | ||
- cilium_setup_networking is defined | ||
- cilium_setup_networking == "install" | ||
block: | ||
- name: Waiting for Cilium to become ready | ||
ansible.builtin.include_tasks: | ||
file: tasks/cilium_status.yml | ||
|
||
- name: Control plane nodes should only run Cilium pods | ||
ansible.builtin.include_tasks: | ||
file: tasks/taint_controller_nodes.yml | ||
|
||
- name: Install CoreDNS | ||
ansible.builtin.include_tasks: | ||
file: tasks/coredns.yml | ||
|
||
- name: Waiting for CoreDNS to become ready | ||
ansible.builtin.include_tasks: | ||
file: tasks/coredns_status.yml |
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,165 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
harden_linux_ntp: "systemd-timesyncd" | ||
|
||
# Password for user "root" and "cilium" is "cilium" | ||
harden_linux_root_password: "$6$rounds=656000$mysecretsalt$IPK2dn/YVQ4vSNE7y/KlZOUY1kBo3V0pMDKSwVwrJk2R6s5IeAnoucTR2YcOvttZCjLkg3PuIp8Flx16kLNQy." | ||
harden_linux_deploy_user: "cilium" | ||
harden_linux_deploy_user_password: "$6$rounds=656000$mysecretsalt$IPK2dn/YVQ4vSNE7y/KlZOUY1kBo3V0pMDKSwVwrJk2R6s5IeAnoucTR2YcOvttZCjLkg3PuIp8Flx16kLNQy." | ||
harden_linux_deploy_user_home: "/home/cilium" | ||
|
||
harden_linux_sysctl_settings_user: | ||
"net.ipv4.ip_forward": 1 | ||
"net.ipv6.conf.default.forwarding": 1 | ||
"net.ipv6.conf.all.forwarding": 1 | ||
|
||
harden_linux_sshd_settings_user: | ||
"^Port ": "Port 22" | ||
"^PasswordAuthentication": "PasswordAuthentication yes" | ||
"^PermitRootLogin": "PermitRootLogin yes" | ||
|
||
harden_linux_ufw_rules: | ||
- rule: "allow" | ||
to_port: "22" | ||
protocol: "tcp" | ||
- rule: "allow" | ||
to_port: "51820" | ||
protocol: "udp" | ||
- rule: "allow" | ||
to_port: "80" | ||
protocol: "tcp" | ||
- rule: "allow" | ||
to_port: "443" | ||
protocol: "tcp" | ||
- rule: "allow" | ||
to_port: "25" | ||
protocol: "tcp" | ||
|
||
harden_linux_ufw_allow_networks: | ||
- "10.0.0.0/8" | ||
- "172.16.0.0/12" | ||
- "192.168.0.0/16" | ||
|
||
harden_linux_ufw_logging: 'on' | ||
|
||
harden_linux_ufw_defaults_user: | ||
"^DEFAULT_FORWARD_POLICY": 'DEFAULT_FORWARD_POLICY="ACCEPT"' | ||
|
||
harden_linux_sshguard_whitelist: | ||
- "127.0.0.0/8" | ||
- "::1/128" | ||
- "10.0.0.0/8" | ||
|
||
etcd_ca_conf_directory: "/tmp/k8s" | ||
etcd_conf_dir: "/etc/etcd" | ||
etcd_interface: "{{ k8s_interface }}" | ||
etcd_settings_user: | ||
"heartbeat-interval": "250" | ||
"election-timeout": "2500" | ||
etcd_cert_hosts: | ||
- localhost | ||
- 127.0.0.1 | ||
- 10.32.0.1 | ||
- kubernetes | ||
- kubernetes.default | ||
- kubernetes.default.svc | ||
- kubernetes.default.svc.cluster | ||
- kubernetes.svc.cluster.local | ||
- 192.168.10.5 | ||
- 192.168.10.10 | ||
- 192.168.10.20 | ||
- 192.168.10.30 | ||
- 192.168.10.100 | ||
- 192.168.10.110 | ||
- 192.168.10.120 | ||
- 192.168.10.130 | ||
- 10.10.10.5 | ||
- 10.10.10.10 | ||
- 10.10.10.20 | ||
- 10.10.10.30 | ||
- 10.10.10.100 | ||
- 10.10.10.110 | ||
- 10.10.10.120 | ||
- 10.10.10.130 | ||
- test-controller1 | ||
- test-controller2 | ||
- test-controller3 | ||
- test-worker1 | ||
- test-worker2 | ||
- test-worker3 | ||
|
||
etcd_additional_clients: | ||
- k8s-apiserver-etcd | ||
- cilium | ||
|
||
k8s_ca_conf_directory: "/tmp/k8s" | ||
k8s_ca_conf_directory_perm: "0775" | ||
k8s_ca_file_perm: "0666" | ||
k8s_ca_certificate_owner: "{{ k8s_config_owner }}" | ||
k8s_ca_certificate_group: "{{ k8s_config_group }}" | ||
|
||
k8s_release: "1.27.5" | ||
k8s_interface: "wg0" | ||
k8s_controller_delegate_to: "test-assets" | ||
|
||
k8s_config_cluster_name: "cilium" | ||
k8s_config_directory: "/tmp/k8s" | ||
k8s_config_directory_perm: "0777" | ||
k8s_config_file_perm: "0666" | ||
k8s_config_owner: "root" | ||
k8s_config_group: "root" | ||
|
||
k8s_encryption_config_directory: "{{k8s_config_directory}}" | ||
k8s_encryption_config_key: "Y29uZmlndXJhdGlvbjIyCg==" | ||
k8s_encryption_config_owner: "{{ k8s_config_owner }}" | ||
k8s_encryption_config_group: "{{ k8s_config_owner }}" | ||
k8s_encryption_config_directory_perm: "{{ k8s_config_directory_perm }}" | ||
k8s_encryption_config_file_perm: "{{ k8s_config_file_perm }}" | ||
|
||
k8s_conf_dir: "/var/lib/kubernetes" | ||
|
||
k8s_worker_kubelet_conf_dir: "/var/lib/kubelet" | ||
|
||
k8s_apiserver_secure_port: "6443" | ||
|
||
k8s_apiserver_settings_user: | ||
"enable-aggregator-routing": "true" | ||
|
||
k8s_worker_kubelet_settings: | ||
"config": "{{k8s_worker_kubelet_conf_dir}}/kubelet-config.yaml" | ||
"node-ip": "{{hostvars[inventory_hostname]['ansible_' + k8s_interface].ipv4.address}}" | ||
"kubeconfig": "{{k8s_worker_kubelet_conf_dir}}/kubeconfig" | ||
"seccomp-default": "" | ||
|
||
containerd_flavor: "k8s" | ||
containerd_tmp_directory: "/tmp" | ||
containerd_runc_binary_directory: "/usr/local/sbin" | ||
containerd_crictl_config_file: "crictl.yaml" | ||
containerd_crictl_config_directory: "/etc" | ||
containerd_cni_binary_directory: "/opt/cni/bin" | ||
|
||
cilium_etcd_enabled: "true" | ||
cilium_delegate_to: "test-assets" | ||
cilium_helm_show_commands: true | ||
cilium_etcd_interface: "{{ k8s_interface }}" | ||
cilium_etcd_client_port: 2379 | ||
cilium_etcd_nodes_group: "k8s_etcd" | ||
|
||
cilium_etcd_secrets_name: "cilium-etcd-secrets" | ||
cilium_etcd_cert_directory: "{{ k8s_ca_conf_directory }}" | ||
cilium_etcd_cafile: "ca-etcd.pem" | ||
cilium_etcd_certfile: "cert-cilium.pem" | ||
cilium_etcd_keyfile: "cert-cilium-key.pem" | ||
|
||
coredns_delegate_to: "test-assets" | ||
|
||
ca_etcd_csr_cn: "etcd" | ||
ca_k8s_apiserver_csr_cn: "kubernetes" | ||
etcd_server_csr_cn: "etcd" | ||
etcd_peer_csr_cn: "etcd" | ||
etcd_client_csr_cn_prefix: "etcd" | ||
k8s_apiserver_csr_cn: "kubernetes" | ||
k8s_admin_csr_cn: "admin" | ||
k8s_controller_manager_sa_csr_cn: "service-accounts" |
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,8 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
wireguard_address: "10.10.10.5/24" | ||
wireguard_port: 51820 | ||
wireguard_persistent_keepalive: "30" | ||
wireguard_endpoint: "192.168.10.5" |
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,8 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
wireguard_address: "10.10.10.10/24" | ||
wireguard_port: 51820 | ||
wireguard_persistent_keepalive: "30" | ||
wireguard_endpoint: "192.168.10.10" |
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,8 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
wireguard_address: "10.10.10.20/24" | ||
wireguard_port: 51820 | ||
wireguard_persistent_keepalive: "30" | ||
wireguard_endpoint: "192.168.10.20" |
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,8 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
wireguard_address: "10.10.10.30/24" | ||
wireguard_port: 51820 | ||
wireguard_persistent_keepalive: "30" | ||
wireguard_endpoint: "192.168.10.30" |
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,8 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
wireguard_address: "10.10.10.100/24" | ||
wireguard_port: 51820 | ||
wireguard_persistent_keepalive: "30" | ||
wireguard_endpoint: "192.168.10.100" |
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,8 @@ | ||
--- | ||
# Copyright (C) 2023 Robert Wimmer | ||
# SPDX-License-Identifier: GPL-3.0-or-later | ||
|
||
wireguard_address: "10.10.10.110/24" | ||
wireguard_port: 51820 | ||
wireguard_persistent_keepalive: "30" | ||
wireguard_endpoint: "192.168.10.110" |
Oops, something went wrong.