Skip to content

Commit

Permalink
Merge pull request #246 from openinfradev/lma
Browse files Browse the repository at this point in the history
bugfix: fix a volume name, namespace and so on.
  • Loading branch information
ktkfree authored Aug 16, 2023
2 parents afdc228 + 72b5bc1 commit 1f5a6de
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
8 changes: 5 additions & 3 deletions deploy_apps/tks-primary-cluster.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -911,11 +911,13 @@ spec:
kubectl --kubeconfig /kube/value get secret -n ${cluster_id} ${cluster_id}-tks-kubeconfig -o jsonpath="{.data.value}" | base64 -d > ~/kubeconfig
export KUBECONFIG=~/kubeconfig
kubectl delete job -n lma empty-buckets-before-delete-them --ignore-not-found=true
cat <<EOF | kubectl apply -f -
apiVersion: batch/v1
kind: Job
metadata:
name: empty-buckets-before-delete-them
namespace: lma
annotations:
"helm.sh/hook": pre-delete
"helm.sh/hook-delete-policy": hook-succeeded
Expand All @@ -939,12 +941,12 @@ spec:
backoffLimit: 4
EOF
while [ $(kubectl get job empty-buckets-before-delete-them -o jsonpath='{.status.conditions[0].type}'|wc -c) -eq 0 ]; do
while [ $(kubectl get -n lma job empty-buckets-before-delete-them -o jsonpath='{.status.conditions[0].type}'|wc -c) -eq 0 ]; do
echo "A job is not completed. wait 10 seconds...."
sleep 10
done
if [ $(kubectl get job empty-buckets-before-delete-them -o jsonpath='{.status.conditions[0].type}') = "Complete" ]; then
if [ $(kubectl get -n lma job empty-buckets-before-delete-them -o jsonpath='{.status.conditions[0].type}') = "Complete" ]; then
exit 0
else
exit -1
Expand All @@ -957,7 +959,7 @@ spec:
- name: cluster_id
value: "{{workflow.parameters.cluster_id}}"
volumeMounts:
- name: config
- name: kubeconfig-adm
mountPath: "/kube"

activeDeadlineSeconds: 120
Expand Down
2 changes: 2 additions & 0 deletions deploy_apps/tks-remove-lma-federation-wftpl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ spec:
- name: app_name
value: "{{workflow.parameters.cluster_id}}-loki"
when: "{{steps.get-clusters-in-contract.outputs.parameters.primary_cluster}} == {{workflow.parameters.cluster_id}}"
continueOn:
failed: true

- - name: remove-objects-in-buckets
templateRef:
Expand Down

0 comments on commit 1f5a6de

Please sign in to comment.