Add livenesProbe for karmada-aggregated-apiserver

Signed-off-by: xin.li <xin.li@daocloud.io>
This commit is contained in:
xin.li 2022-09-26 21:05:55 +08:00
parent da070e68f3
commit 5cc3d9f5ab
3 changed files with 31 additions and 0 deletions

View File

@ -57,6 +57,14 @@ spec:
initialDelaySeconds: 1
periodSeconds: 3
timeoutSeconds: 15
livenessProbe:
httpGet:
path: /healthz
port: 443
scheme: HTTPS
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 15
volumes:
- name: karmada-certs
secret:

View File

@ -75,6 +75,14 @@ spec:
initialDelaySeconds: 1
periodSeconds: 3
timeoutSeconds: 15
livenessProbe:
httpGet:
path: /healthz
port: 443
scheme: HTTPS
initialDelaySeconds: 10
periodSeconds: 10
timeoutSeconds: 15
{{- with .Values.aggregatedApiServer.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}

View File

@ -738,6 +738,20 @@ func (i *CommandInitOption) makeKarmadaAggregatedAPIServerDeployment() *appsv1.D
PeriodSeconds: 3,
TimeoutSeconds: 15,
}
livenesProbe := &corev1.Probe{
ProbeHandler: corev1.ProbeHandler{
HTTPGet: &corev1.HTTPGetAction{
Path: "/healthz",
Port: intstr.IntOrString{
IntVal: 443,
},
Scheme: corev1.URISchemeHTTPS,
},
},
InitialDelaySeconds: 10,
PeriodSeconds: 10,
TimeoutSeconds: 15,
}
podSpec := corev1.PodSpec{
Affinity: &corev1.Affinity{
@ -793,6 +807,7 @@ func (i *CommandInitOption) makeKarmadaAggregatedAPIServerDeployment() *appsv1.D
},
},
ReadinessProbe: readinesProbe,
LivenessProbe: livenesProbe,
Resources: corev1.ResourceRequirements{
Requests: corev1.ResourceList{
corev1.ResourceCPU: resource.MustParse("100m"),