New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add gloo tests #3087
Add gloo tests #3087
Conversation
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: ilackarms If they are not already assigned, you can assign the PR to them by writing The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilackarms: 0 warnings.
In response to this:
For context, Gloo, the Envoy-based Kubernetes Ingress / API Gateway can now serve as a clusteringress controller for knative-serving.
Proposed Changes
- Add a set of configuration manifests for knative that support running without Istio
- Add a deployment manifest for Gloo 0.6.16 to
third_party
resources- Add a path in the e2e setup scripts to install Gloo instead of Istio before running tests
- Allow hard-coded references to the Istio gateway to be overridden using an environment variable
Release Note
NONE
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.
this pr also depends on knative/pkg#260 |
b7fb5eb
to
dc856ac
Compare
/ok-to-test |
config-no-istio/100-namespace.yaml
Outdated
@@ -0,0 +1,20 @@ | |||
# Copyright 2018 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright 2018 The Knative Authors | |
# Copyright 2019 The Knative Authors |
Same in other places.
a0fb396
to
963c763
Compare
/test pull-knative-serving-unit-tests |
3c532a4
to
ec0ef17
Compare
@tcnghia i'm seeeing test failures, one seems due to a flake but the other seems like an issue with a vendored dependency:
|
a5f7847
to
794a013
Compare
compile err was caused by the new version of |
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
ce52313
to
6e55850
Compare
Signed-off-by: Scott Weiss <sdw35@cornell.edu>
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suprisingly simple I have to say! I don't like all the duplication of our config YAMLs though, can we do better there? These will eventually rot I fear.
/assign @adrcunha
For some opinions on how to structure this in the tests.
@@ -0,0 +1,20 @@ | |||
# Copyright 2019 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you comment on the diff of all of these config-no-istio
files with their config
counterparts? This seems like a lot of duplication to me. Also config-no-istio
should be config-gloo
, shouldn't it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that there's a lot of duplication in config-no-istio
(which i'll rename as suggested). The challenge here is how to modify the existing config
dir which has dependencies on Istio that aren't needed for the Gloo tests. the changes in the config-no-istio
dir include:
- removing any references to istio crds
- removing any references to the
istio-system
namespace
Without some kind of chart templating system like Helm, it's hard to reuse the original manifest. I agree that a modified duplicate of the config
dir is unsuitable here.
One possibility is to run a simple script that will parse the finished serving.yaml
manifest and spit out a serving-gloo.yaml
with all Istio references removed.
Another is, rather than removing references to Istio from the default serving manifest, instead, simply pre-create the istio-system
namespace and register Istio crds before applying the serving.yaml in the test setup.
Other than these two options, I'm not sure the best way to move forward with this part of the PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a third option is to remove the alternate config path for Knative. always install Knative-Serving with Istio. Enabling Gloo for the e2e tests will not avoid deploying Istio, but instead simply ignore the fact that Istio is deployed. This will obviate the need to have an alternate deployment manifest for knative and remove all this duplication.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ilackarms after #2445 checks in you can install Knative without any Istio support by ignoring components with the label networking.knative.dev/ingress-provider: istio
.
export GATEWAY_NAMESPACE_OVERRIDE="gloo-system" | ||
else | ||
install_knative_serving || fail_test "Knative Serving installation failed" | ||
fi |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix formatting please.
test/e2e/helloworld_shell_test.go
Outdated
} | ||
if gatewayNsOverride := os.Getenv("GATEWAY_NAMESPACE_OVERRIDE"); gatewayNsOverride != "" { | ||
gatewayNamespace = gatewayNsOverride | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we make these test flags to pass to the tests? We use flags to override values elsewhere and we could just add -gateway
and -gatewayNamespace
(without override) and default them to the istio ones for now. WDYT?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed, but note that https://github.com/knative/pkg/blob/master/test/spoof/spoof.go#L133 still requires these env vars to be set
test/e2e/helloworld_shell_test.go
Outdated
} | ||
if gatewayNsOverride := os.Getenv("GATEWAY_NAMESPACE_OVERRIDE"); gatewayNsOverride != "" { | ||
gatewayNamespace = gatewayNsOverride | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
@@ -209,4 +281,5 @@ function publish_test_images() { | |||
# Deletes everything created on the cluster including all knative and istio components. | |||
function teardown() { | |||
uninstall_knative_serving | |||
uninstall_knative_serving_gloo_version |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove (see my comment below).
@@ -57,7 +57,15 @@ initialize $@ | |||
|
|||
header "Setting up environment" | |||
|
|||
install_knative_serving || fail_test "Knative Serving installation failed" | |||
if [[ "${RUN_GLOO_TESTS}" -eq "1" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Use a flag instead of an environment variable, it's better. Update
parse_flags()
ine2e-common.sh
. install_knative_serving_gloo_version
looks like a copy ofinstall_knative_serving
with a few changes. It seems to me that you could callinstall_knative_serving
with a few changes or parameters and make it install Gloo instead of Istio. Same comment about the uninstall function. They are already complex enough, so I want to avoid duplicating them as much as possible.
Signed-off-by: soloio-bot <sdw35@cornell.edu>
Please fix the conflicts and address the bot's comments. |
Co-Authored-By: ilackarms <sdw35@cornell.edu>
Co-Authored-By: ilackarms <sdw35@cornell.edu>
@@ -0,0 +1,30 @@ | |||
# Copyright 2018 The Knative Authors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# Copyright 2018 The Knative Authors | |
# Copyright 2019 The Knative Authors |
"callerEncoder": "" | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
# Log level overrides | ||
# For all components except the autoscaler and queue proxy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# For all components except the autoscaler and queue proxy, | |
# For all components except the autoscaler and queue proxy, |
# Replace this with the IP ranges of your cluster (see below for some examples). | ||
# Separate multiple entries with a comma. | ||
# Example: "10.4.0.0/14,10.7.240.0/20" | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
# deployment, global.proxy.includeIPRanges value is set to "*". | ||
# | ||
# If an invalid value is passed, "" is used instead. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
# Istio will no longer intercept traffic going to IP addresses | ||
# outside the provided ranges and there is no need to specify | ||
# egress rules. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
# Azure Container Service (ACS; deprecated): "10.244.0.0/16,10.240.0.0/16" | ||
# Azure Container Service Engine (ACS-Engine; OSS): Configurable, but defaults to "10.0.0.0/16" | ||
# Minikube: "10.0.0.1/24" | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
|
||
# metrics.backend-destination field specifies the system metrics destination. | ||
# It defaults to prometheus. If this is stackdriver, the metrics will be sent | ||
# to stackdriver. "prometheus" and "stackdriver" are supported. This field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# to stackdriver. "prometheus" and "stackdriver" are supported. This field | |
# to stackdriver. "prometheus" and "stackdriver" are supported. This field |
# field is optional. When running on GKE, application default credentials will be | ||
# used if this field is not provided. | ||
# Note: Using stackdriver will incur additional charges | ||
# metrics.stackdriver-project-id: "<your stackdriver project id>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# metrics.stackdriver-project-id: "<your stackdriver project id>" | |
# metrics.stackdriver-project-id: "<your stackdriver project id>" |
- knative-testing | ||
- kube-public | ||
- kube-system | ||
- serving-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- serving-tests | |
- serving-tests | |
"callerEncoder": "" | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} | ||
|
||
# Log level overrides | ||
# For all components except the autoscaler and queue proxy, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# For all components except the autoscaler and queue proxy, | |
# For all components except the autoscaler and queue proxy, |
# Replace this with the IP ranges of your cluster (see below for some examples). | ||
# Separate multiple entries with a comma. | ||
# Example: "10.4.0.0/14,10.7.240.0/20" | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
# deployment, global.proxy.includeIPRanges value is set to "*". | ||
# | ||
# If an invalid value is passed, "" is used instead. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
# Istio will no longer intercept traffic going to IP addresses | ||
# outside the provided ranges and there is no need to specify | ||
# egress rules. | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
# Azure Container Service (ACS; deprecated): "10.244.0.0/16,10.240.0.0/16" | ||
# Azure Container Service Engine (ACS-Engine; OSS): Configurable, but defaults to "10.0.0.0/16" | ||
# Minikube: "10.0.0.1/24" | ||
# |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# | |
# |
|
||
# metrics.backend-destination field specifies the system metrics destination. | ||
# It defaults to prometheus. If this is stackdriver, the metrics will be sent | ||
# to stackdriver. "prometheus" and "stackdriver" are supported. This field |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# to stackdriver. "prometheus" and "stackdriver" are supported. This field | |
# to stackdriver. "prometheus" and "stackdriver" are supported. This field |
# field is optional. When running on GKE, application default credentials will be | ||
# used if this field is not provided. | ||
# Note: Using stackdriver will incur additional charges | ||
# metrics.stackdriver-project-id: "<your stackdriver project id>" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# metrics.stackdriver-project-id: "<your stackdriver project id>" | |
# metrics.stackdriver-project-id: "<your stackdriver project id>" |
- knative-testing | ||
- kube-public | ||
- kube-system | ||
- serving-tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- serving-tests | |
- serving-tests | |
@ilackarms: The following tests failed, say
Full PR test history. Your PR dashboard. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here. |
This has become vastly outdated. @ilackarms is this still a valid PR? Are you planning to pick it up again? |
@markusthoemmes i'm closing this one in favor of a new one i've been working on. will be opening that shortly |
For context, Gloo, the Envoy-based Kubernetes Ingress / API Gateway can now serve as a clusteringress controller for knative-serving.
Proposed Changes
third_party
resourcesRelease Note