Skip to content
Snippets Groups Projects
Commit 2d14d19f authored by Irakli Janiashvili's avatar Irakli Janiashvili Committed by Oleksandr Kosse (EPAM)
Browse files

GONRG-5959 parameter partitionCleanUpEnabled is not described/used

parent 2c091ad3
No related branches found
No related tags found
1 merge request!302GONRG-5959 parameter partitionCleanUpEnabled is not described/used
...@@ -8,7 +8,6 @@ metadata: ...@@ -8,7 +8,6 @@ metadata:
data: data:
PARTITION_NAME: "{{ .Values.data.partitionName }}" PARTITION_NAME: "{{ .Values.data.partitionName }}"
DATA_PARTITION_ID: "{{ .Values.data.dataPartitionId }}" DATA_PARTITION_ID: "{{ .Values.data.dataPartitionId }}"
PARTITION_CLEAN_UP_ENABLED: "{{ .Values.data.partitionCleanUpEnabled }}"
ENVIRONMENT: "{{ .Values.data.springProfilesActive }}" ENVIRONMENT: "{{ .Values.data.springProfilesActive }}"
{{- if .Values.conf.onPremEnabled }} {{- if .Values.conf.onPremEnabled }}
SERVICE_ACCOUNT: {{ printf "%s@service.local" .Values.data.datafierSa | quote }} SERVICE_ACCOUNT: {{ printf "%s@service.local" .Values.data.datafierSa | quote }}
......
...@@ -11,7 +11,6 @@ data: ...@@ -11,7 +11,6 @@ data:
partitionNamespace: "partition" partitionNamespace: "partition"
datafierSa: "datafier" datafierSa: "datafier"
bucketPrefix: "" bucketPrefix: ""
partitionCleanUpEnabled: "false"
minioExternalEndpoint: "" # use only if external minio is configured minioExternalEndpoint: "" # use only if external minio is configured
# deployments # deployments
requestsCpu: "0.1" requestsCpu: "0.1"
......
...@@ -11,23 +11,6 @@ bootstrap_anthos() { ...@@ -11,23 +11,6 @@ bootstrap_anthos() {
DATA_PARTITION_ID=$1 DATA_PARTITION_ID=$1
DATA_PARTITION_ID_UPPER=$2 DATA_PARTITION_ID_UPPER=$2
if [[ "${PARTITION_CLEAN_UP_ENABLED}" == "true" ]]; then
echo "Partition cleanup enabled, will delete partition ${DATA_PARTITION_ID}"
delete_status_code=$(curl -X DELETE \
--url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \
-H "Content-Type: application/json")
if [[ "${delete_status_code}" == 204 ]] || [[ "${delete_status_code}" == 404 ]]; then
echo "Partition deletion was successful with status code: ${delete_status_code}"
else
echo "Not able to delete partition with status code: ${delete_status_code}"
exit 1
fi
else
echo "Partition cleanup is not enabled, skipping deletion"
fi
status_code=$(curl -X POST \ status_code=$(curl -X POST \
--url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \ --url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \
-H "Content-Type: application/json" \ -H "Content-Type: application/json" \
...@@ -60,23 +43,6 @@ bootstrap_gcp() { ...@@ -60,23 +43,6 @@ bootstrap_gcp() {
DATA_PARTITION_ID_UPPER=$2 DATA_PARTITION_ID_UPPER=$2
IDENTITY_TOKEN=$(gcloud auth print-identity-token) IDENTITY_TOKEN=$(gcloud auth print-identity-token)
if [[ "${PARTITION_CLEAN_UP_ENABLED}" == "true" ]]; then
echo "Partition cleanup enabled, will delete partition ${DATA_PARTITION_ID}"
delete_status_code=$(curl -X DELETE \
--url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \
-H "Authorization: Bearer ${IDENTITY_TOKEN}")
if [[ "${delete_status_code}" == 204 ]] || [[ "${delete_status_code}" == 404 ]]; then
echo "Partition deletion was successful with status code: ${delete_status_code}"
else
echo "Not able to delete partition with status code: ${delete_status_code}"
exit 1
fi
else
echo "Partition cleanup not enabled, skipping deletion"
fi
status_code=$(curl -X POST \ status_code=$(curl -X POST \
--url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \ --url "http://${PARTITION_NAME}/api/partition/v1/partitions/${DATA_PARTITION_ID}" --write-out "%{http_code}" --silent --output "/dev/null" \
-H "Authorization: Bearer ${IDENTITY_TOKEN}" \ -H "Authorization: Bearer ${IDENTITY_TOKEN}" \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment