fetch-dht/deploy/manifest.envsubst.yml

74 lines
1.5 KiB
YAML
Raw Permalink Normal View History

---
apiVersion: apps/v1
kind: Deployment
metadata:
namespace: '${NAMESPACE}'
name: '${APP_NAME}'
labels:
app: '${APP_NAME}'
spec:
replicas: 1
selector:
matchLabels:
app: '${APP_NAME}'
template:
metadata:
annotations:
revision: '${REVISION}'
labels:
app: '${APP_NAME}'
spec:
containers:
- name: '${APP_NAME}'
image: '${IMAGE}'
imagePullPolicy: Always
env:
- name: PORT
value: '3000'
- name: DHT_PORT
value: '20000'
ports:
- name: http
containerPort: 3000
imagePullSecrets:
- name: '${IMAGE_PULL_SECRET}'
---
apiVersion: v1
kind: Service
metadata:
namespace: '${NAMESPACE}'
name: ${APP_NAME}
spec:
type: ClusterIP
selector:
app: ${APP_NAME}
ports:
- name: http
protocol: TCP
port: 80
targetPort: http
---
apiVersion: networking.k8s.io/v1beta1
kind: Ingress
metadata:
namespace: '${NAMESPACE}'
name: '${APP_NAME}'
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: 'true'
nginx.ingress.kubernetes.io/enable-access-log: 'false'
cert-manager.io/cluster-issuer: letsencrypt
spec:
tls:
- hosts:
- '${HOST}'
secretName: '${APP_NAME}-tls'
rules:
- host: '${HOST}'
http:
paths:
- path: /
backend:
serviceName: '${APP_NAME}'
servicePort: http