Merge pull request #1890 from my-git9/livs
Add livenes for karmada-scheduler
This commit is contained in:
commit
4eba0e506b
|
@ -23,6 +23,15 @@ spec:
|
|||
- name: karmada-scheduler
|
||||
image: swr.ap-southeast-1.myhuaweicloud.com/karmada/karmada-scheduler:latest
|
||||
imagePullPolicy: IfNotPresent
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10351
|
||||
scheme: HTTP
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
command:
|
||||
- /bin/karmada-scheduler
|
||||
- --kubeconfig=/etc/kubeconfig
|
||||
|
|
|
@ -60,6 +60,15 @@ spec:
|
|||
- --bind-address=0.0.0.0
|
||||
- --secure-port=10351
|
||||
- --feature-gates=Failover=true
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /healthz
|
||||
port: 10351
|
||||
scheme: HTTP
|
||||
failureThreshold: 3
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 15
|
||||
timeoutSeconds: 5
|
||||
volumeMounts:
|
||||
{{- include "karmada.kubeconfig.volumeMount" . | nindent 12 }}
|
||||
resources:
|
||||
|
|
|
@ -360,6 +360,23 @@ func (i *CommandInitOption) makeKarmadaSchedulerDeployment() *appsv1.Deployment
|
|||
},
|
||||
}
|
||||
|
||||
// Probes
|
||||
livenesProbe := &corev1.Probe{
|
||||
ProbeHandler: corev1.ProbeHandler{
|
||||
HTTPGet: &corev1.HTTPGetAction{
|
||||
Path: "/healthz",
|
||||
Port: intstr.IntOrString{
|
||||
IntVal: 10351,
|
||||
},
|
||||
Scheme: corev1.URISchemeHTTP,
|
||||
},
|
||||
},
|
||||
InitialDelaySeconds: 15,
|
||||
FailureThreshold: 3,
|
||||
PeriodSeconds: 15,
|
||||
TimeoutSeconds: 5,
|
||||
}
|
||||
|
||||
podSpec := corev1.PodSpec{
|
||||
Affinity: &corev1.Affinity{
|
||||
PodAntiAffinity: &corev1.PodAntiAffinity{
|
||||
|
@ -394,6 +411,7 @@ func (i *CommandInitOption) makeKarmadaSchedulerDeployment() *appsv1.Deployment
|
|||
fmt.Sprintf("--leader-elect-resource-namespace=%s", i.Namespace),
|
||||
"--v=4",
|
||||
},
|
||||
LivenessProbe: livenesProbe,
|
||||
VolumeMounts: []corev1.VolumeMount{
|
||||
{
|
||||
Name: kubeConfigSecretAndMountName,
|
||||
|
|
Loading…
Reference in New Issue