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 4 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.

80 changes: 61 additions & 19 deletions release/obd-kardinal.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -163,24 +163,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: "prod.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 @@ -331,4 +314,63 @@ spec:
port: 8070
targetPort: 8070
protocol: TCP
appProtocol: HTTP
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:
lostbean marked this conversation as resolved.
Show resolved Hide resolved
- host: web.other.localhost
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: frontend
port:
number: 80
Loading