From: alex Date: Sun, 2 Jul 2023 16:50:36 +0000 (+0200) Subject: Flesh out weight deployment X-Git-Tag: 20240214-emacs~322 X-Git-Url: https://xn--ix-yja.es/gitweb/?a=commitdiff_plain;h=865331dcd82d3561fc736f226f84030516e7e832;p=alex.git Flesh out weight deployment --- diff --git a/personal_infra/playbooks/roles/zqxjkcrud/tasks/main.yaml b/personal_infra/playbooks/roles/zqxjkcrud/tasks/main.yaml new file mode 100644 index 0000000..f6ddcdb --- /dev/null +++ b/personal_infra/playbooks/roles/zqxjkcrud/tasks/main.yaml @@ -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 diff --git a/personal_infra/playbooks/site.yaml b/personal_infra/playbooks/site.yaml index 377f564..b9852a4 100644 --- a/personal_infra/playbooks/site.yaml +++ b/personal_infra/playbooks/site.yaml @@ -49,3 +49,15 @@ 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 }}" diff --git a/personal_infra/puppet/site/h1.pdp7.net.pp b/personal_infra/puppet/site/h1.pdp7.net.pp index 7a1e5ac..771bf59 100644 --- a/personal_infra/puppet/site/h1.pdp7.net.pp +++ b/personal_infra/puppet/site/h1.pdp7.net.pp @@ -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/', } } diff --git a/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp b/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp index 944c5c1..548438d 100644 --- a/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp +++ b/personal_infra/puppet/site/pg.h1.int.pdp7.net.pp @@ -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 , }