Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
cc2837b8
Commit
cc2837b8
authored
Oct 05, 2018
by
Darren Shepherd
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove DebugContainers
parent
76f9c406
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
0 additions
and
16 deletions
+0
-16
kube_features.go
pkg/features/kube_features.go
+0
-7
labels.go
pkg/kubelet/kuberuntime/labels.go
+0
-8
labels.go
pkg/kubelet/types/labels.go
+0
-1
No files found.
pkg/features/kube_features.go
View file @
cc2837b8
...
@@ -98,12 +98,6 @@ const (
...
@@ -98,12 +98,6 @@ const (
ExpandInUsePersistentVolumes
utilfeature
.
Feature
=
"ExpandInUsePersistentVolumes"
ExpandInUsePersistentVolumes
utilfeature
.
Feature
=
"ExpandInUsePersistentVolumes"
// owner: @verb
// owner: @verb
// alpha: v1.10
//
// Allows running a "debug container" in a pod namespaces to troubleshoot a running pod.
DebugContainers
utilfeature
.
Feature
=
"DebugContainers"
// owner: @verb
// beta: v1.12
// beta: v1.12
//
//
// Allows all containers in a pod to share a process namespace.
// Allows all containers in a pod to share a process namespace.
...
@@ -398,7 +392,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
...
@@ -398,7 +392,6 @@ var defaultKubernetesFeatureGates = map[utilfeature.Feature]utilfeature.FeatureS
LocalStorageCapacityIsolation
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
LocalStorageCapacityIsolation
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
HugePages
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
HugePages
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
Sysctls
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
Sysctls
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
DebugContainers
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
PodShareProcessNamespace
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodShareProcessNamespace
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
PodPriority
:
{
Default
:
true
,
PreRelease
:
utilfeature
.
Beta
},
EnableEquivalenceClassCache
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
EnableEquivalenceClassCache
:
{
Default
:
false
,
PreRelease
:
utilfeature
.
Alpha
},
...
...
pkg/kubelet/kuberuntime/labels.go
View file @
cc2837b8
...
@@ -22,9 +22,7 @@ import (
...
@@ -22,9 +22,7 @@ import (
"k8s.io/api/core/v1"
"k8s.io/api/core/v1"
kubetypes
"k8s.io/apimachinery/pkg/types"
kubetypes
"k8s.io/apimachinery/pkg/types"
utilfeature
"k8s.io/apiserver/pkg/util/feature"
"k8s.io/klog"
"k8s.io/klog"
"k8s.io/kubernetes/pkg/features"
kubecontainer
"k8s.io/kubernetes/pkg/kubelet/container"
kubecontainer
"k8s.io/kubernetes/pkg/kubelet/container"
"k8s.io/kubernetes/pkg/kubelet/types"
"k8s.io/kubernetes/pkg/kubelet/types"
"k8s.io/kubernetes/pkg/kubelet/util/format"
"k8s.io/kubernetes/pkg/kubelet/util/format"
...
@@ -103,9 +101,6 @@ func newContainerLabels(container *v1.Container, pod *v1.Pod, containerType kube
...
@@ -103,9 +101,6 @@ func newContainerLabels(container *v1.Container, pod *v1.Pod, containerType kube
labels
[
types
.
KubernetesPodNamespaceLabel
]
=
pod
.
Namespace
labels
[
types
.
KubernetesPodNamespaceLabel
]
=
pod
.
Namespace
labels
[
types
.
KubernetesPodUIDLabel
]
=
string
(
pod
.
UID
)
labels
[
types
.
KubernetesPodUIDLabel
]
=
string
(
pod
.
UID
)
labels
[
types
.
KubernetesContainerNameLabel
]
=
container
.
Name
labels
[
types
.
KubernetesContainerNameLabel
]
=
container
.
Name
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
DebugContainers
)
{
labels
[
types
.
KubernetesContainerTypeLabel
]
=
string
(
containerType
)
}
return
labels
return
labels
}
}
...
@@ -182,9 +177,6 @@ func getPodSandboxInfoFromAnnotations(annotations map[string]string) *annotatedP
...
@@ -182,9 +177,6 @@ func getPodSandboxInfoFromAnnotations(annotations map[string]string) *annotatedP
// getContainerInfoFromLabels gets labeledContainerInfo from labels.
// getContainerInfoFromLabels gets labeledContainerInfo from labels.
func
getContainerInfoFromLabels
(
labels
map
[
string
]
string
)
*
labeledContainerInfo
{
func
getContainerInfoFromLabels
(
labels
map
[
string
]
string
)
*
labeledContainerInfo
{
var
containerType
kubecontainer
.
ContainerType
var
containerType
kubecontainer
.
ContainerType
if
utilfeature
.
DefaultFeatureGate
.
Enabled
(
features
.
DebugContainers
)
{
containerType
=
kubecontainer
.
ContainerType
(
getStringValueFromLabel
(
labels
,
types
.
KubernetesContainerTypeLabel
))
}
return
&
labeledContainerInfo
{
return
&
labeledContainerInfo
{
PodName
:
getStringValueFromLabel
(
labels
,
types
.
KubernetesPodNameLabel
),
PodName
:
getStringValueFromLabel
(
labels
,
types
.
KubernetesPodNameLabel
),
PodNamespace
:
getStringValueFromLabel
(
labels
,
types
.
KubernetesPodNamespaceLabel
),
PodNamespace
:
getStringValueFromLabel
(
labels
,
types
.
KubernetesPodNamespaceLabel
),
...
...
pkg/kubelet/types/labels.go
View file @
cc2837b8
...
@@ -21,7 +21,6 @@ const (
...
@@ -21,7 +21,6 @@ const (
KubernetesPodNamespaceLabel
=
"io.kubernetes.pod.namespace"
KubernetesPodNamespaceLabel
=
"io.kubernetes.pod.namespace"
KubernetesPodUIDLabel
=
"io.kubernetes.pod.uid"
KubernetesPodUIDLabel
=
"io.kubernetes.pod.uid"
KubernetesContainerNameLabel
=
"io.kubernetes.container.name"
KubernetesContainerNameLabel
=
"io.kubernetes.container.name"
KubernetesContainerTypeLabel
=
"io.kubernetes.container.type"
)
)
func
GetContainerName
(
labels
map
[
string
]
string
)
string
{
func
GetContainerName
(
labels
map
[
string
]
string
)
string
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment