Code / Konfiguration

k8s/deployment.yaml

Pfad: k8s/deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: commerceflow-spring
  namespace: seb4u
spec:
  replicas: 2
  selector:
    matchLabels:
      app: commerceflow-spring
  template:
    metadata:
      labels:
        app: commerceflow-spring
    spec:
      containers:
        - name: app
          image: commerceflow-spring:local
          imagePullPolicy: IfNotPresent
          ports:
            - containerPort: 8080
          envFrom:
            - configMapRef:
                name: commerceflow-config
          readinessProbe:
            httpGet:
              path: /actuator/health/readiness
              port: 8080
            initialDelaySeconds: 10
            periodSeconds: 10
          livenessProbe:
            httpGet:
              path: /actuator/health/liveness
              port: 8080
            initialDelaySeconds: 30
            periodSeconds: 20
          resources:
            requests:
              cpu: "250m"
              memory: "256Mi"
            limits:
              cpu: "1000m"
              memory: "768Mi"