mirror of
https://github.com/openappsec/openappsec.git
synced 2025-07-13 22:14:45 +03:00
85 lines
1.7 KiB
YAML
85 lines
1.7 KiB
YAML
{{- if .Values.deployment.test.enabled }}
|
|
---
|
|
apiVersion: v1
|
|
kind: Pod
|
|
metadata:
|
|
name: "{{ .Release.Name }}-httpbin"
|
|
labels:
|
|
app: httpbin
|
|
spec:
|
|
containers:
|
|
- name: httpbin
|
|
image: kennethreitz/httpbin
|
|
ports:
|
|
- containerPort: 80
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: "{{ .Release.Name }}-httpbin"
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
protocol: TCP
|
|
targetPort: 80
|
|
selector:
|
|
app: httpbin
|
|
type: ClusterIP
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
name: "{{ .Release.Name }}-httpbin"
|
|
annotations:
|
|
httpbin.ingress.kubernetes.io/rewrite-target: /
|
|
konghq.com/strip-path: "true"
|
|
spec:
|
|
ingressClassName: kong
|
|
rules:
|
|
- http:
|
|
paths:
|
|
- path: /httpbin
|
|
pathType: Prefix
|
|
backend:
|
|
service:
|
|
name: "{{ .Release.Name }}-httpbin"
|
|
port:
|
|
number: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: GatewayClass
|
|
metadata:
|
|
name: "{{ .Release.Name }}-kong-test"
|
|
spec:
|
|
controllerName: konghq.com/kic-gateway-controller
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: Gateway
|
|
metadata:
|
|
name: "{{ .Release.Name }}-kong-test"
|
|
annotations:
|
|
konghq.com/gateway-unmanaged: "true"
|
|
spec:
|
|
gatewayClassName: "{{ .Release.Name }}-kong-test"
|
|
listeners: # Use GatewayClass defaults for listener definition.
|
|
- name: http
|
|
protocol: HTTP
|
|
port: 80
|
|
---
|
|
apiVersion: gateway.networking.k8s.io/v1beta1
|
|
kind: HTTPRoute
|
|
metadata:
|
|
name: "{{ .Release.Name }}-httpbin"
|
|
spec:
|
|
parentRefs:
|
|
- name: "{{ .Release.Name }}-kong-test"
|
|
rules:
|
|
- matches:
|
|
- path:
|
|
type: PathPrefix
|
|
value: "/httproute"
|
|
backendRefs:
|
|
- name: "{{ .Release.Name }}-httpbin"
|
|
port: 80
|
|
{{- end }}
|