Update deployment

This commit is contained in:
2026-06-12 13:05:32 +08:00
parent d3072e7e18
commit b97bd85533
12 changed files with 48 additions and 128 deletions
+33 -56
View File
@@ -22,56 +22,8 @@ spec:
runAsNonRoot: true
runAsUser: 1001
env:
- name: DEBUG
value: "0"
volumeMounts:
- name: cache
mountPath: "/app/cache"
livenessProbe:
exec:
command:
- sh
- -c
- wget -qO - http://127.0.0.1:5000/health
- name: redis
image: redis:6.0.8-alpine
- name: compiler
image: registry.k8s.astropenguin.net/closure-api:IMAGE_TAG
securityContext:
runAsNonRoot: true
env:
- name: DEBUG
value: "0"
volumeMounts:
- name: cache
mountPath: "/app/cache"
- name: assets
image: nginx:alpine
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: cache
- mountPath: "/etc/nginx/templates"
name: nginx-conf-templates
volumes:
- name: cache
persistentVolumeClaim:
claimName: astrojs-cache
- name: nginx-conf-templates
configMap:
name: astrojs-nginx-ctmpls
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: astrojs-cache
spec:
accessModes: [ "ReadWriteOnce" ]
resources:
requests:
storage: 1Gi
storageClassName: local-storage
- name: CLOSURE_ENDPOINT
value: "http://closure-api.default.svc.cluster.local/compile"
---
@@ -83,9 +35,34 @@ spec:
selector:
app: astrojs
ports:
- port: 5000
targetPort: 5000
name: application
- port: 80
targetPort: 80
name: files
- port: 8080
targetPort: 8080
name: web
---
apiVersion: gateway.networking.k8s.io/v1
kind: HTTPRoute
metadata:
name: astrojs
spec:
parentRefs:
- name: gateway-prod
namespace: cilium-system
sectionName: k8s-astropenguin-net
hostnames:
- astrojs.k8s.astropenguin.net
rules:
- matches:
- path:
type: PathPrefix
value: /
filters:
- type: URLRewrite
urlRewrite:
path:
type: ReplaceFullPath
replaceFullPath: /
backendRefs:
- name: astrojs
port: 8080