-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: allow assigning KongPluginInstallation to GatewayConfiguration …
…and DataPlane (#476) Co-authored-by: Patryk Małek <patryk.malek@konghq.com> Co-authored-by: Grzegorz Burzyński <czeslavo@gmail.com>
- Loading branch information
1 parent
ee21458
commit d99325c
Showing
23 changed files
with
1,104 additions
and
125 deletions.
There are no files selected for viewing
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
170 changes: 170 additions & 0 deletions
170
config/samples/gateway-kongplugininstallation-httproute.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,170 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: additional | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: echo | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
name: http | ||
port: 80 | ||
targetPort: http | ||
selector: | ||
app: echo | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
app: echo | ||
name: echo | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: echo | ||
template: | ||
metadata: | ||
labels: | ||
app: echo | ||
spec: | ||
containers: | ||
- name: echo | ||
image: registry.k8s.io/e2e-test-images/agnhost:2.40 | ||
command: | ||
- /agnhost | ||
- netexec | ||
- --http-port=8080 | ||
ports: | ||
- containerPort: 8080 | ||
name: http | ||
env: | ||
- name: NODE_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: spec.nodeName | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: POD_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.podIP | ||
resources: | ||
requests: | ||
cpu: 10m | ||
--- | ||
kind: GatewayConfiguration | ||
apiVersion: gateway-operator.konghq.com/v1beta1 | ||
metadata: | ||
name: kong | ||
namespace: default | ||
spec: | ||
dataPlaneOptions: | ||
deployment: | ||
replicas: 2 | ||
podTemplateSpec: | ||
spec: | ||
containers: | ||
- name: proxy | ||
# renovate: datasource=docker versioning=docker | ||
image: kong/kong-gateway:3.7 | ||
readinessProbe: | ||
initialDelaySeconds: 1 | ||
periodSeconds: 1 | ||
pluginsToInstall: | ||
- name: additional-custom-plugin | ||
namespace: additional | ||
- name: additional-custom-plugin-2 | ||
controlPlaneOptions: | ||
deployment: | ||
podTemplateSpec: | ||
spec: | ||
containers: | ||
- name: controller | ||
# renovate: datasource=docker versioning=docker | ||
image: kong/kubernetes-ingress-controller:3.2.3 | ||
readinessProbe: | ||
initialDelaySeconds: 1 | ||
periodSeconds: 1 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: GatewayClass | ||
metadata: | ||
name: kong | ||
spec: | ||
controllerName: konghq.com/gateway-operator | ||
parametersRef: | ||
group: gateway-operator.konghq.com | ||
kind: GatewayConfiguration | ||
name: kong | ||
namespace: default | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: Gateway | ||
metadata: | ||
name: kong | ||
namespace: default | ||
spec: | ||
gatewayClassName: kong | ||
listeners: | ||
- name: http | ||
protocol: HTTP | ||
port: 80 | ||
--- | ||
apiVersion: gateway.networking.k8s.io/v1 | ||
kind: HTTPRoute | ||
metadata: | ||
name: httproute-echo | ||
namespace: default | ||
annotations: | ||
konghq.com/strip-path: "true" | ||
konghq.com/plugins: kong-custom-plugin,kong-custom-plugin-2 | ||
spec: | ||
parentRefs: | ||
- name: kong | ||
rules: | ||
- matches: | ||
- path: | ||
type: PathPrefix | ||
value: /echo | ||
backendRefs: | ||
- name: echo | ||
kind: Service | ||
port: 80 | ||
--- | ||
apiVersion: configuration.konghq.com/v1 | ||
kind: KongPlugin | ||
metadata: | ||
name: kong-custom-plugin | ||
plugin: additional-custom-plugin | ||
--- | ||
kind: KongPluginInstallation | ||
apiVersion: gateway-operator.konghq.com/v1alpha1 | ||
metadata: | ||
name: additional-custom-plugin | ||
namespace: additional | ||
spec: | ||
image: northamerica-northeast1-docker.pkg.dev/k8s-team-playground/plugin-example/myheader | ||
--- | ||
apiVersion: configuration.konghq.com/v1 | ||
kind: KongPlugin | ||
metadata: | ||
name: kong-custom-plugin-2 | ||
plugin: additional-custom-plugin-2 | ||
--- | ||
kind: KongPluginInstallation | ||
apiVersion: gateway-operator.konghq.com/v1alpha1 | ||
metadata: | ||
name: additional-custom-plugin-2 | ||
spec: | ||
image: northamerica-northeast1-docker.pkg.dev/k8s-team-playground/plugin-example/myheader-2 |
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
Oops, something went wrong.