Skip to content
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

Closed
wants to merge 22 commits into from
Closed

Add gloo tests #3087

wants to merge 22 commits into from

Conversation

ilackarms
Copy link
Contributor

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

@knative-prow-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: ilackarms
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: mdemirhan

If they are not already assigned, you can assign the PR to them by writing /assign @mdemirhan in a comment when ready.

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow-robot knative-prow-robot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 4, 2019
@knative-prow-robot knative-prow-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 4, 2019
Copy link
Contributor

@knative-prow-robot knative-prow-robot left a 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.

@ilackarms
Copy link
Contributor Author

this pr also depends on knative/pkg#260

@vagababov
Copy link
Contributor

/ok-to-test

@knative-prow-robot knative-prow-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Feb 4, 2019
@@ -0,0 +1,20 @@
# Copyright 2018 The Knative Authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright 2018 The Knative Authors
# Copyright 2019 The Knative Authors

Same in other places.

@tcnghia
Copy link
Contributor

tcnghia commented Feb 6, 2019

/test pull-knative-serving-unit-tests

@ilackarms
Copy link
Contributor Author

@tcnghia i'm seeeing test failures, one seems due to a flake but the other seems like an issue with a vendored dependency:

github.com/knative/serving/vendor/k8s.io/client-go/plugin/pkg/client/auth/gcp
# github.com/knative/serving/cmd/queue
cmd/queue/main.go:283:50: not enough arguments in call to websocket.NewDurableSendingConnection
 	have (string)
 	want (string, *zap.SugaredLogger)

@ilackarms
Copy link
Contributor Author

compile err was caused by the new version of knative/pkg. fixed the compile issue by updating main

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>
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>
@ilackarms
Copy link
Contributor Author

/retest

Copy link
Contributor

@markusthoemmes markusthoemmes left a 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
Copy link
Contributor

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?

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix formatting please.

}
if gatewayNsOverride := os.Getenv("GATEWAY_NAMESPACE_OVERRIDE"); gatewayNsOverride != "" {
gatewayNamespace = gatewayNsOverride
}
Copy link
Contributor

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?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1

Copy link
Contributor Author

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

}
if gatewayNsOverride := os.Getenv("GATEWAY_NAMESPACE_OVERRIDE"); gatewayNsOverride != "" {
gatewayNamespace = gatewayNsOverride
}
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Use a flag instead of an environment variable, it's better. Update parse_flags() in e2e-common.sh.
  2. install_knative_serving_gloo_version looks like a copy of install_knative_serving with a few changes. It seems to me that you could call install_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>
@adrcunha
Copy link
Contributor

Please fix the conflicts and address the bot's comments.

mattmoor-sockpuppet and others added 2 commits March 21, 2019 08:12
Co-Authored-By: ilackarms <sdw35@cornell.edu>
Co-Authored-By: ilackarms <sdw35@cornell.edu>
@knative-prow-robot knative-prow-robot added the area/test-and-release It flags unit/e2e/conformance/perf test issues for product features label Mar 21, 2019
@@ -0,0 +1,30 @@
# Copyright 2018 The Knative Authors
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Copyright 2018 The Knative Authors
# Copyright 2019 The Knative Authors

"callerEncoder": ""
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}

# Log level overrides
# For all components except the autoscaler and queue proxy,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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"
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#

# deployment, global.proxy.includeIPRanges value is set to "*".
#
# If an invalid value is passed, "" is used instead.
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#

# Istio will no longer intercept traffic going to IP addresses
# outside the provided ranges and there is no need to specify
# egress rules.
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#

# 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"
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#


# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# metrics.stackdriver-project-id: "<your stackdriver project id>"
# metrics.stackdriver-project-id: "<your stackdriver project id>"

- knative-testing
- kube-public
- kube-system
- serving-tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- serving-tests
- serving-tests

"callerEncoder": ""
}
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change

}

# Log level overrides
# For all components except the autoscaler and queue proxy,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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"
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#

# deployment, global.proxy.includeIPRanges value is set to "*".
#
# If an invalid value is passed, "" is used instead.
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#

# Istio will no longer intercept traffic going to IP addresses
# outside the provided ranges and there is no need to specify
# egress rules.
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#

# 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"
#
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
#
#


# 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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# 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>"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# metrics.stackdriver-project-id: "<your stackdriver project id>"
# metrics.stackdriver-project-id: "<your stackdriver project id>"

- knative-testing
- kube-public
- kube-system
- serving-tests
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- serving-tests
- serving-tests

@knative-prow-robot
Copy link
Contributor

@ilackarms: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-knative-serving-go-coverage d209014 link /test pull-knative-serving-go-coverage
pull-knative-serving-build-tests d209014 link /test pull-knative-serving-build-tests
pull-knative-serving-unit-tests d209014 link /test pull-knative-serving-unit-tests
pull-knative-serving-integration-tests d209014 link /test pull-knative-serving-integration-tests
pull-knative-serving-upgrade-tests d209014 link /test pull-knative-serving-upgrade-tests

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.

@markusthoemmes
Copy link
Contributor

This has become vastly outdated. @ilackarms is this still a valid PR? Are you planning to pick it up again?

@ilackarms
Copy link
Contributor Author

@markusthoemmes i'm closing this one in favor of a new one i've been working on. will be opening that shortly

@ilackarms ilackarms closed this Jul 1, 2019
@ilackarms ilackarms mentioned this pull request Jul 10, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/test-and-release It flags unit/e2e/conformance/perf test issues for product features size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants