Skip to content

Commit

Permalink
Merge pull request #74 from Onlim/bugfix/setup-timeouts
Browse files Browse the repository at this point in the history
[graphdb]: use clusterCreationTimeout also in patchCluster
  • Loading branch information
mihailradkov authored Feb 2, 2024
2 parents b97f015 + accf7d7 commit d6f0afe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
3 changes: 2 additions & 1 deletion files/scripts/update-cluster.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,10 @@ set -eu
function patchCluster {
local configLocation=$1
local authToken=$PROVISION_USER_AUTH_TOKEN
local timeout=$2
echo "Patching cluster"
waitService "http://graphdb-cluster-proxy:7200/proxy/ready"
curl -o patchResponse.json -isSL -m 15 -X PATCH --header "Authorization: Basic ${authToken}" --header 'Content-Type: application/json' --header 'Accept: application/json' -d @"$configLocation" 'http://graphdb-cluster-proxy:7200/rest/cluster/config'
curl -o patchResponse.json -isSL -m "$timeout" -X PATCH --header "Authorization: Basic ${authToken}" --header 'Content-Type: application/json' --header 'Accept: application/json' -d @"$configLocation" 'http://graphdb-cluster-proxy:7200/rest/cluster/config'
if grep -q 'HTTP/1.1 200' "patchResponse.json"; then
echo "Patch successful"
elif grep -q 'Cluster does not exist.\|HTTP/1.1 412' "patchResponse.json" ; then
Expand Down
1 change: 1 addition & 0 deletions templates/jobs/patch-cluster-job.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ spec:
- "/tmp/utils/update-cluster.sh"
- "patchCluster"
- "/tmp/cluster-config/cluster-config.json"
- "{{ .Values.graphdb.clusterConfig.clusterCreationTimeout }}"
volumes:
- name: job-temp
emptyDir:
Expand Down

0 comments on commit d6f0afe

Please sign in to comment.