Skip to content

Commit

Permalink
Wait using kubectl cli
Browse files Browse the repository at this point in the history
Signed-off-by: Arnob kumar saha <[email protected]>
  • Loading branch information
ArnobKumarSaha committed Oct 15, 2024
1 parent 9fe346c commit 91f6475
Show file tree
Hide file tree
Showing 10 changed files with 55 additions and 45 deletions.
8 changes: 5 additions & 3 deletions charts/kubedb-autoscaler/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ spec:
- name: wait
image: {{ include "waitfor.registry" . }}/{{ .Values.waitfor.repository }}:{{ .Values.waitfor.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "service"
- "-lapp.kubernetes.io/name=kubedb-webhook-server"
command:
- /bin/sh
- -c
- kubectl wait --for=create -n {{ .Release.Namespace }} service -l 'app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m &&
kubectl wait --for=condition=kubedb.com/conversion=true -n {{ .Release.Namespace }} pods -l 'app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m
securityContext:
{{- toYaml .Values.operator.securityContext | nindent 10 }}
resources:
Expand Down
12 changes: 6 additions & 6 deletions charts/kubedb-autoscaler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ operator:
# requests:
# cpu: 100m
# memory: 128Mi
# Docker registry containing k8s-wait-for images
# Docker registry containing kubectl-nonroot images
waitfor:
# Docker registry used to pull KubeDB enterprise k8s-wait-for image
# Docker registry used to pull KubeDB enterprise kubectl-nonroot image
registry: appscode
# KubeDB enterprise k8s-wait-for container image
repository: k8s-wait-for
# KubeDB enterprise k8s-wait-for container image tag
tag: "v2.0"
# KubeDB enterprise kubectl-nonroot container image
repository: kubectl-nonroot
# KubeDB enterprise kubectl-nonroot container image tag
tag: "1.31"

# Specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
Expand Down
8 changes: 5 additions & 3 deletions charts/kubedb-dashboard/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,11 @@ spec:
- name: wait
image: {{ include "waitfor.registry" . }}/{{ .Values.waitfor.repository }}:{{ .Values.waitfor.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "service"
- "-lapp.kubernetes.io/name=kubedb-webhook-server"
command:
- /bin/sh
- -c
- kubectl wait --for=create -n {{ .Release.Namespace }} service -l 'app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m &&
kubectl wait --for=condition=kubedb.com/conversion=true -n {{ .Release.Namespace }} pods -l 'app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m
securityContext:
{{- toYaml .Values.operator.securityContext | nindent 10 }}
resources:
Expand Down
12 changes: 6 additions & 6 deletions charts/kubedb-dashboard/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ operator:
# requests:
# cpu: 100m
# memory: 128Mi
# Docker registry containing k8s-wait-for images
# Docker registry containing kubectl-nonroot images
waitfor:
# Docker registry used to pull KubeDB enterprise k8s-wait-for image
# Docker registry used to pull KubeDB enterprise kubectl-nonroot image
registry: appscode
# KubeDB enterprise k8s-wait-for container image
repository: k8s-wait-for
# KubeDB enterprise k8s-wait-for container image tag
tag: "v2.0"
# KubeDB enterprise kubectl-nonroot container image
repository: kubectl-nonroot
# KubeDB enterprise kubectl-nonroot container image tag
tag: "1.31"

# Specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
Expand Down
8 changes: 5 additions & 3 deletions charts/kubedb-ops-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ spec:
- name: wait
image: {{ include "waitfor.registry" . }}/{{ .Values.waitfor.repository }}:{{ .Values.waitfor.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "service"
- "-lapp.kubernetes.io/name=kubedb-webhook-server"
command:
- /bin/sh
- -c
- kubectl wait --for=create -n {{ .Release.Namespace }} service -l 'app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m &&
kubectl wait --for=condition=kubedb.com/conversion=true -n {{ .Release.Namespace }} pods -l 'app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m
securityContext:
{{- toYaml .Values.operator.securityContext | nindent 10 }}
resources:
Expand Down
12 changes: 6 additions & 6 deletions charts/kubedb-ops-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ operator:
# requests:
# cpu: 100m
# memory: 128Mi
# Docker registry containing k8s-wait-for images
# Docker registry containing kubectl-nonroot images
waitfor:
# Docker registry used to pull KubeDB enterprise k8s-wait-for image
# Docker registry used to pull KubeDB enterprise kubectl-nonroot image
registry: appscode
# KubeDB enterprise k8s-wait-for container image
repository: k8s-wait-for
# KubeDB enterprise k8s-wait-for container image tag
tag: "v2.0"
# KubeDB enterprise kubectl-nonroot container image
repository: kubectl-nonroot
# KubeDB enterprise kubectl-nonroot container image tag
tag: "1.31"

# Specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
Expand Down
8 changes: 5 additions & 3 deletions charts/kubedb-provisioner/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ spec:
- name: wait
image: {{ include "waitfor.registry" . }}/{{ .Values.waitfor.repository }}:{{ .Values.waitfor.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "service"
- "-lapp.kubernetes.io/name=kubedb-webhook-server"
command:
- /bin/sh
- -c
- kubectl wait --for=create -n {{ .Release.Namespace }} service -l 'app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m &&
kubectl wait --for=condition=kubedb.com/conversion=true -n {{ .Release.Namespace }} pods -l 'app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m
securityContext:
{{- toYaml .Values.operator.securityContext | nindent 10 }}
resources:
Expand Down
12 changes: 6 additions & 6 deletions charts/kubedb-provisioner/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -53,14 +53,14 @@ operator:
# requests:
# cpu: 100m
# memory: 128Mi
# Docker registry containing k8s-wait-for images
# Docker registry containing kubectl-nonroot images
waitfor:
# Docker registry used to pull KubeDB enterprise k8s-wait-for image
# Docker registry used to pull KubeDB enterprise kubectl-nonroot image
registry: appscode
# KubeDB enterprise k8s-wait-for container image
repository: k8s-wait-for
# KubeDB enterprise k8s-wait-for container image tag
tag: "v2.0"
# KubeDB enterprise kubectl-nonroot container image
repository: kubectl-nonroot
# KubeDB enterprise kubectl-nonroot container image tag
tag: "1.31"

# Specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
Expand Down
8 changes: 5 additions & 3 deletions charts/kubedb-schema-manager/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,11 @@ spec:
- name: wait
image: {{ include "waitfor.registry" . }}/{{ .Values.waitfor.repository }}:{{ .Values.waitfor.tag }}
imagePullPolicy: {{ .Values.imagePullPolicy }}
args:
- "service"
- "-lapp.kubernetes.io/name=kubedb-webhook-server"
command:
- /bin/sh
- -c
- kubectl wait --for=create -n {{ .Release.Namespace }} service -l 'app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m &&
kubectl wait --for=condition=kubedb.com/conversion=true -n {{ .Release.Namespace }} pods -l 'app.kubernetes.io/instance={{ .Release.Name }},app.kubernetes.io/name=kubedb-webhook-server' --timeout=5m
securityContext:
{{- toYaml .Values.operator.securityContext | nindent 10 }}
resources:
Expand Down
12 changes: 6 additions & 6 deletions charts/kubedb-schema-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,14 @@ operator:
# requests:
# cpu: 100m
# memory: 128Mi
# Docker registry containing k8s-wait-for images
# Docker registry containing kubectl-nonroot images
waitfor:
# Docker registry used to pull KubeDB enterprise k8s-wait-for image
# Docker registry used to pull KubeDB enterprise kubectl-nonroot image
registry: appscode
# KubeDB enterprise k8s-wait-for container image
repository: k8s-wait-for
# KubeDB enterprise k8s-wait-for container image tag
tag: "v2.0"
# KubeDB enterprise kubectl-nonroot container image
repository: kubectl-nonroot
# KubeDB enterprise kubectl-nonroot container image tag
tag: "1.31"

# Specify an array of imagePullSecrets.
# Secrets must be manually created in the namespace.
Expand Down

0 comments on commit 91f6475

Please sign in to comment.