Move the 8899 integer and string literals into a const named DefaultApiServerPort in shared (#367)

This commit is contained in:
M. Mert Yıldıran
2021-10-17 15:28:33 +03:00
committed by GitHub
parent 9d179c7227
commit 167b17dfd2
4 changed files with 9 additions and 4 deletions

View File

@@ -193,7 +193,7 @@ func (provider *Provider) CreateMizuApiServerPod(ctx context.Context, opts *ApiS
command = append(command, "--namespace", opts.Namespace)
}
port := intstr.FromInt(8899)
port := intstr.FromInt(shared.DefaultApiServerPort)
pod := &core.Pod{
ObjectMeta: metav1.ObjectMeta{
@@ -281,7 +281,7 @@ func (provider *Provider) CreateService(ctx context.Context, namespace string, s
Namespace: namespace,
},
Spec: core.ServiceSpec{
Ports: []core.ServicePort{{TargetPort: intstr.FromInt(8899), Port: 80}},
Ports: []core.ServicePort{{TargetPort: intstr.FromInt(shared.DefaultApiServerPort), Port: 80}},
Type: core.ServiceTypeClusterIP,
Selector: map[string]string{"app": appLabelValue},
},