chore: improvements in docs

This commit is contained in:
ITQ
2025-08-20 13:53:21 +03:00
parent 4febd4f75a
commit 5bec757a16
9 changed files with 85 additions and 45 deletions
@@ -30,3 +30,8 @@ write_files:
append: true
encoding: b64
content: ${hosts_file}
- path: /home/ubuntu/manifest.yaml
owner: ubuntu:ubuntu
encoding: b64
defer: true
content: ${manifest_file}
@@ -30,3 +30,8 @@ write_files:
append: true
encoding: b64
content: ${hosts_file}
- path: /home/ubuntu/manifest.yaml
owner: ubuntu:ubuntu
encoding: b64
defer: true
content: ${manifest_file}
-7
View File
@@ -1,7 +0,0 @@
10.6.6.1 _gateway
10.6.6.10 control-plane
2001:db8:ca2:2::10 control-plane
10.6.6.20 worker-1
2001:db8:ca2:2::20 worker-1
+38
View File
@@ -0,0 +1,38 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-dualstack
spec:
replicas: 1
selector:
matchLabels:
app: nginx-dualstack
template:
metadata:
labels:
app: nginx-dualstack
spec:
containers:
- name: nginx
image: nginx:alpine
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: nginx-dualstack-svc
spec:
type: LoadBalancer
externalIPs:
- 10.6.6.10
- 2001:db8:ca2:2::10
selector:
app: nginx-dualstack
ports:
- port: 80
targetPort: 80
ipFamilyPolicy: PreferDualStack
ipFamilies:
- IPv4
- IPv6
+5 -4
View File
@@ -35,17 +35,18 @@ resource "libvirt_volume" "worker_images" {
data "template_file" "user_data" {
for_each = local.user_templates
template = file("${path.module}/configs/cloud-init/${each.value}")
template = file("${path.root}/configs/cloud-init/${each.value}")
vars = {
hosts_file = base64encode(file("${path.module}/configs/hosts"))
ssh_public_key = file("../.ssh/id_rsa.pub")
hosts_file = base64encode(file("${path.root}/../configs/hosts"))
manifest_file = base64encode(file("${path.root}/configs/k8s/manifest.yaml"))
ssh_public_key = file("${path.root}/../.ssh/id_rsa.pub")
}
}
data "template_file" "network_config" {
for_each = local.user_templates
template = file("${path.module}/configs/cloud-init/network.yaml.tpl")
template = file("${path.root}/configs/cloud-init/network.yaml.tpl")
vars = {
ipv4_address = local.node_addrs[each.key].ipv4
ipv4_prefix = local.ipv4_prefix