apiVersion: v1 kind: PersistentVolumeClaim metadata: name: havenllo-data namespace: default annotations: nfs.io/storage-path: havenllo-data spec: accessModes: - ReadWriteOnce storageClassName: nfs-client resources: requests: storage: 1Gi --- apiVersion: apps/v1 kind: Deployment metadata: name: havenllo namespace: default labels: app.kubernetes.io/name: havenllo spec: replicas: 1 strategy: type: Recreate selector: matchLabels: app.kubernetes.io/name: havenllo template: metadata: labels: app.kubernetes.io/name: havenllo spec: containers: - name: havenllo image: git.ivanch.me/ivanch/havenllo:latest imagePullPolicy: Always ports: - name: http containerPort: 8080 protocol: TCP env: - name: HAVENLLO_DATABASE_PATH value: /data/havenllo.db - name: HAVENLLO_LISTEN_ADDR value: :8080 volumeMounts: - name: data mountPath: /data resources: requests: cpu: 50m memory: 64Mi limits: cpu: 500m memory: 256Mi readinessProbe: httpGet: path: /api/health port: http initialDelaySeconds: 2 periodSeconds: 5 timeoutSeconds: 2 failureThreshold: 3 livenessProbe: httpGet: path: /api/health port: http initialDelaySeconds: 10 periodSeconds: 10 timeoutSeconds: 2 failureThreshold: 3 securityContext: runAsUser: 0 allowPrivilegeEscalation: false readOnlyRootFilesystem: true capabilities: drop: - ALL volumes: - name: data persistentVolumeClaim: claimName: havenllo-data --- apiVersion: v1 kind: Service metadata: name: havenllo namespace: default labels: app.kubernetes.io/name: havenllo spec: type: ClusterIP selector: app.kubernetes.io/name: havenllo ports: - name: http port: 8080 targetPort: 8080 protocol: TCP --- apiVersion: networking.k8s.io/v1 kind: Ingress metadata: name: havenllo namespace: default spec: ingressClassName: nginx rules: - host: havenllo.haven http: paths: - path: / pathType: Prefix backend: service: name: havenllo port: number: 8080