mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-06 07:57:35 +00:00
Merge pull request #56754 from dims/remove-hacks-for-mesos
Automatic merge from submit-queue (batch tested with PRs 57127, 57011, 56754, 56601, 56483). If you want to cherry-pick this change to another branch, please follow the instructions <a href="https://github.com/kubernetes/community/blob/master/contributors/devel/cherry-picks.md">here</a>. Remove hacks added for mesos **What this PR does / why we need it**: 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 **Which issue(s) this PR fixes** *(optional, in `fixes #<issue number>(, fixes #<issue_number>, ...)` format, will close the issue(s) when PR gets merged)*: Fixes # **Special notes for your reviewer**: **Release note**: ```release-note Drop hacks used for Mesos integration that was already removed from main kubernetes repository ```
This commit is contained in:
@@ -1105,22 +1105,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