-
Notifications
You must be signed in to change notification settings - Fork 1
fix: transfer resolveGranularity to ApisixUpstream to fix errors #18
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
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
9b7b73d
fix: transfer resolveGranularity to ApisixUpstream to fix errors
Revolyssup d595d81
add release/1.8.2 to trigger
Revolyssup 59f0f38
remove license checker
Revolyssup 433c94a
fix e2e
Revolyssup 27877b0
fix unit tests
Revolyssup d541e57
fix e2e tests
Revolyssup 62f712b
remove resolveGranularity from everywhere
Revolyssup 2ca5b75
add function to add upstream with granularity
Revolyssup b843676
fix indentation
Revolyssup 829796b
fix indentation
Revolyssup 639eb56
create route before upstream
Revolyssup efee0be
remove codeql and fix should be able to use backends and upstreams to…
Revolyssup 832a6d8
fix the e2e test
Revolyssup File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -22,6 +22,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
|
||
permissions: | ||
contents: read | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-dev | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
|
||
jobs: | ||
changes: | ||
|
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,6 +25,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
jobs: | ||
misspell: | ||
name: runner / misspell | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,6 +26,7 @@ on: | |
branches: | ||
- master | ||
- 1.8.0 | ||
- release/1.8.2 | ||
jobs: | ||
changes: | ||
runs-on: ubuntu-latest | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
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.
pls ref: https://kubernetes.io/docs/concepts/services-networking/service/#externalname.
This type of service is only for DNS mapping. Are you sure you can use clusterip.
For accessing external services, the lack of SNI prevents TLS handshake.
Uh oh!
There was an error while loading. Please reload this page.
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.
But the upstream controller is triggered and uses the service even if the service type is not external name. Am I missing something? @AlinsRan
Uh oh!
There was an error while loading. Please reload this page.
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 mean that services of externalName type are not compatible here.
Because
ExternalName
services do not have endpoints, the main purpose ofresolveGranularity
is to enable gateways to access external services.Similarly, it does not have clusterIP.
For external services, simply use the domain name.
Uh oh!
There was an error while loading. Please reload this page.
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.
Okay so the logic should be that when service is of type external name then even if
granularity
was passed in the ApisixUpstream, it should be ignored. Because ifgranularity
is not passed then by default, ApisixUpstream doesn't change the value ofnodes
that was created in upstream when ApisixRoute was created. So no change required on ApisixUpstream sync.And currently the TranslateService which creates upstream for k8s service doesn't take into account. So this issue already exists,right? I just need to add logic in translate service that when service type is ExternalName, just use externalName as node value instead of getting endpoints.
@AlinsRan Right?
Uh oh!
There was an error while loading. Please reload this page.
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.
@AlinsRan Since thats an existing issue and not something introduced by this PR. Should I create another PR for it. Because even in current scenario before my change this problem exists.
Uh oh!
There was an error while loading. Please reload this page.
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.
The current PR does not need to solve this problem, I just mentioned the possible issues that this feature may encounter.