apiVersion: apps/v1 kind: Deployment metadata: name: librebooking namespace: {{ .namespace }} spec: replicas: 1 strategy: type: Recreate selector: matchLabels: component: web template: metadata: labels: component: web spec: securityContext: runAsNonRoot: true runAsUser: 33 runAsGroup: 33 fsGroup: 33 seccompProfile: type: RuntimeDefault containers: - name: librebooking image: librebooking/librebooking:5.1.0 ports: - name: http containerPort: 8080 protocol: TCP env: - name: LB_DATABASE_HOSTSPEC value: "{{ .db.host }}" - name: LB_DATABASE_NAME value: {{ .db.name }} - name: LB_DATABASE_USER value: {{ .db.user }} - name: LB_DATABASE_PASSWORD valueFrom: secretKeyRef: name: librebooking-secrets key: dbPassword - name: LB_INSTALL_PASSWORD valueFrom: secretKeyRef: name: librebooking-secrets key: installPassword - name: LB_DEFAULT_TIMEZONE value: {{ .timezone }} resources: limits: cpu: 500m ephemeral-storage: 1Gi memory: 512Mi requests: cpu: 50m ephemeral-storage: 50Mi memory: 128Mi volumeMounts: - name: librebooking-uploads mountPath: /var/www/html/Web/uploads/images livenessProbe: httpGet: path: /Web/ port: 8080 initialDelaySeconds: 60 timeoutSeconds: 10 periodSeconds: 30 failureThreshold: 6 readinessProbe: httpGet: path: /Web/ port: 8080 initialDelaySeconds: 30 timeoutSeconds: 5 periodSeconds: 10 failureThreshold: 3 securityContext: allowPrivilegeEscalation: false capabilities: drop: - ALL readOnlyRootFilesystem: false volumes: - name: librebooking-uploads persistentVolumeClaim: claimName: librebooking-uploads restartPolicy: Always