Skip to content

Commit ee59b9e

Browse files
authored
0.0.22 (#49)
* Fix updating DNS record * Remove unused CF_API_EMAIL * 0.0.22
1 parent 3ff47da commit ee59b9e

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

k8s-tools.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
#!/bin/bash
22

3-
echo cloudflare-cli: k8s-tools v0.0.21
3+
echo cloudflare-cli: k8s-tools v0.0.22
44

55
bad=0
66
if [ -z "$action" ]; then echo "variable 'action' is not set"; bad=1; fi
77
if [ -z "$subdomain" ]; then echo "variable 'subdomain' is not set"; bad=1; fi
88
if [ -z "$use_proxy" ]; then echo "variable 'use_proxy' is not set"; bad=1; fi
99
if [ -z "$CF_API_KEY" ]; then echo "variable 'CF_API_KEY' is not set"; bad=1; fi
10-
if [ -z "$CF_API_EMAIL" ]; then echo "variable 'CF_API_EMAIL' is not set"; bad=1; fi
1110
if [ -z "$CF_API_DOMAIN" ]; then echo "variable 'CF_API_DOMAIN' is not set"; bad=1; fi
1211
if [ $action = "create" ]; then
1312
if [ -z "$service" ]; then
@@ -18,7 +17,7 @@ if [ $action = "create" ]; then
1817
fi
1918
if [ $bad -eq 1 ]
2019
then
21-
echo "please set variables: action, subdomain, CF_API_KEY, CF_API_EMAIL, CF_API_DOMAIN"
20+
echo "please set variables: action, subdomain, CF_API_KEY, CF_API_DOMAIN"
2221
echo "if action is create, please specify these variables too: namespace, deployment, and either service or ingress"
2322
echo "valid actions: create, delete"
2423
exit 1
@@ -101,7 +100,7 @@ if [ $action = "create" ]; then
101100
retVal=$?
102101
else
103102
echo updating...
104-
curl https://api.cloudflare.com/client/v4/zones/$zone_id/dns_records \
103+
curl https://api.cloudflare.com/client/v4/zones/$zone_id/dns_records/$cloudflare_record_id \
105104
-X PATCH \
106105
-H 'Content-Type: application/json' \
107106
-H "Authorization: Bearer $CF_API_KEY" \

0 commit comments

Comments
 (0)