Update kubeconfig
This commit is contained in:
parent
1b4ffeae2b
commit
aecc379d0a
5
deploy/0-namespace.yaml
Normal file
5
deploy/0-namespace.yaml
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
apiVersion: v1
|
||||||
|
kind: Namespace
|
||||||
|
metadata:
|
||||||
|
name: mathy
|
12
deploy/1-certificate.yaml
Normal file
12
deploy/1-certificate.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: cert-manager.io/v1
|
||||||
|
kind: Certificate
|
||||||
|
metadata:
|
||||||
|
name: mathy-tls
|
||||||
|
namespace: mathy
|
||||||
|
spec:
|
||||||
|
secretName: mathy-tls
|
||||||
|
dnsNames:
|
||||||
|
- 'crystalmath.tech'
|
||||||
|
issuerRef:
|
||||||
|
name: letsencrypt-ca
|
||||||
|
kind: ClusterIssuer
|
@ -3,6 +3,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: mathy
|
name: mathy
|
||||||
|
namespace: mathy
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@ -23,6 +24,7 @@ apiVersion: apps/v1
|
|||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: mathy-api
|
name: mathy-api
|
||||||
|
namespace: mathy
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
@ -46,7 +48,7 @@ spec:
|
|||||||
key: host
|
key: host
|
||||||
optional: false
|
optional: false
|
||||||
- name: DATABASE_USERNAME
|
- name: DATABASE_USERNAME
|
||||||
value: postgres
|
value: mathy
|
||||||
- name: DATABASE_PASSWORD
|
- name: DATABASE_PASSWORD
|
||||||
valueFrom:
|
valueFrom:
|
||||||
secretKeyRef:
|
secretKeyRef:
|
||||||
@ -68,6 +70,7 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: mathy-api-service
|
name: mathy-api-service
|
||||||
|
namespace: mathy
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@ -81,6 +84,7 @@ apiVersion: v1
|
|||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: mathy-service
|
name: mathy-service
|
||||||
|
namespace: mathy
|
||||||
spec:
|
spec:
|
||||||
ports:
|
ports:
|
||||||
- name: http
|
- name: http
|
||||||
@ -94,6 +98,7 @@ apiVersion: networking.k8s.io/v1
|
|||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
metadata:
|
||||||
name: mathy-ingress
|
name: mathy-ingress
|
||||||
|
namespace: mathy
|
||||||
annotations:
|
annotations:
|
||||||
kubernetes.io/ingress.class: "nginx"
|
kubernetes.io/ingress.class: "nginx"
|
||||||
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
nginx.ingress.kubernetes.io/ssl-redirect: "true"
|
@ -9,10 +9,10 @@
|
|||||||
"lint": "eslint . --ext .ts",
|
"lint": "eslint . --ext .ts",
|
||||||
"lint:fix": "eslint --fix . --ext .ts",
|
"lint:fix": "eslint --fix . --ext .ts",
|
||||||
"preview": "vite preview",
|
"preview": "vite preview",
|
||||||
"cd:build": "pnpm run build && docker image build . -t ${DOCKER_REGISTRY}:glmdev/mathy",
|
"cd:build": "pnpm run build && docker image build . -t ${DOCKER_REGISTRY}/glmdev/mathy",
|
||||||
"cd:push": "docker push ${DOCKER_REGISTRY}:glmdev/mathy",
|
"cd:push": "docker push ${DOCKER_REGISTRY}/glmdev/mathy",
|
||||||
"cd:deploy": "kubectl apply -f deploy/deploy.yaml",
|
"cd:deploy": "kubectl apply -f deploy/1-certificate.yaml -f deploy/2-deploy.yaml",
|
||||||
"cd:rollout": "kubectl rollout restart deployment/mathy",
|
"cd:rollout": "kubectl rollout -n mathy restart deployment/mathy",
|
||||||
"cd": "pnpm run cd:build && pnpm run cd:push && pnpm run cd:rollout"
|
"cd": "pnpm run cd:build && pnpm run cd:push && pnpm run cd:rollout"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
Loading…
Reference in New Issue
Block a user