You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: charts/osmosis-fullnode/templates/cronjob.yaml
+7-21Lines changed: 7 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -134,11 +134,12 @@ spec:
134
134
return 0
135
135
}
136
136
137
-
# Function to pause ArgoCD auto-sync
137
+
# Function to pause ArgoCD auto-sync using kubectl
138
138
pause_argocd_sync() {
139
139
if check_argocd_available; then
140
140
echo "⏸️ Pausing ArgoCD auto-sync for application: $ARGOCD_APPLICATION"
141
-
if argocd app set "$ARGOCD_APPLICATION" --sync-policy none; then
141
+
# Remove the syncPolicy to disable automated sync
142
+
if kubectl patch application "$ARGOCD_APPLICATION" -n argocd --type='merge' -p='{"spec":{"syncPolicy":null}}'; then
142
143
echo "✅ ArgoCD auto-sync paused successfully"
143
144
return 0
144
145
else
@@ -151,11 +152,12 @@ spec:
151
152
fi
152
153
}
153
154
154
-
# Function to resume ArgoCD auto-sync
155
+
# Function to resume ArgoCD auto-sync using kubectl
155
156
resume_argocd_sync() {
156
157
if check_argocd_available; then
157
158
echo "▶️ Resuming ArgoCD auto-sync for application: $ARGOCD_APPLICATION"
158
-
if argocd app set "$ARGOCD_APPLICATION" --sync-policy automated; then
159
+
# Set syncPolicy to automated
160
+
if kubectl patch application "$ARGOCD_APPLICATION" -n argocd --type='merge' -p='{"spec":{"syncPolicy":{"automated":{"prune":true,"selfHeal":true}}}}'; then
159
161
echo "✅ ArgoCD auto-sync resumed successfully"
160
162
else
161
163
echo "⚠️ Failed to resume ArgoCD auto-sync, but cleanup completed"
0 commit comments