mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-09-28 21:55:48 +00:00
Remove hacks added for mesos
Since Mesos is no longer in your main repository and since we have things like dynamic kubelet configuration in progress, we should drop these undocumented, untested, private hooks. cmd/kubelet/app/server.go::CreateAPIServerClientConfig CreateAPIServerClientConfig::getRuntime pkg/kubelet/kubelet_pods.go::getPhase Also remove stuff from Dependencies struct that were specific to the Mesos integration (ContainerRuntimeOptions and Options) Also remove stale references in test/e2e and and test owners file
This commit is contained in:
@@ -1103,22 +1103,6 @@ func GetContainerPortsByPodUID(endpoints *v1.Endpoints) PortsByPodUID {
|
||||
for _, port := range ss.Ports {
|
||||
for _, addr := range ss.Addresses {
|
||||
containerPort := port.Port
|
||||
hostPort := port.Port
|
||||
|
||||
// use endpoint annotations to recover the container port in a Mesos setup
|
||||
// compare contrib/mesos/pkg/service/endpoints_controller.syncService
|
||||
key := fmt.Sprintf("k8s.mesosphere.io/containerPort_%s_%s_%d", port.Protocol, addr.IP, hostPort)
|
||||
mesosContainerPortString := endpoints.Annotations[key]
|
||||
if mesosContainerPortString != "" {
|
||||
mesosContainerPort, err := strconv.Atoi(mesosContainerPortString)
|
||||
if err != nil {
|
||||
continue
|
||||
}
|
||||
containerPort = int32(mesosContainerPort)
|
||||
Logf("Mapped mesos host port %d to container port %d via annotation %s=%s", hostPort, containerPort, key, mesosContainerPortString)
|
||||
}
|
||||
|
||||
// Logf("Found pod %v, host port %d and container port %d", addr.TargetRef.UID, hostPort, containerPort)
|
||||
if _, ok := m[addr.TargetRef.UID]; !ok {
|
||||
m[addr.TargetRef.UID] = make([]int, 0)
|
||||
}
|
||||
|
Reference in New Issue
Block a user