feat: create basic k8s roles to start deployment
- just create roles so can deploy hosts
This commit is contained in:
parent
c10a3e49fa
commit
83743c3909
10
hieradata/roles/infra/k8s/compute.yaml
Normal file
10
hieradata/roles/infra/k8s/compute.yaml
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
---
|
||||||
|
# networking
|
||||||
|
systemd::manage_networkd: true
|
||||||
|
systemd::manage_all_network_files: true
|
||||||
|
networking::interfaces:
|
||||||
|
eth0:
|
||||||
|
type: physical
|
||||||
|
forwarding: true
|
||||||
|
dhcp: true
|
||||||
|
mtu: 1500
|
||||||
42
hieradata/roles/infra/k8s/control.yaml
Normal file
42
hieradata/roles/infra/k8s/control.yaml
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
---
|
||||||
|
profiles::pki::vault::alt_names:
|
||||||
|
- k8s-control.service.consul
|
||||||
|
- k8s-control.query.consul
|
||||||
|
- "k8s-control.service.%{facts.country}-%{facts.region}.consul"
|
||||||
|
|
||||||
|
profiles::ssh::sign::principals:
|
||||||
|
- k8s-control.service.consul
|
||||||
|
- k8s-control.query.consul
|
||||||
|
- "k8s-control.service.%{facts.country}-%{facts.region}.consul"
|
||||||
|
|
||||||
|
# configure consul service
|
||||||
|
consul::services:
|
||||||
|
k8s-control:
|
||||||
|
service_name: 'k8s-control'
|
||||||
|
tags:
|
||||||
|
- 'k8s'
|
||||||
|
- 'container'
|
||||||
|
address: "%{hiera('networking_loopback0_ip')}"
|
||||||
|
port: 6443
|
||||||
|
checks:
|
||||||
|
- id: 'k8s-control_https_check'
|
||||||
|
name: 'k8s-control HTTPS Check'
|
||||||
|
http: "https://%{facts.networking.fqdn}:6443"
|
||||||
|
method: 'GET'
|
||||||
|
tls_skip_verify: true
|
||||||
|
interval: '10s'
|
||||||
|
timeout: '1s'
|
||||||
|
profiles::consul::client::node_rules:
|
||||||
|
- resource: service
|
||||||
|
segment: k8s-control
|
||||||
|
disposition: write
|
||||||
|
|
||||||
|
# networking
|
||||||
|
systemd::manage_networkd: true
|
||||||
|
systemd::manage_all_network_files: true
|
||||||
|
networking::interfaces:
|
||||||
|
eth0:
|
||||||
|
type: physical
|
||||||
|
forwarding: true
|
||||||
|
dhcp: true
|
||||||
|
mtu: 1500
|
||||||
10
site/roles/manifests/infra/k8s/compute.pp
Normal file
10
site/roles/manifests/infra/k8s/compute.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# k8s compute nodes
|
||||||
|
class roles::infra::k8s::compute {
|
||||||
|
if $facts['firstrun'] {
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::firstrun::init
|
||||||
|
}else{
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::base
|
||||||
|
}
|
||||||
|
}
|
||||||
10
site/roles/manifests/infra/k8s/control.pp
Normal file
10
site/roles/manifests/infra/k8s/control.pp
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
# k8s control nodes
|
||||||
|
class roles::infra::k8s::control {
|
||||||
|
if $facts['firstrun'] {
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::firstrun::init
|
||||||
|
}else{
|
||||||
|
include profiles::defaults
|
||||||
|
include profiles::base
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in New Issue
Block a user