Skip to content

Commit

Permalink
Merge pull request #24 from eaceaser/spin-v1.0.0-nodeport-fix
Browse files Browse the repository at this point in the history
Make nodeport exposure idempotent
  • Loading branch information
Vic Iglesias authored Aug 23, 2018
2 parents f586f23 + 8f4b952 commit 7297496
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions stable/spinnaker/templates/hooks/expose-nodeports.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ spec:
- -c
- |
PATCH='{"spec": {"type":"NodePort"}}'
kubectl patch service --namespace {{ .Release.Namespace }} spin-deck --patch "$PATCH"
kubectl patch service --namespace {{ .Release.Namespace }} spin-gate --patch "$PATCH"
if [ "$(kubectl get service --namespace {{ .Release.Namespace }} spin-deck -o=jsonpath='{.spec.type}')" = "ClusterIP" ]; then
kubectl patch service --namespace {{ .Release.Namespace }} spin-deck --patch "$PATCH"
fi
if [ "$(kubectl get service --namespace {{ .Release.Namespace }} spin-gate -o=jsonpath='{.spec.type}')" = "ClusterIP" ]; then
kubectl patch service --namespace {{ .Release.Namespace }} spin-gate --patch "$PATCH"
fi
{{- end }}

0 comments on commit 7297496

Please sign in to comment.