Skip to content

Commit

Permalink
remove: support for hostnetwork (#2815)
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunzhuo authored Mar 7, 2024
1 parent 44ede66 commit fe4de9f
Show file tree
Hide file tree
Showing 9 changed files with 0 additions and 15 deletions.
4 changes: 0 additions & 4 deletions api/v1alpha1/shared_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,6 @@ type KubernetesPodSpec struct {
// +optional
Volumes []corev1.Volume `json:"volumes,omitempty"`

// HostNetwork, If this is set to true, the pod will use host's network namespace.
// +optional
HostNetwork bool `json:"hostNetwork,omitempty"`

// ImagePullSecrets is an optional list of references to secrets
// in the same namespace to use for pulling any of the images used by this PodSpec.
// If specified, these secrets will be passed to individual puller implementations for them to use.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3282,10 +3282,6 @@ spec:
should be appended to the pods. By default, no pod
annotations are appended.
type: object
hostNetwork:
description: HostNetwork, If this is set to true,
the pod will use host's network namespace.
type: boolean
imagePullSecrets:
description: 'ImagePullSecrets is an optional list
of references to secrets in the same namespace to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ func (r *ResourceRender) Deployment() (*appsv1.Deployment, error) {
RestartPolicy: corev1.RestartPolicyAlways,
SchedulerName: "default-scheduler",
SecurityContext: deploymentConfig.Pod.SecurityContext,
HostNetwork: deploymentConfig.Pod.HostNetwork,
Affinity: deploymentConfig.Pod.Affinity,
Tolerations: deploymentConfig.Pod.Tolerations,
Volumes: expectedDeploymentVolumes(r.infra.Name, deploymentConfig),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,6 @@ func TestDeployment(t *testing.T) {
SecurityContext: &corev1.PodSecurityContext{
RunAsUser: ptr.To[int64](1000),
},
HostNetwork: true,
},
Container: &egv1a1.KubernetesContainerSpec{
Image: ptr.To("envoyproxy/envoy:v1.2.3"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,6 @@ spec:
terminationMessagePath: /dev/termination-log
terminationMessagePolicy: File
dnsPolicy: ClusterFirst
hostNetwork: true
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ func (r *ResourceRender) Deployment() (*appsv1.Deployment, error) {
RestartPolicy: corev1.RestartPolicyAlways,
SchedulerName: "default-scheduler",
SecurityContext: r.rateLimitDeployment.Pod.SecurityContext,
HostNetwork: r.rateLimitDeployment.Pod.HostNetwork,
Volumes: expectedDeploymentVolumes(r.rateLimit, r.rateLimitDeployment),
Affinity: r.rateLimitDeployment.Pod.Affinity,
Tolerations: r.rateLimitDeployment.Pod.Tolerations,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,6 @@ func TestDeployment(t *testing.T) {
SecurityContext: &corev1.PodSecurityContext{
RunAsUser: ptr.To[int64](1000),
},
HostNetwork: true,
},
Container: &egv1a1.KubernetesContainerSpec{
Image: ptr.To("custom-image"),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,6 @@ spec:
name: statsd-exporter-config
readOnly: true
dnsPolicy: ClusterFirst
hostNetwork: true
restartPolicy: Always
schedulerName: default-scheduler
securityContext:
Expand Down
1 change: 0 additions & 1 deletion site/content/en/latest/api/extension_types.md
Original file line number Diff line number Diff line change
Expand Up @@ -1480,7 +1480,6 @@ _Appears in:_
| `affinity` | _[Affinity](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#affinity-v1-core)_ | false | If specified, the pod's scheduling constraints. |
| `tolerations` | _[Toleration](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#toleration-v1-core) array_ | false | If specified, the pod's tolerations. |
| `volumes` | _[Volume](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#volume-v1-core) array_ | false | Volumes that can be mounted by containers belonging to the pod. More info: https://kubernetes.io/docs/concepts/storage/volumes |
| `hostNetwork` | _boolean_ | false | HostNetwork, If this is set to true, the pod will use host's network namespace. |
| `imagePullSecrets` | _[LocalObjectReference](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#localobjectreference-v1-core) array_ | false | ImagePullSecrets is an optional list of references to secrets in the same namespace to use for pulling any of the images used by this PodSpec. If specified, these secrets will be passed to individual puller implementations for them to use. More info: https://kubernetes.io/docs/concepts/containers/images#specifying-imagepullsecrets-on-a-pod |
| `nodeSelector` | _object (keys:string, values:string)_ | false | NodeSelector is a selector which must be true for the pod to fit on a node. Selector which must match a node's labels for the pod to be scheduled on that node. More info: https://kubernetes.io/docs/concepts/configuration/assign-pod-node/ |
| `topologySpreadConstraints` | _[TopologySpreadConstraint](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.26/#topologyspreadconstraint-v1-core) array_ | false | TopologySpreadConstraints describes how a group of pods ought to spread across topology domains. Scheduler will schedule pods in a way which abides by the constraints. All topologySpreadConstraints are ANDed. |
Expand Down

0 comments on commit fe4de9f

Please sign in to comment.