Skip to content
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

feat! new gateway management #23

Merged
merged 5 commits into from
Sep 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

79 changes: 61 additions & 18 deletions release/obd-kardinal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -171,24 +171,7 @@ spec:
protocol: TCP
appProtocol: HTTP
targetPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: frontend-external
annotations:
kardinal.dev.service/ingress: "true"
kardinal.dev.service/host: "baseline.app.localhost"
spec:
type: LoadBalancer
selector:
app: frontend
ports:
- name: http
port: 80
targetPort: 8080
protocol: TCP
appProtocol: HTTP

---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -341,6 +324,65 @@ spec:
protocol: TCP
appProtocol: HTTP

---
apiVersion: gateway.networking.k8s.io/v1
kind: Gateway
metadata:
name: gateway
annotations:
kardinal.dev.service/gateway: "true"
spec:
gatewayClassName: istio
listeners:
- name: default
hostname: "*.app.localhost"
port: 8888
protocol: HTTP
allowedRoutes:
namespaces:
from: All

---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: http
annotations:
kardinal.dev.service/route: "true"
spec:
parentRefs:
- name: gateway
hostnames: ["prod.app.localhost"]
rules:
- matches:
- path:
type: PathPrefix
value: /
backendRefs:
- name: frontend
port: 80

---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
annotations:
kubernetes.io/ingress.class: nginx
kardinal.dev.service/ingress: "true"
name: ingress
spec:
rules:
- host: web.other.localhost
lostbean marked this conversation as resolved.
Show resolved Hide resolved
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontend
port:
number: 80

---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -395,6 +437,7 @@ spec:
# value:
#- name: SNS_TOPIC_ARN
# value:

---
apiVersion: v1
kind: Service
Expand Down
Loading