Add health ingress endpoint

This commit is contained in:
Magnus Andersson 2024-06-04 13:12:40 +02:00
parent d1a85199c6
commit 0d594247b4
Signed by: mandersson
GPG key ID: 19CB2C58E1F19B16
9 changed files with 170 additions and 0 deletions

View file

@ -0,0 +1,26 @@
---
kind: Deployment
apiVersion: apps/v1
metadata:
name: health-node
namespace: health
creationTimestamp:
labels:
app: health-node
spec:
replicas: 3
selector:
matchLabels:
app: health-node
template:
metadata:
creationTimestamp:
labels:
app: health-node
spec:
containers:
- name: echoserver
image: k8s.gcr.io/echoserver:1.10
resources: {}
strategy: {}
status: {}

View file

@ -0,0 +1,32 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: health-ingress
namespace: health
annotations:
kubernetes.io/ingress.class: traefik
traefik.ingress.kubernetes.io/router.entrypoints: websecure
traefik.ingress.kubernetes.io/router.tls: "true"
spec:
defaultBackend:
service:
name: health-node
port:
number: 8443
tls:
- hosts:
- kube-matrixtest.matrix.test.sunet.se
secretName: tls-secret
rules:
- host: kube-matrixtest.matrix.test.sunet.se
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: health-node
port:
number: 8080

View file

@ -0,0 +1,8 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: health
spec:
finalizers:
- kubernetes

View file

@ -0,0 +1,25 @@
---
apiVersion: v1
items:
- apiVersion: v1
kind: Service
metadata:
labels:
app: health-node
name: health-node
namespace: health
spec:
ports:
- port: 8080
protocol: TCP
targetPort: 8080
selector:
app: health-node
sessionAffinity: None
type: ClusterIP
status:
loadBalancer: {}
kind: List
metadata:
resourceVersion: ""
selfLink: ""

View file

@ -0,0 +1,7 @@
resources:
- health-deployment.yml
- health-ingress.yml
- health-namespace.yml
- health-service.yml
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization

View file

@ -0,0 +1,30 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: health-ingress
namespace: health
annotations:
kubernetes.io/ingress.class: nginx
spec:
defaultBackend:
service:
name: health-node
port:
number: 8443
ingressClassName: nginx
# tls:
# - hosts:
# - kube-matrix.matrix.sunet.se
# secretName: tls-secret
rules:
- host: kube-matrix.matrix.sunet.se
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: health-node
port:
number: 8080

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- path: health-ingress.yml

View file

@ -0,0 +1,30 @@
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: health-ingress
namespace: health
annotations:
kubernetes.io/ingress.class: nginx
spec:
defaultBackend:
service:
name: health-node
port:
number: 8443
ingressClassName: nginx
# tls:
# - hosts:
# - kube-matrixtest.matrix.test.sunet.se
# secretName: tls-secret
rules:
- host: kube-matrixtest.matrix.test.sunet.se
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: health-node
port:
number: 8080

View file

@ -0,0 +1,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../base
patches:
- path: health-ingress.yml