ceph: hardcode service port and container port names
When integrating rook with istio, service port names need to be prefixed by their protocol. Trying to fix this by removing static port names in favor of configurable names. Closes: #5587 add protocol prefix to service port names, hardcoded as discussed. renamed container ports Signed-off-by: Alex Flom <alexander.flom@gmail.com>
This commit is contained in:
1 parent
fc648970c4
commit
9a4d535f09
3 files changed
+5
-5
No files matched your search
@@ -283,7 +283,7 @@ func (c *Cluster) makeDashboardService(name string) *v1.Service {
|
||||
labels := controller.AppLabels(AppName, c.Namespace)
|
||||
portName := "https-dashboard"
|
||||
if !c.dashboard.SSL {
|
||||
portName = "dashboard"
|
||||
portName = "http-dashboard"
|
||||
}
|
||||
svc := &v1.Service{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
|
||||
@@ -36,7 +36,7 @@ func (c *Cluster) createService(mon *monConfig) (string, error) {
|
||||
Spec: v1.ServiceSpec{
|
||||
Ports: []v1.ServicePort{
|
||||
{
|
||||
Name: "msgr1",
|
||||
Name: "tcp-msgr1",
|
||||
Port: mon.Port,
|
||||
// --public-bind-addr=IP with no IP:port has the mon listen on port 6789
|
||||
// regardless of what port the mon advertises (--public-addr) to the outside.
|
||||
@@ -50,7 +50,7 @@ func (c *Cluster) createService(mon *monConfig) (string, error) {
|
||||
k8sutil.SetOwnerRef(&svcDef.ObjectMeta, &c.ownerRef)
|
||||
|
||||
// If deploying Nautilus or newer we need a new port for the monitor service
|
||||
addServicePort(svcDef, "msgr2", DefaultMsgr2Port)
|
||||
addServicePort(svcDef, "tcp-msgr2", DefaultMsgr2Port)
|
||||
|
||||
s, err := k8sutil.CreateOrUpdateService(c.context.Clientset, c.Namespace, svcDef)
|
||||
if err != nil {
|
||||
|
||||
@@ -265,7 +265,7 @@ func (c *Cluster) makeMonDaemonContainer(monConfig *monConfig) v1.Container {
|
||||
SecurityContext: PodSecurityContext(),
|
||||
Ports: []v1.ContainerPort{
|
||||
{
|
||||
Name: "client",
|
||||
Name: "tcp-msgr1",
|
||||
ContainerPort: monConfig.Port,
|
||||
Protocol: v1.ProtocolTCP,
|
||||
},
|
||||
@@ -287,7 +287,7 @@ func (c *Cluster) makeMonDaemonContainer(monConfig *monConfig) v1.Container {
|
||||
}
|
||||
|
||||
// Add messenger 2 port
|
||||
addContainerPort(container, "msgr2", 3300)
|
||||
addContainerPort(container, "tcp-msgr2", 3300)
|
||||
|
||||
return container
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user