Add health ingress endpoint
This commit is contained in:
parent
d1a85199c6
commit
0d594247b4
26
k8s/health/base/health-deployment.yml
Normal file
26
k8s/health/base/health-deployment.yml
Normal 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: {}
|
32
k8s/health/base/health-ingress.yml
Normal file
32
k8s/health/base/health-ingress.yml
Normal 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
|
8
k8s/health/base/health-namespace.yml
Normal file
8
k8s/health/base/health-namespace.yml
Normal file
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: health
|
||||
spec:
|
||||
finalizers:
|
||||
- kubernetes
|
25
k8s/health/base/health-service.yml
Normal file
25
k8s/health/base/health-service.yml
Normal 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: ""
|
7
k8s/health/base/kustomization.yaml
Normal file
7
k8s/health/base/kustomization.yaml
Normal 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
|
30
k8s/health/overlays/matrix-prod/health-ingress.yml
Normal file
30
k8s/health/overlays/matrix-prod/health-ingress.yml
Normal 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
|
6
k8s/health/overlays/matrix-prod/kustomization.yaml
Normal file
6
k8s/health/overlays/matrix-prod/kustomization.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
patches:
|
||||
- path: health-ingress.yml
|
30
k8s/health/overlays/matrix-test/health-ingress.yml
Normal file
30
k8s/health/overlays/matrix-test/health-ingress.yml
Normal 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
|
6
k8s/health/overlays/matrix-test/kustomization.yaml
Normal file
6
k8s/health/overlays/matrix-test/kustomization.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
apiVersion: kustomize.config.k8s.io/v1beta1
|
||||
kind: Kustomization
|
||||
resources:
|
||||
- ../../base
|
||||
patches:
|
||||
- path: health-ingress.yml
|
Loading…
Reference in a new issue