apiVersion: apps/v1 kind: StatefulSet metadata: name: onec-server namespace: test-env labels: app: onec-server spec: serviceName: onec-server replicas: 1 selector: matchLabels: app: onec-server template: metadata: labels: app: onec-server spec: # Stable hostname for 1C community license (tied to hostname, not hardware) hostname: test-env-0 containers: - name: onec image: benadis/ar-edt:6.2.27.1 command: ["/scripts/entrypoint.sh"] env: - name: LANG value: "ru_RU.UTF-8" - name: LC_ALL value: "ru_RU.UTF-8" - name: TZ value: "Europe/Moscow" - name: PGHOST value: "postgres.test-env.svc.cluster.local" - name: PGPORT value: "5432" - name: PGUSER value: "usr1cv8" - name: PGPASSWORD valueFrom: secretKeyRef: name: test-env-secrets key: pg-password ports: - name: ragent containerPort: 1540 protocol: TCP - name: regport containerPort: 1541 protocol: TCP - name: crserver containerPort: 1542 protocol: TCP - name: ras containerPort: 1545 protocol: TCP volumeMounts: - name: onec-data mountPath: /data - name: onec-scripts mountPath: /scripts readOnly: true - name: onec-nethasp mountPath: /opt/1cv8/conf/nethasp.ini subPath: nethasp.ini readOnly: true resources: requests: cpu: 200m memory: 512Mi limits: cpu: "4" memory: 4Gi readinessProbe: exec: command: ["sh", "-c", "pgrep ragent && pgrep crserver"] initialDelaySeconds: 15 periodSeconds: 10 timeoutSeconds: 5 livenessProbe: exec: command: ["sh", "-c", "pgrep ragent"] initialDelaySeconds: 30 periodSeconds: 30 timeoutSeconds: 5 volumes: - name: onec-scripts configMap: name: onec-config items: - key: entrypoint.sh path: entrypoint.sh mode: 0755 - name: onec-nethasp configMap: name: onec-config items: - key: nethasp.ini path: nethasp.ini volumeClaimTemplates: - metadata: name: onec-data spec: storageClassName: local-path accessModes: ["ReadWriteOnce"] resources: requests: storage: 10Gi