Skip to content

Commit 267ed57

Browse files
Removed argocd cli
1 parent 4e1747b commit 267ed57

File tree

2 files changed

+8
-22
lines changed

2 files changed

+8
-22
lines changed

charts/osmosis-fullnode/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: osmosis-fullnode
33
description: A Helm chart for deploying Osmosis fullnode with monitoring and sentinel
44
type: application
5-
version: 0.1.5
5+
version: 0.1.6
66
appVersion: "29.0.2"
77
keywords:
88
- osmosis

charts/osmosis-fullnode/templates/cronjob.yaml

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,11 +134,12 @@ spec:
134134
return 0
135135
}
136136
137-
# Function to pause ArgoCD auto-sync
137+
# Function to pause ArgoCD auto-sync using kubectl
138138
pause_argocd_sync() {
139139
if check_argocd_available; then
140140
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
142143
echo "✅ ArgoCD auto-sync paused successfully"
143144
return 0
144145
else
@@ -151,11 +152,12 @@ spec:
151152
fi
152153
}
153154
154-
# Function to resume ArgoCD auto-sync
155+
# Function to resume ArgoCD auto-sync using kubectl
155156
resume_argocd_sync() {
156157
if check_argocd_available; then
157158
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
159161
echo "✅ ArgoCD auto-sync resumed successfully"
160162
else
161163
echo "⚠️ Failed to resume ArgoCD auto-sync, but cleanup completed"
@@ -220,23 +222,7 @@ spec:
220222
curl -fsSL https://pkgs.k8s.io/core:/stable:/v1.29/deb/Release.key | gpg --dearmor -o /etc/apt/keyrings/kubernetes-apt-keyring.gpg
221223
echo 'deb [signed-by=/etc/apt/keyrings/kubernetes-apt-keyring.gpg] https://pkgs.k8s.io/core:/stable:/v1.29/deb/ /' | tee /etc/apt/sources.list.d/kubernetes.list
222224
apt-get update -qq && apt-get install -y -qq kubectl > /dev/null 2>&1
223-
224-
# Install ArgoCD CLI
225-
curl -sSL -o /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/latest/download/argocd-linux-amd64
226-
chmod +x /usr/local/bin/argocd
227-
echo "✅ ArgoCD CLI installed"
228-
229-
# Configure ArgoCD authentication using service account token
230-
if [ "${ARGOCD_ENABLED:-true}" = "true" ]; then
231-
export ARGOCD_SERVER="${ARGOCD_SERVER:-argocd-server.argocd.svc.cluster.local:80}"
232-
export ARGOCD_AUTH_TOKEN=$(cat /var/run/secrets/kubernetes.io/serviceaccount/token)
233-
# Test ArgoCD connection
234-
if argocd cluster list >/dev/null 2>&1; then
235-
echo "✅ ArgoCD authentication configured successfully"
236-
else
237-
echo "⚠️ ArgoCD authentication failed, will skip ArgoCD operations"
238-
fi
239-
fi
225+
echo "✅ kubectl installed"
240226
241227
# Get pod info
242228
NAMESPACE=$(cat /var/run/secrets/kubernetes.io/serviceaccount/namespace)

0 commit comments

Comments
 (0)