Signed-off-by: Howard Lau <howardlau1999@hotmail.com>
This commit is contained in:
Howard Lau 2020-10-30 06:57:02 +00:00
parent 7b11a10862
commit 53536d56db
No known key found for this signature in database
GPG Key ID: 5CCC55849E3CF8E2
6 changed files with 22 additions and 21 deletions

View File

@ -25,19 +25,19 @@ func (r *SeaweedReconciler) createFilerPeerService(m *seaweedv1.Seaweed) *corev1
PublishNotReadyAddresses: true,
Ports: []corev1.ServicePort{
{
Name: "swfs-filer",
Name: "filer-http",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.FilerHTTPPort,
TargetPort: intstr.FromInt(seaweedv1.FilerHTTPPort),
},
{
Name: "swfs-filer-grpc",
Name: "filer-grpc",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.FilerGRPCPort,
TargetPort: intstr.FromInt(seaweedv1.FilerGRPCPort),
},
{
Name: "swfs-s3",
Name: "filer-s3",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.FilerS3Port,
TargetPort: intstr.FromInt(seaweedv1.FilerS3Port),
@ -66,19 +66,19 @@ func (r *SeaweedReconciler) createFilerService(m *seaweedv1.Seaweed) *corev1.Ser
PublishNotReadyAddresses: true,
Ports: []corev1.ServicePort{
{
Name: "swfs-filer",
Name: "filer-http",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.FilerHTTPPort,
TargetPort: intstr.FromInt(seaweedv1.FilerHTTPPort),
},
{
Name: "swfs-filer-grpc",
Name: "filer-grpc",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.FilerGRPCPort,
TargetPort: intstr.FromInt(seaweedv1.FilerGRPCPort),
},
{
Name: "swfs-s3",
Name: "filer-s3",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.FilerS3Port,
TargetPort: intstr.FromInt(seaweedv1.FilerS3Port),

View File

@ -43,7 +43,7 @@ func (r *SeaweedReconciler) createFilerStatefulSet(m *seaweedv1.Seaweed) *appsv1
}
filerPodSpec.EnableServiceLinks = &enableServiceLinks
filerPodSpec.Containers = []corev1.Container{{
Name: "seaweedfs",
Name: "filer",
Image: m.Spec.Image,
ImagePullPolicy: m.BaseFilerSpec().ImagePullPolicy(),
Env: append(m.BaseFilerSpec().Env(), kubernetesEnvVars...),
@ -55,15 +55,15 @@ func (r *SeaweedReconciler) createFilerStatefulSet(m *seaweedv1.Seaweed) *appsv1
Ports: []corev1.ContainerPort{
{
ContainerPort: seaweedv1.FilerHTTPPort,
Name: "swfs-filer",
Name: "filer-http",
},
{
ContainerPort: seaweedv1.FilerGRPCPort,
Name: "swfs-filer-grpc",
Name: "filer-grpc",
},
{
ContainerPort: seaweedv1.FilerS3Port,
Name: "swfs-s3",
Name: "filer-s3",
},
},
ReadinessProbe: &corev1.Probe{

View File

@ -25,13 +25,13 @@ func (r *SeaweedReconciler) createMasterPeerService(m *seaweedv1.Seaweed) *corev
PublishNotReadyAddresses: true,
Ports: []corev1.ServicePort{
{
Name: "swfs-master",
Name: "master-http",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.MasterHTTPPort,
TargetPort: intstr.FromInt(seaweedv1.MasterHTTPPort),
},
{
Name: "swfs-master-grpc",
Name: "master-grpc",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.MasterGRPCPort,
TargetPort: intstr.FromInt(seaweedv1.MasterGRPCPort),
@ -61,13 +61,13 @@ func (r *SeaweedReconciler) createMasterService(m *seaweedv1.Seaweed) *corev1.Se
PublishNotReadyAddresses: true,
Ports: []corev1.ServicePort{
{
Name: "swfs-master",
Name: "master-http",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.MasterHTTPPort,
TargetPort: intstr.FromInt(seaweedv1.MasterHTTPPort),
},
{
Name: "swfs-master-grpc",
Name: "master-grpc",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.MasterGRPCPort,
TargetPort: intstr.FromInt(seaweedv1.MasterGRPCPort),

View File

@ -57,7 +57,7 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
}
masterPodSpec.EnableServiceLinks = &enableServiceLinks
masterPodSpec.Containers = []corev1.Container{{
Name: "seaweedfs",
Name: "master",
Image: m.Spec.Image,
ImagePullPolicy: m.BaseMasterSpec().ImagePullPolicy(),
Env: append(m.BaseMasterSpec().Env(), kubernetesEnvVars...),
@ -76,10 +76,11 @@ func (r *SeaweedReconciler) createMasterStatefulSet(m *seaweedv1.Seaweed) *appsv
Ports: []corev1.ContainerPort{
{
ContainerPort: seaweedv1.MasterHTTPPort,
Name: "swfs-master",
Name: "master-http",
},
{
ContainerPort: seaweedv1.MasterGRPCPort,
Name: "master-grpc",
},
},
ReadinessProbe: &corev1.Probe{

View File

@ -58,13 +58,13 @@ func (r *SeaweedReconciler) createVolumeServerService(m *seaweedv1.Seaweed) *cor
PublishNotReadyAddresses: true,
Ports: []corev1.ServicePort{
{
Name: "swfs-volume",
Name: "volume",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.VolumeHTTPPort,
TargetPort: intstr.FromInt(seaweedv1.VolumeHTTPPort),
},
{
Name: "swfs-volume-grpc",
Name: "volume-grpc",
Protocol: corev1.Protocol("TCP"),
Port: seaweedv1.VolumeGRPCPort,
TargetPort: intstr.FromInt(seaweedv1.VolumeGRPCPort),

View File

@ -74,7 +74,7 @@ func (r *SeaweedReconciler) createVolumeServerStatefulSet(m *seaweedv1.Seaweed)
volumePodSpec := m.BaseVolumeSpec().BuildPodSpec()
volumePodSpec.EnableServiceLinks = &enableServiceLinks
volumePodSpec.Containers = []corev1.Container{{
Name: "seaweedfs",
Name: "volume",
Image: m.Spec.Image,
ImagePullPolicy: m.BaseVolumeSpec().ImagePullPolicy(),
Env: append(m.BaseVolumeSpec().Env(), kubernetesEnvVars...),
@ -86,11 +86,11 @@ func (r *SeaweedReconciler) createVolumeServerStatefulSet(m *seaweedv1.Seaweed)
Ports: []corev1.ContainerPort{
{
ContainerPort: seaweedv1.VolumeHTTPPort,
Name: "swfs-volume",
Name: "volume-http",
},
{
ContainerPort: seaweedv1.VolumeGRPCPort,
Name: "swfs-volume-grpc",
Name: "volume-grpc",
},
},
ReadinessProbe: &corev1.Probe{