apiVersion: apps/v1 kind: Deployment metadata: name: belki-web namespace: belki labels: app.kubernetes.io/name: belki-web app.kubernetes.io/part-of: belki-calculator spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: belki-web template: metadata: labels: app.kubernetes.io/name: belki-web app.kubernetes.io/part-of: belki-calculator spec: containers: - name: web image: reg.nyan404.ru/cwshed-clone/belki:latest imagePullPolicy: Always command: ["python", "-m", "app.main"] ports: - name: http containerPort: 8080 env: - name: BELKI_PORT value: "8080" - name: BELKI_DATABASE_URL valueFrom: secretKeyRef: name: belki-vk key: BELKI_DATABASE_URL readinessProbe: httpGet: path: /health port: http initialDelaySeconds: 2 periodSeconds: 10 livenessProbe: httpGet: path: /health port: http initialDelaySeconds: 5 periodSeconds: 20 securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 10001 --- apiVersion: v1 kind: Service metadata: name: belki-web namespace: belki labels: app.kubernetes.io/part-of: belki-calculator spec: type: ClusterIP selector: app.kubernetes.io/name: belki-web ports: - name: http port: 8080 targetPort: http --- apiVersion: apps/v1 kind: Deployment metadata: name: belki-bot namespace: belki labels: app.kubernetes.io/name: belki-bot app.kubernetes.io/part-of: belki-calculator spec: replicas: 1 selector: matchLabels: app.kubernetes.io/name: belki-bot template: metadata: labels: app.kubernetes.io/name: belki-bot app.kubernetes.io/part-of: belki-calculator spec: containers: - name: bot image: reg.nyan404.ru/cwshed-clone/belki:latest imagePullPolicy: Always command: ["python", "-m", "app.belki.vk_bot"] env: - name: VK_GROUP_TOKEN valueFrom: secretKeyRef: name: belki-vk key: VK_GROUP_TOKEN - name: VK_GROUP_ID valueFrom: secretKeyRef: name: belki-vk key: VK_GROUP_ID - name: VK_API_VERSION valueFrom: secretKeyRef: name: belki-vk key: VK_API_VERSION optional: true - name: BELKI_DATABASE_URL valueFrom: secretKeyRef: name: belki-vk key: BELKI_DATABASE_URL securityContext: allowPrivilegeEscalation: false readOnlyRootFilesystem: true runAsNonRoot: true runAsUser: 10001