Page:
Deployment
1
Deployment
Mya edited this page 2022-07-02 16:05:51 +00:00
Table of Contents
pages
is written with the 12factor principals. It attempts to use a reasonable set of defaults and should be easy to configure across Docker, Kubernetes, and Nomad.
Docker
TBD
Kubernetes
Create a secret
kubectl create secret generic pages-secret \
--from-literal "PAGES_GIT_BRANCH=gh-pages" \
--from-literal "PAGES_GIT_URL=https://github.com/mjpitz/mjpitz.git"
Chart.yaml
apiVersion: v2
type: application
name: pages
version: 0.0.0
appVersion: 0.0.0
dependencies:
- name: 12factor
repository: https://mjpitz.com
version: 22.5.0
values.yaml
12factor:
nameOverride: pages
image:
repository: img.pitz.tech/mya/pages
tag: latest
deployment:
replicaCount: 2
application:
envFrom:
- secretRef:
name: pages-secret
ports:
- name: http
containerPort: 8080
protocol: TCP
- name: debug
containerPort: 8081
protocol: TCP
networking:
service:
ports:
- name: http
targetPort: http
protocol: TCP
port: 8080
- name: debug
targetPort: debug
protocol: TCP
port: 8081
ingress:
enabled: true
annotations:
# certificate
kubernetes.io/tls-acme: "true"
cert-manager.io/cluster-issuer: "letsencrypt-prod"
# controller
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/enable-cors: "true"
nginx.ingress.kubernetes.io/ssl-redirect: "true"
nginx.ingress.kubernetes.io/proxy-read-timeout: "3600"
nginx.ingress.kubernetes.io/proxy-send-timeout: "3600"
nginx.ingress.kubernetes.io/connection-proxy-header: "keep-alive,Upgrade"
nginx.ingress.kubernetes.io/configuration-snippet: |
proxy_set_header Upgrade "websocket";
hosts:
- host: example.com
paths:
- path: /
pathType: Prefix
tls:
- secretName: example-tls
hosts:
- example.com
Nomad
TBD