Skip to content

Commit

Permalink
fixed script to work with kubectl v1.9.2 and later. closes #5
Browse files Browse the repository at this point in the history
  • Loading branch information
groundnuty committed May 30, 2018
1 parent 93a70a6 commit 9c6e437
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions wait_for.sh
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,26 @@ get_pod_state() {
{{- range .items -}}
{{- range .status.conditions -}}
{{- if and (eq .type "Ready") (eq .status "False") -}}
{{ .status }}
{{- if .reason -}}
{{- if ne .reason "PodCompleted" -}}
{{ .status }}
{{- end -}}
{{- else -}}
{{ .status }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
{{- else -}}
{{- range .status.conditions -}}
{{- if and (eq .type "Ready") (eq .status "False") -}}
{{ .status }}
{{- if .reason -}}
{{- if ne .reason "PodCompleted" -}}
{{ .status }}
{{- end -}}
{{- else -}}
{{ .status }}
{{- end -}}
{{- end -}}
{{- end -}}
{{- end -}}
Expand Down

0 comments on commit 9c6e437

Please sign in to comment.