This commit is contained in:
parent
deca3a9d55
commit
344b2bc475
2 changed files with 7 additions and 4 deletions
|
@ -193,8 +193,8 @@ while (true); do
|
|||
|
||||
log::info "type=A Checking for stale records..."
|
||||
echo "$domain_records" | jq -r ".data[] | select(.type == \"A\" and .name != \"$CLOUD_REGION\") | .id" | while read -r record_id; do
|
||||
record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .name")
|
||||
record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .content")
|
||||
record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .name")
|
||||
record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .content")
|
||||
log::info "type=A domain=$record_name ip=$record_ip Checking..."
|
||||
if ! healthcheck "$record_ip"; then
|
||||
log::warn "type=A domain=$record_name ip=$record_ip Unhealthy..."
|
||||
|
@ -206,8 +206,8 @@ while (true); do
|
|||
|
||||
log::info "type=AAAA Checking for stale records..."
|
||||
echo "$domain_records" | jq -r ".data[] | select(.type == \"AAAA\" and .name != \"$CLOUD_REGION\") | .id" | while read -r record_id; do
|
||||
record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .name")
|
||||
record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == \"$record_id\") | .content")
|
||||
record_name=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .name")
|
||||
record_ip=$(echo "$domain_records" | jq -r ".data[] | select(.id == $record_id) | .content")
|
||||
log::info "type=AAAA domain=$record_name ip=$record_ip Checking..."
|
||||
if ! healthcheck "[$record_ip]"; then
|
||||
log::warn "type=AAAA domain=$record_name ip=$record_ip Unhealthy..."
|
||||
|
|
|
@ -62,6 +62,9 @@ resource "proxmox_virtual_environment_file" "userdata" {
|
|||
- qemu-guest-agent
|
||||
power_state:
|
||||
mode: reboot
|
||||
swap:
|
||||
filename: /swapfile
|
||||
size: 512M
|
||||
runcmd:
|
||||
- git clone --depth 1 --no-checkout --filter=tree:0 https://github.com/tjo-space/tjo-cloud-infrastructure.git /srv
|
||||
- cd /srv && git sparse-checkout set --no-cone /ingress.tjo.cloud && git checkout
|
||||
|
|
Loading…
Reference in a new issue