probe volume, filer.

This commit is contained in:
Chris Lu 2020-10-18 22:56:12 -07:00
parent 1a443616b6
commit 80ba5abbae
3 changed files with 53 additions and 69 deletions

View File

@ -6,6 +6,7 @@ import (
appsv1 "k8s.io/api/apps/v1" appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
seaweedv1 "github.com/seaweedfs/seaweedfs-operator/api/v1" seaweedv1 "github.com/seaweedfs/seaweedfs-operator/api/v1"
) )
@ -92,43 +93,34 @@ func (r *SeaweedReconciler) createFilerStatefulSet(m *seaweedv1.Seaweed) *appsv1
Name: "swfs-s3", Name: "swfs-s3",
}, },
}, },
/*
ReadinessProbe: &corev1.Probe{ ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{ Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/cluster/status", Path: "/",
Port: intstr.IntOrString{ Port: intstr.FromInt(8888),
Type: 0, Scheme: corev1.URISchemeHTTP,
IntVal: 9333,
},
Scheme: "http",
}, },
}, },
InitialDelaySeconds: 5, InitialDelaySeconds: 10,
TimeoutSeconds: 0, TimeoutSeconds: 3,
PeriodSeconds: 15, PeriodSeconds: 15,
SuccessThreshold: 2, SuccessThreshold: 1,
FailureThreshold: 100, FailureThreshold: 100,
}, },
LivenessProbe: &corev1.Probe{ LivenessProbe: &corev1.Probe{
Handler: corev1.Handler{ Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/cluster/status", Path: "/",
Port: intstr.IntOrString{ Port: intstr.FromInt(8888),
Type: 0, Scheme: corev1.URISchemeHTTP,
IntVal: 9333,
},
Scheme: "http",
}, },
}, },
InitialDelaySeconds: 20, InitialDelaySeconds: 20,
TimeoutSeconds: 0, TimeoutSeconds: 3,
PeriodSeconds: 10, PeriodSeconds: 30,
SuccessThreshold: 1, SuccessThreshold: 1,
FailureThreshold: 6, FailureThreshold: 6,
}, },
*/
}}, }},
}, },
}, },

View File

@ -108,7 +108,7 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/cluster/status", Path: "/cluster/status",
Port: intstr.FromInt(9333), Port: intstr.FromInt(9333),
Scheme: "http", Scheme: corev1.URISchemeHTTP,
}, },
}, },
InitialDelaySeconds: 5, InitialDelaySeconds: 5,
@ -122,7 +122,7 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/cluster/status", Path: "/cluster/status",
Port: intstr.FromInt(9333), Port: intstr.FromInt(9333),
Scheme: "http", Scheme: corev1.URISchemeHTTP,
}, },
}, },
InitialDelaySeconds: 15, InitialDelaySeconds: 15,

View File

@ -6,6 +6,7 @@ import (
appsv1 "k8s.io/api/apps/v1" appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1" corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
seaweedv1 "github.com/seaweedfs/seaweedfs-operator/api/v1" seaweedv1 "github.com/seaweedfs/seaweedfs-operator/api/v1"
) )
@ -88,43 +89,34 @@ func (r *SeaweedReconciler) createVolumeServerStatefulSet(m *seaweedv1.Seaweed)
ContainerPort: 18444, ContainerPort: 18444,
}, },
}, },
/*
ReadinessProbe: &corev1.Probe{ ReadinessProbe: &corev1.Probe{
Handler: corev1.Handler{ Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/cluster/status", Path: "/status",
Port: intstr.IntOrString{ Port: intstr.FromInt(8444),
Type: 0, Scheme: corev1.URISchemeHTTP,
IntVal: 9333,
},
Scheme: "http",
}, },
}, },
InitialDelaySeconds: 5, InitialDelaySeconds: 15,
TimeoutSeconds: 0, TimeoutSeconds: 5,
PeriodSeconds: 15, PeriodSeconds: 90,
SuccessThreshold: 2, SuccessThreshold: 1,
FailureThreshold: 100, FailureThreshold: 100,
}, },
LivenessProbe: &corev1.Probe{ LivenessProbe: &corev1.Probe{
Handler: corev1.Handler{ Handler: corev1.Handler{
HTTPGet: &corev1.HTTPGetAction{ HTTPGet: &corev1.HTTPGetAction{
Path: "/cluster/status", Path: "/status",
Port: intstr.IntOrString{ Port: intstr.FromInt(8444),
Type: 0, Scheme: corev1.URISchemeHTTP,
IntVal: 9333,
},
Scheme: "http",
}, },
}, },
InitialDelaySeconds: 20, InitialDelaySeconds: 20,
TimeoutSeconds: 0, TimeoutSeconds: 5,
PeriodSeconds: 10, PeriodSeconds: 90,
SuccessThreshold: 1, SuccessThreshold: 1,
FailureThreshold: 6, FailureThreshold: 6,
}, },
*/
}}, }},
}, },
}, },