-
Notifications
You must be signed in to change notification settings - Fork 30
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
⬆️ Bump Gateway API version to v0.5.0-rc1 #315
⬆️ Bump Gateway API version to v0.5.0-rc1 #315
Conversation
Skipping CI for Draft Pull Request. |
/assign @nak3 |
/retest |
Codecov Report
@@ Coverage Diff @@
## main #315 +/- ##
=======================================
Coverage 12.91% 12.91%
=======================================
Files 20 20
Lines 2958 2958
=======================================
Hits 382 382
Misses 2554 2554
Partials 22 22
Continue to review full report at Codecov.
|
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.
FWIW, the 100-
, 200-
, etc prefixes on files in /config
are pretty standard elsewhere in Knative (which makes it easier to put in more config files), but I don't have a strong feeling about 01-
, 03-
and 04-
instead.
There are a couple places where I think you ended up replacing /config
with /third_party/gateway-api
which you didn't mean to, but this otherwise looks as reasonable as can be expected given the changes between 0.4.0 and 0.5.0-rc1.
Thanks!
Latest gateway-api @ HEAD has the fix (kubernetes-sigs/gateway-api#1239) to unblock injection/code generation - doing a |
eef0e4f
to
1de4442
Compare
I'm fixing the e2e test scripts so they (hopefully) each contain what's needed for starting the corresponding controller (and waiting for it to be ready), and no more. |
Let me know when this goes in. I think you wanted this before #316, so I'm going to hold that one since it's still open. |
Argh, I am sorry that I only saw this now. Wanted to reorg the e2e tests in a separate PR but realized it needs to be done in a way that is compatible with how serving loads tests and artifacts, and so both sides need to be changed. I will spruce up a couple minor things and have this PR ready tomorrow morning. |
Our injection generated code was not being generated correctly anyway.
Pulling from main for now which now contains the correct `ReferencePolicyList.Items.[]ReferencePolicy` spec.
- Reverted: - third_party/gateway-api/ -> config/ - Refactored out test configuration for different vendor into a common setup file - Improved docs for installation (README) (closes knative-extensions#292) and for development/testing (DEVELOPMENT).
I know what's causing these failures, will have a fix soon. |
fix for the above coming next.. |
Tests are passing now. |
(Adding this to the queue of reviews I need to do tonight) |
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.
Looks fairly good -- I think only one or two of these are actionable.
/approve
(Will /lgtm
if you decide that you want to handle followups as "quick win" subsequent changes.)
- name: Prepare test namespaces | ||
run: | | ||
kubectl apply -f test/config/ | ||
|
||
- name: Upload Test Images | ||
run: | | ||
# Build and Publish our test images to the docker daemon. | ||
./test/upload-test-images.sh | ||
|
||
- name: Run e2e Tests | ||
- name: Run Conformance 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.
As discussed in person, separating the test refactor and the go.mod
changes and upgrade fallout probably would make for two easier-to-review PRs that wouldn't get blocked on each other working.
More of an "advice for next time and bystanders" than a direction for this PR.
|
||
tmp |
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.
Is this an artifact of your development patterns, or do we now write files to a local tmp
?
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.
Not mine. This tmp dir gets created during the code generation. Because it was taking so long/freezing on my machine and I had to kill that process many times, I noticed that depending on how far in the process the dir wouldn't have been cleaned up.
I could have added that to my global gitignore but figured it will be useful in the case when interrupting the codegen before it runs to the end.
This doc explains how to setup a development environment so you can get started | ||
[contributing](https://www.knative.dev/contributing/) to Knative | ||
`net-gateway-api`. Also take a look at: | ||
contributing to Knative `net-gateway-api`. |
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.
Why cut the link to the other contributing docs?
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 moved it to a bullet the very next line, next to another link of similar kind.
|
||
### Checkout your fork | ||
## Notes | ||
If you use the konk script to setup your cluster, your cluster will be named `knative`. However, most of the scripts expect it to be the default `kind` name. Set the kind cluster name env `export KIND_CLUSTER_NAME=knative` to point to `knative` cluster. KO requires a registry which if you are developing locally you could use `export KO_DOCKER_REPO=kind.local` to use the local one on kind. Please see official [KO documentation](https://github.com/google/ko#local-publishing-options) for more information. |
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.
Link to the konk
script?
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.
If you're using a non-standard Kind cluster name with KO_DOCKER_REPO=kind.local
, the KIND_CLUSTER_NAME
also needs to be set, which isn't clear from these directions. Is KIND_CLUSTER_NAME
used by other scripts or tools in this repo?
1. A running cluster | ||
2. [Knative serving installed](README.md#install-knative-serving) | ||
3. [`ko`](https://github.com/google/ko) (for development and testing) | ||
4. [`kubectl`](https://kubernetes.io/docs/tasks/tools/install-kubectl/) (for managing development environments) | ||
5. [`bash`](https://www.gnu.org/software/bash/) v4 or later. On macOS the default bash is too old, you can use [Homebrew](https://brew.sh) to install a later 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.
Golang?
# TODO(carlisia): remove the below two lines in a future release. | ||
# Reason: although the `gateway.networking.k8s.io_referencepolicies.yaml` file is included in the `v0.5.0-rc1` version, it is not referenced in the corresponding kustomize file. I'm assuming this will remain the same for the actual release. | ||
# The file reference is included in the kustomize file in the `main` branch. With that, if these lines are not removed, there would be a duplicate of this resource. | ||
echo "---" >> "${REPO_ROOT_DIR}/config/100-gateway-api.yaml" | ||
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/gateway-api/${GATEWAY_API_VERSION}/config/crd/experimental/gateway.networking.k8s.io_referencepolicies.yaml" >> "${REPO_ROOT_DIR}/config/100-gateway-api.yaml" |
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.
Is this still accurate? I see:
(and I think you were saying they re-cut rc1
for this)
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.
Yes, unless I am misunderstanding the question.
I think you are remembering the conversation about this fix: fix ReferencePolicyList.Items type by dprotaso · Pull Request #1239 · kubernetes-sigs/gateway-api. This fix is in main
and will be included in the final v0.5.0
(I confirmed it).
I adjusted the go mod dep to include what is in main so at least the generated code (on our end) and the deps now match.
gatewayRef := gatewayv1alpa2.ParentRef{ | ||
Namespace: namespacePtr(gatewayv1alpa2.Namespace(namespacedNameGateway.Namespace)), | ||
Name: gatewayv1alpa2.ObjectName(namespacedNameGateway.Name), | ||
gatewayRef := gatewayv1alpha2.ParentReference{ |
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.
Reviewing note: Combining the typo fix with the s/ParentRef/ParentReference/
makes it harder to scan n' approve the file -- there are at least two different red/green patterns to look for.
function cluster_info() { | ||
CONTROL_NAMESPACE=knative-serving | ||
IPS=( $(kubectl get nodes -lkubernetes.io/hostname!=kind-control-plane -ojsonpath='{.items[*].status.addresses[?(@.type=="InternalIP")].address}') ) | ||
CLUSTER_SUFFIX=${CLUSTER_SUFFIX:-cluster.local} | ||
} |
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.
cluster_info
here feels very similar to export_cluster_info
in e2e-common.sh
. Combine?
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.
(Feel free to make this a TODO if it feels too fragile to do right now)
function kind_e2e_istio() { | ||
export GATEWAY_OVERRIDE="" | ||
export GATEWAY_NAMESPACE_OVERRIDE="" | ||
|
||
cluster_info | ||
|
||
go test -race -count=1 -short -timeout=20m -tags=e2e ./test/conformance \ | ||
--enable-alpha --enable-beta \ | ||
--skip-tests="${ISTIO_UNSUPPORTED_E2E_TESTS}" \ | ||
--ingressendpoint="${IPS[0]}" \ | ||
--ingressClass=gateway-api.ingress.networking.knative.dev \ | ||
--cluster-suffix="$CLUSTER_SUFFIX" | ||
|
||
# Give the controller time to sync with the rest of the system components. | ||
sleep 30 | ||
|
||
echo ">> Scale up controller for HA tests" | ||
kubectl -n "${CONTROL_NAMESPACE}" scale deployment net-gateway-api-controller --replicas=2 | ||
|
||
go test -count=1 -timeout=15m -failfast -parallel=1 -tags=e2e ./test/ha -spoofinterval="10ms" \ | ||
--enable-alpha --enable-beta \ | ||
--ingressendpoint="${IPS[0]}" \ | ||
--ingressClass=gateway-api.ingress.networking.knative.dev \ | ||
--cluster-suffix="${CLUSTER_SUFFIX}" | ||
|
||
echo ">> Scale down after HA tests" | ||
kubectl -n "${CONTROL_NAMESPACE}" scale deployment net-gateway-api-controller --replicas=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.
This feel similar-but-not-identical to both kind_e2e_contour
and e2e_istio
. Might be worth a TODO to deduplicate more in a future PR.
|
||
success |
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.
We used to call success
at the end of this script, and now we don't.
It looks like that function prints a success banner, but then also dumps some metrics from the kubernetes apiserver.
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: carlisia, evankanderson 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 |
I could compile your comments into a todo list and have a followup PR today. I'm concerned of holding up this PR even longer. Am open to adding anything that is a must include in this PR, just having a hard time distinguishing if anything is. At any rate, thank you so much for the throughout review. |
/lgtm Notes from slack: I think the comments on DEVELOPMENT.md, such as this one were the ones I was most concerned about fixing, since they might make it harder for someone else to join in. I’m also wondering about putting Can you also open an issue for [the addition of |
* Add support for TLS (conformance test passes) * Fix codegen update and run * Fix reconcile on no changes; add reconciliation tests * Update with Dave's feedback. * Fix lint warnings. * Add Finalizer to cleanup Gateway Listeners Added some (defaulted) fields to HTTPRoute to avoid controller looping. * Fix lint complaint. * Fix test breakage after merge post-#315 * Update referencepolicy->referencegrant in roles as well * Switch back to ReferencePolicy from ReferenceGrant, because Istio doesn't support ReferenceGrant yet, and there's no converter.
Closes #306.
Closes #292.
setup-and-deploy.sh
)Incoming in a separate PR(s):
v1beta1
forGateway
,GatewayClass
andHTTPRoute