Skip to content

Commit

Permalink
feat: switch from route to ingress (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
ArthurVardevanyan authored Feb 3, 2024
1 parent b3d6214 commit 4a13574
Show file tree
Hide file tree
Showing 25 changed files with 352 additions and 285 deletions.
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -323,6 +323,7 @@
"mkpasswd",
"moreutils",
"mountsatoken",
"mtls",
"multiband",
"mutatingwebhookconfigurations",
"myminio",
Expand Down
30 changes: 16 additions & 14 deletions kubernetes/gitea/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: gitea
namespace: gitea
labels:
app: gitea
app.kubernetes.io/instance: gitea
annotations:
route.openshift.io/termination: passthrough
spec:
host: "git.arthurvardevanyan.com"
to:
kind: Service
name: gitea-http
weight: 100
port:
targetPort: http
tls:
termination: passthrough
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: git.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: gitea-http
port:
name: http
32 changes: 17 additions & 15 deletions kubernetes/grafana/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: grafana
namespace: grafana
labels:
app: grafana
app.kubernetes.io/instance: grafana
app.kubernetes.io/instance: gitea
annotations:
route.openshift.io/termination: edge
spec:
host: grafana.apps.okd.<path:secret/data/homelab/domain#url>
to:
kind: Service
name: grafana
weight: 100
port:
targetPort: 3000
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: grafana.apps.okd.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: grafana
port:
name: http
30 changes: 16 additions & 14 deletions kubernetes/heimdall/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: heimdall
namespace: heimdall
labels:
app: heimdall
app.kubernetes.io/instance: heimdall
annotations:
route.openshift.io/termination: edge
spec:
host: heimdall.apps.okd.<path:secret/data/homelab/domain#url>
to:
kind: Service
name: heimdall
weight: 100
port:
targetPort: 80
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: heimdall.apps.okd.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: heimdall
port:
name: http-80
1 change: 1 addition & 0 deletions kubernetes/homeassistant/base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ spec:
- protocol: TCP
port: 8123
targetPort: 8123
name: https
type: ClusterIP
clusterIP: None
30 changes: 16 additions & 14 deletions kubernetes/homeassistant/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: homeassistant
namespace: homeassistant
labels:
app: homeassistant
app.kubernetes.io/instance: homeassistant
annotations:
route.openshift.io/termination: passthrough
spec:
host: "home.<path:secret/data/homelab/domain#url>"
to:
kind: Service
name: homeassistant
weight: 100
port:
targetPort: 8123
tls:
termination: passthrough
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: home.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: homeassistant
port:
name: https
2 changes: 1 addition & 1 deletion kubernetes/influxdb/base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
- name: "2003"
port: 2003
targetPort: 2003
- name: "8086"
- name: http
port: 8086
targetPort: 8086
selector:
Expand Down
30 changes: 16 additions & 14 deletions kubernetes/influxdb/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: influxdb
namespace: influxdb
labels:
app: influxdb
app.kubernetes.io/instance: influxdb
annotations:
route.openshift.io/termination: edge
spec:
host: influxdb.apps.okd.<path:secret/data/homelab/domain#url>
to:
kind: Service
name: influxdb
weight: 100
port:
targetPort: 8086
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: influxdb.apps.okd.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: influxdb
port:
name: http
30 changes: 16 additions & 14 deletions kubernetes/loki/base/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: loki
namespace: loki
labels:
app: loki
app.kubernetes.io/instance: loki
annotations:
route.openshift.io/termination: edge
spec:
host: loki.apps.okd.<path:secret/data/homelab/domain#url>
to:
kind: Service
name: loki
weight: 100
port:
targetPort: http-metrics
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: loki.apps.okd.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: loki
port:
name: http-metrics
26 changes: 16 additions & 10 deletions kubernetes/longhorn/components/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: longhorn-ui
namespace: longhorn-system
Expand All @@ -8,12 +8,18 @@ metadata:
app.kubernetes.io/instance: longhorn
app.kubernetes.io/version: v1.5.3
app: longhorn-ui
annotations:
route.openshift.io/termination: reencrypt
spec:
host: ""
to:
kind: Service
name: longhorn-ui
tls:
termination: reencrypt
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: ""
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: longhorn-ui
port:
name: longhorn-ui
8 changes: 4 additions & 4 deletions kubernetes/longhorn/overlays/okd-sandbox/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ components:
- ../../components/okd
patches:
- target:
kind: Route
name: ui
kind: Ingress
name: longhorn-ui
patch: |-
- op: replace
path: /spec/host
value: longhorn.apps.okd.sandbox.<path:secret/data/homelab/domain#url>
path: /spec/rules/0/host
value: longhorn.apps.okd.sandbox.arthurvardevanyan.com
6 changes: 3 additions & 3 deletions kubernetes/longhorn/overlays/okd/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@ components:
- ../../components/okd
patches:
- target:
kind: Route
kind: Ingress
name: longhorn-ui
patch: |-
- op: replace
path: /spec/host
value: longhorn.apps.okd.<path:secret/data/homelab/domain#url>
path: /spec/rules/0/host
value: longhorn.apps.okd.arthurvardevanyan.com
31 changes: 18 additions & 13 deletions kubernetes/minio-operator/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,17 +1,22 @@
apiVersion: route.openshift.io/v1
kind: Route
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
labels:
app.kubernetes.io/instance: minio-operator
name: minio-operator
namespace: minio-operator
labels:
app.kubernetes.io/instance: minio-operator
annotations:
route.openshift.io/termination: edge
spec:
host: minio-operator.apps.okd.<path:secret/data/homelab/domain#url>
port:
targetPort: http
to:
kind: Service
name: console
tls:
termination: edge
insecureEdgeTerminationPolicy: Redirect
ingressClassName: openshift-default
rules:
- host: minio-operator.apps.okd.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: console
port:
name: http
1 change: 1 addition & 0 deletions kubernetes/nextcloud/base/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ spec:
- protocol: TCP
port: 443
targetPort: 8443
name: https
type: ClusterIP
clusterIP: None
30 changes: 16 additions & 14 deletions kubernetes/nextcloud/overlays/okd/route.yaml
Original file line number Diff line number Diff line change
@@ -1,20 +1,22 @@
kind: Route
apiVersion: route.openshift.io/v1
kind: Ingress
apiVersion: networking.k8s.io/v1
metadata:
name: nextcloud
namespace: nextcloud
labels:
app: nextcloud
app.kubernetes.io/instance: nextcloud
annotations:
route.openshift.io/termination: passthrough
spec:
host: nextcloud.<path:secret/data/homelab/domain#url>
to:
kind: Service
name: nextcloud
weight: 100
port:
targetPort: 8443
tls:
termination: passthrough
insecureEdgeTerminationPolicy: Redirect
wildcardPolicy: None
ingressClassName: openshift-default
rules:
- host: nextcloud.arthurvardevanyan.com
http:
paths:
- path: ""
pathType: ImplementationSpecific
backend:
service:
name: nextcloud
port:
name: https
Loading

0 comments on commit 4a13574

Please sign in to comment.