forked from k8sgateway/k8sgateway
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[gateway2] Updates Gateway Controller Watch Predicate
Previously, the controller would only watch Gateway objects for `generation` field changes which is not updated when annotations change. Since Gateway reconciliation should be triggered when the `gateway.gloo.solo.io/gateway-parameters-name` annotation is added, removed, or modified, the predicate was updated to check for changes in either the generation field or the annotations. Fixes #10099 Signed-off-by: Daneyon Hansen <daneyon.hansen@solo.io>
- Loading branch information
Showing
10 changed files
with
155 additions
and
28 deletions.
There are no files selected for viewing
10 changes: 10 additions & 0 deletions
10
changelog/v1.18.0-beta23/gateway2-gateway-controller-watch-annotations.yaml
This file contains 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,10 @@ | ||
changelog: | ||
- type: NON_USER_FACING | ||
issueLink: https://github.com/solo-io/gloo/issues/10099 | ||
resolvesIssue: false | ||
description: >- | ||
Previously, the controller would only watch Gateway objects for generation field | ||
changes which is not updated when annotations change. Since Gateway reconciliation | ||
should be triggered when the gateway.gloo.solo.io/gateway-parameters-name annotation | ||
is added, removed, or modified, the predicate was updated to check for changes in | ||
either the generation field or the annotations. |
This file contains 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 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 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
15 changes: 15 additions & 0 deletions
15
test/kubernetes/e2e/features/deployer/testdata/gateway-with-custom-params.yaml
This file contains 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,15 @@ | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: gw | ||
annotations: | ||
gateway.gloo.solo.io/gateway-parameters-name: "gw-params-custom" | ||
spec: | ||
gatewayClassName: gloo-gateway | ||
listeners: | ||
- protocol: HTTP | ||
port: 8080 | ||
name: http | ||
allowedRoutes: | ||
namespaces: | ||
from: All |
15 changes: 15 additions & 0 deletions
15
test/kubernetes/e2e/features/deployer/testdata/gateway-with-default-params.yaml
This file contains 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,15 @@ | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: gw | ||
annotations: | ||
gateway.gloo.solo.io/gateway-parameters-name: "gw-params" | ||
spec: | ||
gatewayClassName: gloo-gateway | ||
listeners: | ||
- protocol: HTTP | ||
port: 8080 | ||
name: http | ||
allowedRoutes: | ||
namespaces: | ||
from: All |
23 changes: 23 additions & 0 deletions
23
test/kubernetes/e2e/features/deployer/testdata/gatewayparams-custom.yaml
This file contains 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,23 @@ | ||
apiVersion: gateway.gloo.solo.io/v1alpha1 | ||
kind: GatewayParameters | ||
metadata: | ||
name: gw-params-custom | ||
spec: | ||
kube: | ||
deployment: | ||
replicas: 2 | ||
podTemplate: | ||
extraLabels: | ||
pod-label-key: pod-label-val | ||
extraAnnotations: | ||
pod-anno-key: pod-anno-val | ||
envoyContainer: | ||
bootstrap: | ||
logLevel: debug | ||
componentLogLevels: | ||
upstream: debug | ||
connection: trace | ||
securityContext: | ||
runAsUser: null | ||
runAsNonRoot: false | ||
allowPrivilegeEscalation: true |
This file contains 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
File renamed without changes.
This file contains 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