Skip to content

Change file structure for ingresses#1355

Merged
knative-prow[bot] merged 7 commits intoknative:mainfrom
houshengbo:change-ingress-structure
Apr 17, 2023
Merged

Change file structure for ingresses#1355
knative-prow[bot] merged 7 commits intoknative:mainfrom
houshengbo:change-ingress-structure

Conversation

@houshengbo
Copy link
Copy Markdown

@houshengbo houshengbo commented Feb 27, 2023

Fixes #1345

Proposed Changes

  • This PR aimed to change the selection mode for the ingresses from a filter based mode to a directory based mode. We can pick up the ingress by the name of the ingress from the designated directory

Release Note


@knative-prow knative-prow bot added the size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. label Feb 27, 2023
@houshengbo houshengbo changed the title Change ingress structure WIP: Change ingress structure Feb 27, 2023
@knative-prow
Copy link
Copy Markdown

knative-prow bot commented Feb 27, 2023

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: houshengbo

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details 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 knative-prow bot requested review from aliok and maximilien February 27, 2023 20:00
@knative-prow knative-prow bot added do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Feb 27, 2023
Copy link
Copy Markdown

@knative-prow knative-prow bot left a comment

Choose a reason for hiding this comment

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

@houshengbo: 0 warnings.

Details

In response to this:

Fixes #1345

Proposed Changes

  • WIP

Release Note


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.

@houshengbo houshengbo force-pushed the change-ingress-structure branch 3 times, most recently from fc4b47a to b923cb7 Compare February 27, 2023 22:19
@knative-prow-robot knative-prow-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Feb 28, 2023
@houshengbo houshengbo force-pushed the change-ingress-structure branch from b923cb7 to a9bb897 Compare April 11, 2023 04:14
@linux-foundation-easycla
Copy link
Copy Markdown

linux-foundation-easycla bot commented Apr 11, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

@knative-prow-robot knative-prow-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Apr 11, 2023
@houshengbo houshengbo force-pushed the change-ingress-structure branch 2 times, most recently from a9625ca to 5600cde Compare April 11, 2023 05:04
@houshengbo houshengbo force-pushed the change-ingress-structure branch from 5600cde to b8b3331 Compare April 11, 2023 14:18
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 11, 2023

Codecov Report

Patch coverage: 81.81% and project coverage change: -0.50 ⚠️

Comparison is base (1ba80e6) 79.84% compared to head (01acb99) 79.34%.

❗ Current head 01acb99 differs from pull request most recent head bd4de72. Consider uploading reports for the commit bd4de72 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1355      +/-   ##
==========================================
- Coverage   79.84%   79.34%   -0.50%     
==========================================
  Files          38       39       +1     
  Lines        1761     1748      -13     
==========================================
- Hits         1406     1387      -19     
- Misses        257      263       +6     
  Partials       98       98              
Impacted Files Coverage Δ
pkg/reconciler/knativeserving/common/conversion.go 0.00% <0.00%> (ø)
pkg/reconciler/knativeserving/ingress/contour.go 100.00% <ø> (ø)
pkg/reconciler/knativeserving/ingress/istio.go 71.11% <ø> (ø)
pkg/reconciler/knativeserving/ingress/ingress.go 92.85% <94.11%> (-1.12%) ⬇️
pkg/reconciler/knativeserving/ingress/kourier.go 75.34% <100.00%> (ø)
pkg/reconciler/knativeserving/security/security.go 77.08% <100.00%> (-2.55%) ⬇️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@houshengbo houshengbo force-pushed the change-ingress-structure branch 8 times, most recently from de87cd7 to 171037e Compare April 11, 2023 19:26
@houshengbo houshengbo force-pushed the change-ingress-structure branch from 171037e to 3c11c53 Compare April 11, 2023 19:32
@houshengbo houshengbo changed the title WIP: Change ingress structure Change file structure for ingresses Apr 11, 2023
@knative-prow knative-prow bot removed the do-not-merge/work-in-progress Indicates that a PR should not merge because it is a work in progress. label Apr 11, 2023
}
}

func hasProviderLabel(u *unstructured.Unstructured) bool {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We can drop hasProviderLabel in Kourier as well so please feel free to drop it. Or I will drop them in the separate PR.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

OK. I can do it.

Comment on lines +88 to +89
if len(urls) == 0 {
url := filepath.Join(ingressPath, "istio")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

We have the default behavior around L#67 so it should be fine, I think. But currently (without this PR) nonFilter was returned and no ingress was created. So, it should be same behavior instead of installing Istio?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Right. Let me change it. I can add some more test cases to see if the edge cases are covered.

func hasProviderLabel(u *unstructured.Unstructured) bool {
if _, hasLabel := u.GetLabels()[providerLabel]; hasLabel {
return true
func convertToKS(instance base.KComponent) *v1beta1.KnativeServing {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Exact same function exists in ./pkg/reconciler/knativeserving/security/security.go can we change it a common func and use it?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

good point.

@houshengbo
Copy link
Copy Markdown
Author

/test eventing-upgrade-tests

@nak3
Copy link
Copy Markdown
Contributor

nak3 commented Apr 13, 2023

/cc @skonto @ReToCode

LGTM

@knative-prow knative-prow bot requested review from ReToCode and skonto April 13, 2023 01:00
Copy link
Copy Markdown
Contributor

@ReToCode ReToCode left a comment

Choose a reason for hiding this comment

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

Other than that, LGTM.

- s3:
bucket: "gs-noauth://knative-releases"
prefix: "net-istio/previous"
eventingService: istio
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is there a reason why this is called eventingService? I was first confused with Eventing as we are in the knative-serving part of the yaml.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

IngressService or just ingress?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

@ReToCode @skonto I changed the name of the field.

@nak3
Copy link
Copy Markdown
Contributor

nak3 commented Apr 17, 2023

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Apr 17, 2023
@knative-prow knative-prow bot merged commit 2668082 into knative:main Apr 17, 2023
ReToCode added a commit to ReToCode/serverless-operator that referenced this pull request Aug 4, 2023
ReToCode added a commit to ReToCode/serverless-operator that referenced this pull request Aug 4, 2023
ReToCode added a commit to ReToCode/serverless-operator that referenced this pull request Aug 7, 2023
ReToCode added a commit to ReToCode/serverless-operator that referenced this pull request Aug 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. 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.

Change the directory stucture for ingresses

5 participants