]> xn--ix-yja.es Git - alex.git/commitdiff
Flesh out weight deployment
authoralex <alex@pdp7.net>
Sun, 2 Jul 2023 16:50:36 +0000 (18:50 +0200)
committeralex <alex@pdp7.net>
Sun, 2 Jul 2023 16:50:36 +0000 (18:50 +0200)
personal_infra/playbooks/roles/zqxjkcrud/tasks/main.yaml [new file with mode: 0644]
personal_infra/playbooks/site.yaml
personal_infra/puppet/site/h1.pdp7.net.pp
personal_infra/puppet/site/pg.h1.int.pdp7.net.pp

diff --git a/personal_infra/playbooks/roles/zqxjkcrud/tasks/main.yaml b/personal_infra/playbooks/roles/zqxjkcrud/tasks/main.yaml
new file mode 100644 (file)
index 0000000..f6ddcdb
--- /dev/null
@@ -0,0 +1,13 @@
+---
+- name: render manifests
+  command: kubectl run --context {{ context }} -q -n default -i --rm builder --image quay.io/alexpdp7/zqxjkcrud:update --restart=Never --command -- zqxjkcrud-manifest-builder
+  args:
+    stdin: "{{ definition|to_yaml }}"
+  register: manifestbuild
+  delegate_to: 127.0.0.1
+- k8s:
+    context: "{{ context }}"
+    state: present
+    apply: true
+    definition: "{{ manifestbuild.stdout | from_yaml_all }}"
+  delegate_to: 127.0.0.1
index 377f5647c4adbb14a6d30627a56b2ce33370fd22..b9852a440309c61f51b03d53ce36cc1fa0a11139 100644 (file)
   gather_facts: false
   roles:
     - proxmox_route_53
+
+- name: deploy weight
+  hosts: k8s-prod.h1.int.pdp7.net
+  tags:
+    - k8s
+    - weight
+  gather_facts: false
+  roles:
+    - role: zqxjkcrud
+      vars:
+        context: "admin@{{ talos_host.talos_cluster }}"
+        definition: "{{ weight }}"
index 7a1e5ac896ece380be7552627b2afe261e36dc66..771bf59abd6af3bd006b9eee682abfa7aa340915 100644 (file)
@@ -41,6 +41,6 @@ node 'h1.pdp7.net' {
   }
 
   proxmox::proxy_host {'weight-test.pdp7.net':
-    target => 'https://k8s-test.h1.int.pdp7.net/',
+    target => 'https://k8s-prod.h1.int.pdp7.net/',
   }
 }
index 944c5c162cd76cba8bee232211f0ac52934922a5..548438da526a55fc07ce01490aa4f3476ffc8890 100644 (file)
@@ -4,7 +4,7 @@ node 'pg.h1.int.pdp7.net' {
       # TYPE  DATABASE        USER            ADDRESS                   METHOD
       # "local" is for Unix domain socket connections only
       local   all             all                                       peer
-      host    k8s_test        k8s_test        k8s-test.h1.int.pdp7.net  trust
+      host    k8s_test        k8s_test        k8s-prod.h1.int.pdp7.net  trust
       | EOT
     ,
   }