Skip to content

Commit

Permalink
modified file waiting for gitops controller sharding / updatfleetinra…
Browse files Browse the repository at this point in the history
…ncher modification for mac users
  • Loading branch information
Tommy12789 committed Jun 18, 2024
1 parent b94fa12 commit e867600
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 3 deletions.
13 changes: 11 additions & 2 deletions .github/scripts/upgrade-rancher-fleet-to-dev-fleet.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,22 @@ kubectl config use-context k3d-upstream
until helm -n cattle-fleet-system status fleet-crd | grep -q "STATUS: deployed"; do echo waiting for original fleet-crd chart to be deployed; sleep 1; done

# avoid a downgrade by rancher
sed -i 's/^version: 0/version: 9000/' charts/fleet-crd/Chart.yaml
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/^version: 0/version: 9000/' charts/fleet-crd/Chart.yaml
else
sed -i 's/^version: 0/version: 9000/' charts/fleet-crd/Chart.yaml
fi

helm upgrade fleet-crd charts/fleet-crd --wait -n cattle-fleet-system

until helm -n cattle-fleet-system status fleet | grep -q "STATUS: deployed"; do echo waiting for original fleet chart to be deployed; sleep 3; done

# avoid a downgrade by rancher
sed -i 's/^version: 0/version: 9000/' charts/fleet/Chart.yaml
if [[ "$OSTYPE" == "darwin"* ]]; then
sed -i '' 's/^version: 0/version: 9000/' charts/fleet-crd/Chart.yaml
else
sed -i 's/^version: 0/version: 9000/' charts/fleet-crd/Chart.yaml
fi

helm upgrade fleet charts/fleet \
--reset-then-reuse-values \
Expand Down
2 changes: 1 addition & 1 deletion charts/fleet/templates/service_gitops_metrics.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
selector:
app: gitjob
{{- if empty . }}
fleet.cattle.io/shard-default: "true"
# fleet.cattle.io/shard-default: "true"
{{- else }}
fleet.cattle.io/shard-id: "{{ . }}"
{{- end }}
Expand Down

0 comments on commit e867600

Please sign in to comment.