-
Notifications
You must be signed in to change notification settings - Fork 1
feat: implement reconciler for apisixroute #164
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
d3efd58
feat: implement ApisixRoute controller
dspo 5a4e666
Merge remote-tracking branch 'origin/release-v2-dev' into feat/apisix…
dspo 71f16d8
refactor ApisixRoute reconciliation logic and enhance status updates
dspo eed6b4d
Merge remote-tracking branch 'origin/release-v2-dev' into feat/apisix…
dspo bb679d0
implement translator
dspo b1ca121
add e2e case for ApisixRoute
dspo 650f362
more e2e test cases
dspo 81d998f
typo
dspo c66c358
accept suggestions
dspo 91d18b6
more tests
dspo f5b474a
resolve comments
dspo bd0cdc2
resolve comments
dspo b1bf04d
more timeout
dspo 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 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
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 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 |
---|---|---|
@@ -0,0 +1,79 @@ | ||
// Licensed under the Apache License, Version 2.0 (the "License"); | ||
// you may not use this file except in compliance with the License. | ||
// You may obtain a copy of the License at | ||
// | ||
// http://www.apache.org/licenses/LICENSE-2.0 | ||
// | ||
// Unless required by applicable law or agreed to in writing, software | ||
// distributed under the License is distributed on an "AS IS" BASIS, | ||
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
// See the License for the specific language governing permissions and | ||
// limitations under the License. | ||
|
||
package v2 | ||
|
||
import ( | ||
"time" | ||
|
||
gatewayv1 "sigs.k8s.io/gateway-api/apis/v1" | ||
) | ||
|
||
type ( | ||
// ApisixRouteConditionType is a type of condition for a route. | ||
ApisixRouteConditionType = gatewayv1.RouteConditionType | ||
// ApisixRouteConditionReason is a reason for a route condition. | ||
ApisixRouteConditionReason = gatewayv1.RouteConditionReason | ||
) | ||
|
||
const ( | ||
ConditionTypeAccepted ApisixRouteConditionType = gatewayv1.RouteConditionAccepted | ||
ConditionReasonAccepted ApisixRouteConditionReason = gatewayv1.RouteReasonAccepted | ||
ConditionReasonInvalidSpec ApisixRouteConditionReason = "InvalidSpec" | ||
ConditionReasonSyncFailed ApisixRouteConditionReason = "SyncFailed" | ||
) | ||
|
||
const ( | ||
// DefaultUpstreamTimeout represents the default connect, | ||
// read and send timeout (in seconds) with upstreams. | ||
DefaultUpstreamTimeout = 60 * time.Second | ||
|
||
DefaultWeight = 100 | ||
) | ||
|
||
const ( | ||
// OpEqual means the equal ("==") operator in nginxVars. | ||
OpEqual = "Equal" | ||
// OpNotEqual means the not equal ("~=") operator in nginxVars. | ||
OpNotEqual = "NotEqual" | ||
// OpGreaterThan means the greater than (">") operator in nginxVars. | ||
OpGreaterThan = "GreaterThan" | ||
// OpGreaterThanEqual means the greater than (">=") operator in nginxVars. | ||
OpGreaterThanEqual = "GreaterThanEqual" | ||
// OpLessThan means the less than ("<") operator in nginxVars. | ||
OpLessThan = "LessThan" | ||
// OpLessThanEqual means the less than equal ("<=") operator in nginxVars. | ||
OpLessThanEqual = "LessThanEqual" | ||
// OpRegexMatch means the regex match ("~~") operator in nginxVars. | ||
OpRegexMatch = "RegexMatch" | ||
// OpRegexNotMatch means the regex not match ("!~~") operator in nginxVars. | ||
OpRegexNotMatch = "RegexNotMatch" | ||
// OpRegexMatchCaseInsensitive means the regex match "~*" (case insensitive mode) operator in nginxVars. | ||
OpRegexMatchCaseInsensitive = "RegexMatchCaseInsensitive" | ||
// OpRegexNotMatchCaseInsensitive means the regex not match "!~*" (case insensitive mode) operator in nginxVars. | ||
OpRegexNotMatchCaseInsensitive = "RegexNotMatchCaseInsensitive" | ||
// OpIn means the in operator ("in") in nginxVars. | ||
OpIn = "In" | ||
// OpNotIn means the not in operator ("not_in") in nginxVars. | ||
OpNotIn = "NotIn" | ||
|
||
// ScopeQuery means the route match expression subject is in the querystring. | ||
ScopeQuery = "Query" | ||
// ScopeHeader means the route match expression subject is in request headers. | ||
ScopeHeader = "Header" | ||
// ScopePath means the route match expression subject is the uri path. | ||
ScopePath = "Path" | ||
// ScopeCookie means the route match expression subject is in cookie. | ||
ScopeCookie = "Cookie" | ||
// ScopeVariable means the route match expression subject is in variable. | ||
ScopeVariable = "Variable" | ||
) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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.