forked from istio/istio
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
revive the liveness/readiness probe config (istio#3335)
The real problem of 'crash loop' of mixer is failure of initialization; the mixer CRD store will wait for up to 30 seconds for init. (see https://github.com/istio/istio/blob/master/mixer/pkg/config/crd/store.go#L52) Considering this, this PR sets the initial delay for liveness to be 60 seconds for safety.
- Loading branch information
Showing
3 changed files
with
104 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
96 changes: 96 additions & 0 deletions
96
install/kubernetes/templates/istio-mixer-with-health-check.yaml.tmpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# | ||
# This file only contains the deployment configuration for mixer | ||
# with liveness / readiness. This file is supposed to be used after | ||
# installing istio normally (like istio.yaml) to update mixer setup. | ||
|
||
apiVersion: extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: istio-mixer | ||
namespace: {ISTIO_NAMESPACE} | ||
spec: | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
istio: mixer | ||
annotations: | ||
sidecar.istio.io/inject: "false" | ||
spec: | ||
serviceAccountName: istio-mixer-service-account | ||
containers: | ||
- name: statsd-to-prometheus | ||
image: prom/statsd-exporter:v0.5.0 | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 9102 | ||
- containerPort: 9125 | ||
protocol: UDP | ||
args: | ||
- '-statsd.mapping-config=/etc/statsd/mapping.conf' | ||
volumeMounts: | ||
- name: config-volume | ||
mountPath: /etc/statsd | ||
- name: mixer | ||
image: {MIXER_HUB}/mixer:{MIXER_TAG} | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 9091 | ||
- containerPort: 9093 | ||
- containerPort: 9094 | ||
- containerPort: 42422 | ||
args: | ||
- --configStoreURL=k8s:// | ||
- --configDefaultNamespace={ISTIO_NAMESPACE} | ||
- --zipkinURL=http://zipkin:9411/api/v1/spans | ||
- --livenessProbePath=/live | ||
- --livenessProbeInterval=5s | ||
- --readinessProbePath=/ready | ||
- --readinessProbeInterval=5s | ||
- --logtostderr | ||
- -v | ||
- "2" | ||
livenessProbe: | ||
exec: | ||
command: | ||
- /usr/local/bin/mixs | ||
- probe | ||
- --probe-path=/live | ||
- --interval=5s | ||
initialDelaySeconds: 60 | ||
periodSeconds: 5 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /usr/local/bin/mixs | ||
- probe | ||
- --probe-path=/ready | ||
- --interval=5s | ||
initialDelaySeconds: 5 | ||
periodSeconds: 5 | ||
- name: istio-proxy | ||
image: {PROXY_HUB}/{PROXY_IMAGE}:{PROXY_TAG} | ||
imagePullPolicy: IfNotPresent | ||
ports: | ||
- containerPort: 15004 | ||
args: | ||
- proxy | ||
- mixer | ||
- -v | ||
- "2" | ||
- --controlPlaneAuthPolicy | ||
- NONE #--controlPlaneAuthPolicy | ||
- --customConfigFile | ||
- /etc/istio/proxy/envoy_mixer.json | ||
volumeMounts: | ||
- name: istio-certs | ||
mountPath: /etc/certs | ||
readOnly: true | ||
volumes: | ||
- name: istio-certs | ||
secret: | ||
secretName: istio.istio-mixer-service-account | ||
optional: true | ||
- name: config-volume | ||
configMap: | ||
name: istio-mixer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters