Repository: knative/serving
Pull request #10373 (2020-12-15 11:14:02)

[Automated] Update net-kourier nightly
Produced via:
```shell
for x in kourier.yaml; do
  curl https://storage.googleapis.com/knative-nightly/net-kourier/latest/$x > ${GITHUB_WORKSPACE}/./third_party/kourier-latest/$x
done
```
/assign @knative/networking-wg-leads
/cc @knative/networking-wg-leads

knative-prow-robot: [APPROVALNOTIFIER] This PR is **NOT APPROVED**

This pull-request has been approved by: *<a href="https://github.com/knative/serving/pull/10373#" title="Author self-approved">knative-automation</a>*
To complete the [pull request process](https://git.k8s.io/community/contributors/guide/owners.md#the-code-review-process), please assign **vagababov** after the PR has been reviewed.
You can assign the PR to them by writing `/assign @vagababov` in a comment when ready.

The full list of commands accepted by this bot can be found [here](https://go.k8s.io/bot-commands?repo=knative%2Fserving).

<details open>
Needs approval from an approver in each of these files:

- **[third_party/OWNERS](https://github.com/knative/serving/blob/master/third_party/OWNERS)**

Approvers can indicate their approval by writing `/approve` in a comment
Approvers can cancel approval by writing `/approve cancel` in a comment
</details>
<!-- META={"approvers":["vagababov"]} -->
codecov[bot]: # [Codecov](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=h1) Report
> Merging [#10373](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=desc) (53c23cd) into [master](https://codecov.io/gh/knative/serving/commit/0a24aef22479fdedfb23cc12c320b100fc8998ec?el=desc) (0a24aef) will **increase** coverage by `0.04%`.
> The diff coverage is `n/a`.

[![Impacted file tree graph](https://codecov.io/gh/knative/serving/pull/10373/graphs/tree.svg?width=650&height=150&src=pr&token=MPpDfAj4Ui)](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=tree)

```diff
@@            Coverage Diff             @@
##           master   #10373      +/-   ##
==========================================
+ Coverage   87.99%   88.03%   +0.04%     
==========================================
  Files         186      186              
  Lines        8720     8720              
==========================================
+ Hits         7673     7677       +4     
+ Misses        810      807       -3     
+ Partials      237      236       -1     
```


| [Impacted Files](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=tree) | Coverage Δ | |
|---|---|---|
| [pkg/activator/net/revision\_backends.go](https://codecov.io/gh/knative/serving/pull/10373/diff?src=pr&el=tree#diff-cGtnL2FjdGl2YXRvci9uZXQvcmV2aXNpb25fYmFja2VuZHMuZ28=) | `91.40% <0.00%> (+0.90%)` | :arrow_up: |
| [pkg/autoscaler/statforwarder/leases.go](https://codecov.io/gh/knative/serving/pull/10373/diff?src=pr&el=tree#diff-cGtnL2F1dG9zY2FsZXIvc3RhdGZvcndhcmRlci9sZWFzZXMuZ28=) | `78.41% <0.00%> (+1.43%)` | :arrow_up: |

------

[Continue to review full report at Codecov](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=footer). Last update [0a24aef...30decdd](https://codecov.io/gh/knative/serving/pull/10373?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


Patch:
diff --git a/DEVELOPMENT.md b/DEVELOPMENT.md
index 0a38bbc91..a3d94ec76 100644
--- a/DEVELOPMENT.md
+++ b/DEVELOPMENT.md
@@ -45,6 +45,7 @@ If you're working on and changing `.proto` files:
 ### Create a cluster and a repo
 
 1. [Set up a Kubernetes cluster](https://kubernetes.io/docs/setup/)
+   - Minimum supported version is 1.17.0
    - Follow the instructions in the Kubernetes doc.
 1. Set up a docker repository for pushing images. You can use any container
    image registry by adjusting the authentication methods and repository paths
@@ -87,10 +88,6 @@ export KO_DOCKER_REPO='gcr.io/my-gcloud-project-id'
 
 ### Check out your fork
 
-The Go tools require that you clone the repository to the
-`src/knative.dev/serving` directory in your
-[`GOPATH`](https://github.com/golang/go/wiki/SettingGOPATH).
-
 To check out this repository:
 
 1. Create your own
@@ -98,8 +95,6 @@ To check out this repository:
 1. Clone it to your machine:
 
 ```shell
-mkdir -p ${GOPATH}/src/knative.dev
-cd ${GOPATH}/src/knative.dev
 git clone git@github.com:${YOUR_GITHUB_USERNAME}/serving.git
 cd serving
 git remote add upstream https://github.com/knative/serving.git
diff --git a/config/core/configmaps/features.yaml b/config/core/configmaps/features.yaml
index 6f16818c2..ef0a7336a 100644
--- a/config/core/configmaps/features.yaml
+++ b/config/core/configmaps/features.yaml
@@ -20,7 +20,7 @@ metadata:
   labels:
     serving.knative.dev/release: devel
   annotations:
-    knative.dev/example-checksum: "2d4c16b9"
+    knative.dev/example-checksum: "4437b773"
 data:
   _example: |
     ################################
@@ -50,6 +50,12 @@ data:
     # See: https://knative.dev/docs/serving/feature-flags/#kubernetes-node-affinity
     kubernetes.podspec-affinity: "disabled"
 
+    # Indicates whether Kubernetes hostAliases support is enabled
+    #
+    # WARNING: Cannot safely be disabled once enabled.
+    # See: https://knative.dev/docs/serving/feature-flags/#kubernetes-host-aliases
+    kubernetes.podspec-hostaliases: "disabled"
+
     # Indicates whether Kubernetes nodeSelector support is enabled
     #
     # WARNING: Cannot safely be disabled once enabled.
diff --git a/pkg/apis/config/features.go b/pkg/apis/config/features.go
index a3b762c34..f916df878 100644
--- a/pkg/apis/config/features.go
+++ b/pkg/apis/config/features.go
@@ -44,6 +44,7 @@ func defaultFeaturesConfig() *Features {
 		MultiContainer:          Enabled,
 		PodSpecAffinity:         Disabled,
 		PodSpecDryRun:           Allowed,
+		PodSpecHostAliases:      Disabled,
 		PodSpecFieldRef:         Disabled,
 		PodSpecNodeSelector:     Disabled,
 		PodSpecRuntimeClassName: Disabled,
@@ -61,6 +62,7 @@ func NewFeaturesConfigFromMap(data map[string]string) (*Features, error) {
 		asFlag("multi-container", &nc.MultiContainer),
 		asFlag("kubernetes.podspec-affinity", &nc.PodSpecAffinity),
 		asFlag("kubernetes.podspec-dryrun", &nc.PodSpecDryRun),
+		asFlag("kubernetes.podspec-hostaliases", &nc.PodSpecHostAliases),
 		asFlag("kubernetes.podspec-fieldref", &nc.PodSpecFieldRef),
 		asFlag("kubernetes.podspec-nodeselector", &nc.PodSpecNodeSelector),
 		asFlag("kubernetes.podspec-runtimeclassname", &nc.PodSpecRuntimeClassName),
@@ -83,6 +85,7 @@ type Features struct {
 	PodSpecAffinity         Flag
 	PodSpecDryRun           Flag
 	PodSpecFieldRef         Flag
+	PodSpecHostAliases      Flag
 	PodSpecNodeSelector     Flag
 	PodSpecRuntimeClassName Flag
 	PodSpecSecurityContext  Flag
diff --git a/pkg/apis/serving/fieldmask.go b/pkg/apis/serving/fieldmask.go
index 729de306a..09a0cfff5 100644
--- a/pkg/apis/serving/fieldmask.go
+++ b/pkg/apis/serving/fieldmask.go
@@ -176,6 +176,9 @@ func PodSpecMask(ctx context.Context, in *corev1.PodSpec) *corev1.PodSpec {
 	if cfg.Features.PodSpecAffinity != config.Disabled {
 		out.Affinity = in.Affinity
 	}
+	if cfg.Features.PodSpecHostAliases != config.Disabled {
+		out.HostAliases = in.HostAliases
+	}
 	if cfg.Features.PodSpecNodeSelector != config.Disabled {
 		out.NodeSelector = in.NodeSelector
 	}
@@ -205,7 +208,6 @@ func PodSpecMask(ctx context.Context, in *corev1.PodSpec) *corev1.PodSpec {
 	out.Hostname = ""
 	out.Subdomain = ""
 	out.SchedulerName = ""
-	out.HostAliases = nil
 	out.PriorityClassName = ""
 	out.Priority = nil
 	out.DNSConfig = nil


Test patch:
diff --git a/pkg/apis/config/features_test.go b/pkg/apis/config/features_test.go
index 0ec3bf592..eea7dcff0 100644
--- a/pkg/apis/config/features_test.go
+++ b/pkg/apis/config/features_test.go
@@ -62,6 +62,7 @@ func TestFeaturesConfiguration(t *testing.T) {
 			MultiContainer:          Enabled,
 			PodSpecAffinity:         Enabled,
 			PodSpecDryRun:           Enabled,
+			PodSpecHostAliases:      Enabled,
 			PodSpecNodeSelector:     Enabled,
 			PodSpecRuntimeClassName: Enabled,
 			PodSpecSecurityContext:  Enabled,
@@ -72,6 +73,7 @@ func TestFeaturesConfiguration(t *testing.T) {
 			"multi-container":                     "Enabled",
 			"kubernetes.podspec-affinity":         "Enabled",
 			"kubernetes.podspec-dryrun":           "Enabled",
+			"kubernetes.podspec-hostaliases":      "Enabled",
 			"kubernetes.podspec-nodeselector":     "Enabled",
 			"kubernetes.podspec-runtimeclassname": "Enabled",
 			"kubernetes.podspec-securitycontext":  "Enabled",
@@ -160,6 +162,33 @@ func TestFeaturesConfiguration(t *testing.T) {
 		data: map[string]string{
 			"kubernetes.podspec-dryrun": "Disabled",
 		},
+	}, {
+		name:    "kubernetes.podspec-hostaliases Disabled",
+		wantErr: false,
+		wantFeatures: defaultWith(&Features{
+			PodSpecHostAliases: Disabled,
+		}),
+		data: map[string]string{
+			"kubernetes.podspec-hostaliases": "Disabled",
+		},
+	}, {
+		name:    "kubernetes.podspec-hostaliases Allowed",
+		wantErr: false,
+		wantFeatures: defaultWith(&Features{
+			PodSpecHostAliases: Allowed,
+		}),
+		data: map[string]string{
+			"kubernetes.podspec-hostaliases": "Allowed",
+		},
+	}, {
+		name:    "kubernetes.podspec-hostaliases Enabled",
+		wantErr: false,
+		wantFeatures: defaultWith(&Features{
+			PodSpecHostAliases: Enabled,
+		}),
+		data: map[string]string{
+			"kubernetes.podspec-hostaliases": "Enabled",
+		},
 	}, {
 		name:    "kubernetes.podspec-nodeselector Allowed",
 		wantErr: false,
diff --git a/pkg/apis/serving/k8s_validation_test.go b/pkg/apis/serving/k8s_validation_test.go
index 6e46938e2..748033745 100644
--- a/pkg/apis/serving/k8s_validation_test.go
+++ b/pkg/apis/serving/k8s_validation_test.go
@@ -55,6 +55,13 @@ func withPodSpecAffinityEnabled() configOption {
 	}
 }
 
+func withPodSpecHostAliasesEnabled() configOption {
+	return func(cfg *config.Config) *config.Config {
+		cfg.Features.PodSpecHostAliases = config.Enabled
+		return cfg
+	}
+}
+
 func withPodSpecNodeSelectorEnabled() configOption {
 	return func(cfg *config.Config) *config.Config {
 		cfg.Features.PodSpecNodeSelector = config.Enabled
@@ -579,6 +586,19 @@ func TestPodSpecFeatureValidation(t *testing.T) {
 			Paths:   []string{"affinity"},
 		},
 		cfgOpts: []configOption{withPodSpecAffinityEnabled()},
+	}, {
+		name: "HostAliases",
+		featureSpec: corev1.PodSpec{
+			HostAliases: []corev1.HostAlias{{
+				IP:        "127.0.0.1",
+				Hostnames: []string{"foo.remote", "bar.remote"},
+			}},
+		},
+		err: &apis.FieldError{
+			Message: "must not set the field(s)",
+			Paths:   []string{"hostAliases"},
+		},
+		cfgOpts: []configOption{withPodSpecHostAliasesEnabled()},
 	}, {
 		name: "NodeSelector",
 		featureSpec: corev1.PodSpec{
diff --git a/pkg/reconciler/route/resources/service_test.go b/pkg/reconciler/route/resources/service_test.go
index 770a04624..7a61b73aa 100644
--- a/pkg/reconciler/route/resources/service_test.go
+++ b/pkg/reconciler/route/resources/service_test.go
@@ -383,6 +383,7 @@ func testConfig() *config.Config {
 			PodSpecAffinity:       apiConfig.Disabled,
 			PodSpecFieldRef:       apiConfig.Disabled,
 			PodSpecDryRun:         apiConfig.Enabled,
+			PodSpecHostAliases:    apiConfig.Disabled,
 			PodSpecNodeSelector:   apiConfig.Disabled,
 			PodSpecTolerations:    apiConfig.Disabled,
 			TagHeaderBasedRouting: apiConfig.Disabled,
diff --git a/pkg/reconciler/route/table_test.go b/pkg/reconciler/route/table_test.go
index 307f03a48..62dd72edd 100644
--- a/pkg/reconciler/route/table_test.go
+++ b/pkg/reconciler/route/table_test.go
@@ -2726,6 +2726,7 @@ func reconcilerTestConfig(enableAutoTLS bool) *config.Config {
 			PodSpecAffinity:       cfgmap.Disabled,
 			PodSpecFieldRef:       cfgmap.Disabled,
 			PodSpecDryRun:         cfgmap.Enabled,
+			PodSpecHostAliases:    cfgmap.Disabled,
 			PodSpecNodeSelector:   cfgmap.Disabled,
 			PodSpecTolerations:    cfgmap.Disabled,
 			TagHeaderBasedRouting: cfgmap.Disabled,
diff --git a/third_party/kourier-latest/kourier.yaml b/third_party/kourier-latest/kourier.yaml
index b83fb4781..6b9245f97 100644
--- a/third_party/kourier-latest/kourier.yaml
+++ b/third_party/kourier-latest/kourier.yaml
@@ -18,7 +18,7 @@ metadata:
   name: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 
 ---
 # Copyright 2020 The Knative Authors
@@ -42,7 +42,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 ---
 apiVersion: rbac.authorization.k8s.io/v1
 kind: ClusterRole
@@ -51,7 +51,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 rules:
   - apiGroups: [""]
     resources: ["events"]
@@ -78,7 +78,7 @@ metadata:
   name: 3scale-kourier
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 roleRef:
   apiGroup: rbac.authorization.k8s.io
   kind: ClusterRole
@@ -110,7 +110,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 spec:
   replicas: 1
   selector:
@@ -122,7 +122,7 @@ spec:
         app: 3scale-kourier-control
     spec:
       containers:
-        - image: gcr.io/knative-nightly/knative.dev/net-kourier/cmd/kourier@sha256:da7e8e4b4fcd86e7dfbb01de787a95467952287548e2dc3c01a43859f180f4eb
+        - image: gcr.io/knative-nightly/knative.dev/net-kourier/cmd/kourier@sha256:698ca118dadf8a1a83b99008655c20a99a2c298e457337652fcb5fd2b3b45253
           name: kourier-control
           env:
             - name: CERTS_SECRET_NAMESPACE
@@ -158,7 +158,7 @@ metadata:
   namespace: knative-serving
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 spec:
   ports:
     - name: grpc-xds
@@ -191,7 +191,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 spec:
   selector:
     matchLabels:
@@ -257,7 +257,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 spec:
   ports:
     - name: http2
@@ -279,7 +279,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 spec:
   ports:
     - name: http2
@@ -297,7 +297,7 @@ metadata:
   namespace: kourier-system
   labels:
     networking.knative.dev/ingress-provider: kourier
-    serving.knative.dev/release: "v20201214-1abeb4a1"
+    serving.knative.dev/release: "v20201215-712a8beb"
 data:
   envoy-bootstrap.yaml: |
     dynamic_resources: