switch to gateway
This commit is contained in:
45
clusters/ontime-dev/configs/gateway.yaml
Normal file
45
clusters/ontime-dev/configs/gateway.yaml
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: Gateway
|
||||||
|
metadata:
|
||||||
|
annotations:
|
||||||
|
cert-manager.io/cluster-issuer: lets-encrypt-prod
|
||||||
|
name: ontime
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
gatewayClassName: cilium
|
||||||
|
listeners:
|
||||||
|
- hostname: ontime.jwetzell.com
|
||||||
|
name: http
|
||||||
|
port: 80
|
||||||
|
protocol: HTTP
|
||||||
|
allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: All
|
||||||
|
- hostname: ontime.jwetzell.com
|
||||||
|
name: https
|
||||||
|
port: 443
|
||||||
|
protocol: HTTPS
|
||||||
|
allowedRoutes:
|
||||||
|
namespaces:
|
||||||
|
from: All
|
||||||
|
tls:
|
||||||
|
mode: Terminate
|
||||||
|
certificateRefs:
|
||||||
|
- name: ontime.jwetzell.com-tls
|
||||||
|
---
|
||||||
|
apiVersion: gateway.networking.k8s.io/v1
|
||||||
|
kind: HTTPRoute
|
||||||
|
metadata:
|
||||||
|
name: http-filter-redirect
|
||||||
|
namespace: kube-system
|
||||||
|
spec:
|
||||||
|
parentRefs:
|
||||||
|
- name: ontime
|
||||||
|
sectionName: http
|
||||||
|
namespace: kube-system
|
||||||
|
rules:
|
||||||
|
- filters:
|
||||||
|
- type: RequestRedirect
|
||||||
|
requestRedirect:
|
||||||
|
scheme: https
|
||||||
|
statusCode: 301
|
||||||
@@ -2,4 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
|
|||||||
kind: Kustomization
|
kind: Kustomization
|
||||||
resources:
|
resources:
|
||||||
- cluster-issuer.yaml
|
- cluster-issuer.yaml
|
||||||
|
- gateway.yaml
|
||||||
- storageclass.yaml
|
- storageclass.yaml
|
||||||
@@ -1,38 +0,0 @@
|
|||||||
---
|
|
||||||
apiVersion: v1
|
|
||||||
kind: Namespace
|
|
||||||
metadata:
|
|
||||||
name: ingress-nginx
|
|
||||||
---
|
|
||||||
apiVersion: source.toolkit.fluxcd.io/v1
|
|
||||||
kind: HelmRepository
|
|
||||||
metadata:
|
|
||||||
name: ingress-nginx
|
|
||||||
namespace: ingress-nginx
|
|
||||||
spec:
|
|
||||||
interval: 24h
|
|
||||||
url: https://kubernetes.github.io/ingress-nginx
|
|
||||||
---
|
|
||||||
apiVersion: helm.toolkit.fluxcd.io/v2
|
|
||||||
kind: HelmRelease
|
|
||||||
metadata:
|
|
||||||
name: ingress-nginx
|
|
||||||
namespace: ingress-nginx
|
|
||||||
spec:
|
|
||||||
interval: 30m
|
|
||||||
chart:
|
|
||||||
spec:
|
|
||||||
chart: ingress-nginx
|
|
||||||
version: "4.13.3"
|
|
||||||
sourceRef:
|
|
||||||
kind: HelmRepository
|
|
||||||
name: ingress-nginx
|
|
||||||
namespace: ingress-nginx
|
|
||||||
interval: 12h
|
|
||||||
values:
|
|
||||||
controller:
|
|
||||||
service:
|
|
||||||
type: "LoadBalancer"
|
|
||||||
externalTrafficPolicy: Local
|
|
||||||
admissionWebhooks:
|
|
||||||
enabled: false
|
|
||||||
Reference in New Issue
Block a user