init
This commit is contained in:
94
deployment.yaml
Normal file
94
deployment.yaml
Normal file
@@ -0,0 +1,94 @@
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: hello-gin
|
||||
spec:
|
||||
replicas: 3
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hello-gin
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: hello-gin
|
||||
spec:
|
||||
enableServiceLinks: false
|
||||
imagePullSecrets:
|
||||
- name: imgcred
|
||||
containers:
|
||||
- name: hello-gin
|
||||
image: git.codemowers.io/xjumbyx/hello-gin
|
||||
env:
|
||||
- name: USERNAME
|
||||
value: world
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: spec.nodeName
|
||||
ports:
|
||||
- containerPort: 8000
|
||||
name: http
|
||||
- containerPort: 8080
|
||||
name: metrics
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: hello-gin
|
||||
labels:
|
||||
app: hello-gin
|
||||
spec:
|
||||
selector:
|
||||
app: hello-gin
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 8000
|
||||
name: http
|
||||
|
||||
---
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: laas-grafana
|
||||
spec:
|
||||
secretName: laas-hello-tls
|
||||
dnsNames:
|
||||
- hello-laas.ee-lte-1.codemowers.io
|
||||
issuerRef:
|
||||
name: letsencrypt
|
||||
kind: ClusterIssuer
|
||||
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: hello-gin
|
||||
annotations:
|
||||
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||
traefik.ingress.kubernetes.io/router.tls.certresolver: letsencrypt
|
||||
spec:
|
||||
rules:
|
||||
- host: hello-laas.ee-lte-1.codemowers.io
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: /
|
||||
backend:
|
||||
service:
|
||||
name: hello-gin
|
||||
port:
|
||||
name: http
|
||||
tls:
|
||||
- secretName: laas-hello-tls
|
||||
---
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: hello-gin
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: hello-gin
|
||||
podMetricsEndpoints:
|
||||
- port: metrics
|
||||
Reference in New Issue
Block a user