-
Notifications
You must be signed in to change notification settings - Fork 612
Add GatewayParameters CRD for dynamic proxy configuration #9233
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 88 commits
Commits
Show all changes
100 commits
Select commit
Hold shift + click to select a range
b1796de
add generate
jenshu 9076ed1
only specified paths
jenshu a6307e0
fix go pkg and import
jenshu d781a10
codegen
jenshu bbb4b41
clean up logs
jenshu 96042d8
add short name
jenshu 9b5a334
add rbac
jenshu 3645d1d
plumbing
jenshu 2d57126
add scheme
jenshu 207c393
generated cleanup
jenshu 4eb78d4
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu fa28732
remove clients/controller
jenshu 5827cba
different logs
jenshu 8499b25
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu 8437433
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu 01f6935
fix compile
jenshu f84a54f
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 11d1508
add kube protos
jenshu 253c683
proto updates
jenshu 9d9c8a5
remove controlplane val
jenshu 157b80f
use autoscaling v2
jenshu 2635495
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu 40ec940
Merge branch 'gateway-config-crd' of github.com:solo-io/gloo into gat…
jenshu 81deaa2
gen
jenshu 076b388
don't import resources
jenshu f8d43d8
move log level to container, make container less generic
jenshu 693d72a
add import
jenshu a55d1c0
gen
jenshu 8073acd
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu 00a542e
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu 703a995
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 4a9ce2d
Merge branch 'gateway-config-crd' of github.com:solo-io/gloo into gat…
jenshu 47af4a6
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu b3cbe55
rename gatewayconfig to dataplaneconfig
jenshu b7fc404
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 43146a1
remove serviceaccount
jenshu 101a351
Merge branch 'gateway-config-crd' of github.com:solo-io/gloo into gat…
jenshu a574cfe
service: use enum, add more fields
jenshu ac987b1
api refactoring
jenshu 0b16531
remove scheme from NewDeployer args
jenshu 6c7d551
add more comments
jenshu 8abcb78
enum pullpolicy, add digest
jenshu 23ad4a4
use most values
jenshu a4922f8
use structs
jenshu 75fff17
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] ba48834
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 78dcdad
remove mod-tidy and descriptions
jenshu 9908b41
Merge branch 'gateway-config-crd' of github.com:solo-io/gloo into gat…
jenshu 76a58f6
comment
jenshu e3b2491
move pod/container up a level
jenshu e9db45e
cl
jenshu abaf58a
comment out status field
jenshu 7add066
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] beb2c6d
envoybootstrap
jenshu d782251
switch order
jenshu 4a453b6
fix istiosds val
jenshu af38d03
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 008661b
Adding changelog file to new location
c635722
Deleting changelog file from old location
83b2d7d
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] ba1f925
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 2a8a9d1
Adding changelog file to new location
fa32281
Deleting changelog file from old location
e224206
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 03965ef
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 0895400
Merge branch 'main' of github.com:solo-io/gloo into gateway-config-crd
jenshu 2a52eae
cleanup from merge
jenshu 7bd7edc
rename to gatewayparameters
jenshu 79acb80
use annotation
jenshu bff2979
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] ccffcef
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] c768106
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 622f744
image plumbing
jenshu edb2dec
Merge branch 'gateway-config-crd' of github.com:solo-io/gloo into gat…
jenshu c1ca1c5
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 4fd37f2
fix tests for Extensions
jbohanon c3394db
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 4ed0510
Adding changelog file to new location
2b9a207
Deleting changelog file from old location
9f7270b
gateway config crd tests (#9312)
jbohanon caa26a5
remove gatewayclass mention
jenshu 84bd287
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] a359beb
app name gloo-gateway
jenshu 9b8c468
crd comment clarification
jenshu 9b04a8b
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 1267082
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 5742d72
add readmes
jenshu 6ce5f43
Merge branch 'gateway-config-crd' of github.com:solo-io/gloo into gat…
jenshu 37881be
add nil inputs error and test
jbohanon 1656834
watch for gatewayparams changes
jenshu 2c9a86e
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] c8f06f5
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 4374c43
Adding changelog file to new location
31ce9de
Deleting changelog file from old location
ccd1280
readme and comment updates
jenshu a02bff6
deployer comments
jenshu ea82332
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] 75fdb14
Merge refs/heads/main into gateway-config-crd
soloio-bulldozer[bot] d37aaee
componentLogLevels map
jenshu 2ee32cc
remove proxyConfig
jenshu 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| changelog: | ||
| - type: NEW_FEATURE | ||
| issueLink: https://github.com/solo-io/solo-projects/issues/5909 | ||
| resolvesIssue: false | ||
| description: >- | ||
| Add new GatewayParameters CRD to allow configuration of dynamically provisioned proxies | ||
| in Gloo Gateway. |
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
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| ## APIs for Gloo Gateway - Kubernetes Gateway API Integration | ||
jenshu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| This directory contains protobuf files used by the Gloo Gateway integration with the Kubernetes Gateway API. | ||
|
|
||
| ### Codegen | ||
| The protos in this directory are compiled by the k8s gateway integration codegen in [generate.go](../generate.go) which can be invoked via `make install-go-tools generated-code -B`. | ||
|
|
||
| The output of codegen includes: | ||
| - Go types generated in [projects/gateway2/pkg/api/](../pkg/api/) which can be used in Go code | ||
| - CRDs generated in [install/helm/gloo/crds](../../../install/helm/gloo/crds) | ||
|
|
||
| ### Adding a new CRD | ||
|
|
||
| Note that the codegen for k8s gateway integration uses the skv2 library instead of solo-kit (which Gloo Edge classic uses), and thus there are some differences in how CRDs are defined. The k8s gateway integration only runs on Kubernetes and follows the convention of having a `spec` and `status` defined for each CRD. | ||
|
|
||
| To add a new CRD: | ||
| 1. Create its .proto definition in this directory | ||
| 2. Add the `model.Resource` to the codegen command in [generate.go](../generate.go). Include a kind, spec type name, status type name, and (optionally) short names for the CRD. | ||
| 3. Run codegen as described [above](#codegen) | ||
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,42 @@ | ||
| ## Kubernetes Protos in Gloo Gateway | ||
jenshu marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| Some of our Gloo Gateway protos depend on messages from the Kubernetes Core and Apimachinery APIs. This is because our user-facing APIs (e.g GatewayParameters) allow users to configure some parts of Kubernetes resources (e.g. pod/container security context, affinity, tolerations) directly. | ||
|
|
||
| Instead of mirroring/redefining these messages in our own protos, we import copies of the protos from the Kubernetes repo(s). Note, the files in those repos are named `generated.proto` since the protos were generated from Go structs. | ||
|
|
||
| ### Usage | ||
|
|
||
| #### Go | ||
| The protos in this directory are compiled by the k8s gateway integration codegen in [generate.go](../../../generate.go), which produces Go types under [projects/gateway2/pkg/api/external/kubernetes/](../../../pkg/api/external/kubernetes/) which can be used in Go code. | ||
|
|
||
| #### Protobuf | ||
| To use these proto messages in other protos, add the appropriate import to your proto definition, e.g. | ||
| ``` | ||
| import "github.com/solo-io/gloo/projects/gateway2/api/external/kubernetes/api/core/v1/generated.proto"; | ||
| ``` | ||
| and reference the messages with their package name, e.g. `k8s.io.api.core.v1.<message>` | ||
|
|
||
| ### Updating the protos | ||
|
|
||
| Generally we should try to keep the protos in sync with the `k8s.io/api` version we depend on in `go.mod`. Near the top of each `generated.proto` is a comment like this which shows the source of the file, where `<version>` should correspond to the `k8s.io/api` version we are using. | ||
| ``` | ||
| // This is a copy of https://github.com/kubernetes/api/blob/<version>/core/v1/generated.proto | ||
| // with the imports and go_package changed to gloo paths. | ||
| // Ideally we should update this proto every time we upgrade our k8s.io/api dependency. | ||
| ``` | ||
|
|
||
| Whenever we upgrade our `k8s.io/api` version (to let's say, `<new-version>`) in gloo, we should: | ||
| 1. Update each `generated.proto` in this directory with the `<new-version>` copy of the file, copied from the Kubernetes api or apimachinery repo. | ||
| 2. Update the comment `This is a copy of...` in each file to have the new source file path. | ||
| 3. Re-run codegen via `make install-go-tools generated-code -B` | ||
|
|
||
| ### Adding new protos | ||
|
|
||
| If new Kubernetes protos need to be added: | ||
|
|
||
| 1. Find the source file (usually look for `generated.proto` in https://github.com/kubernetes/api or https://github.com/kubernetes/apimachinery), on the branch/tag corresponding to the `k8s.io/api` version we are using. | ||
| 2. Copy it here, keeping similar directory structure (e.g. if copying a file from `https://github.com/kubernetes/api/blob/<version>/batch/v1/generated.proto`, it should be copied to directory `projects/gateway2/api/external/kubernetes/api/batch/v1/generated.proto` in gloo) | ||
| 3. Add a comment near the top of the file, similar to the one shown above in [Updating the protos](#updating-the-protos), which indicates the source of the copied file. | ||
| 4. Change the import paths to use gloo repo paths (note, if the file is importing other dependencies that we don't have in this repo yet, those proto files need to be copied over as well). | ||
| 5. Update the `go_package` to have the appropriate gloo path, e.g. `option go_package = "github.com/solo-io/gloo/projects/gateway2/pkg/api/external/kubernetes/api/core/v1";` | ||
| 6. Re-run codegen via `make install-go-tools generated-code -B` | ||
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.