Skip to content
Snippets Groups Projects
blog.yaml 1.75 KiB
Newer Older
---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: blog
spec:
  replicas: 2
  selector:
      serviceAccountName: blog
      automountServiceAccountToken: false
      containers:
          image: quay.io/shivering-isles/blog:2024.01.22.1663
          ports:
            - containerPort: 8080
              protocol: TCP
              name: http
          resources:
            requests:
              cpu: 100m
              memory: 256Mi
            limits:
              cpu: 100m
              memory: 256Mi
          livenessProbe:
            httpGet:
              path: /status.txt
              port: http
            failureThreshold: 3
            periodSeconds: 5
          readinessProbe:
            httpGet:
              path: /status.txt
              port: http
            initialDelaySeconds: 5
            failureThreshold: 1
            successThreshold: 3
            periodSeconds: 5
            allowPrivilegeEscalation: false
            capabilities:
              drop:
                - ALL
      securityContext:
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      topologySpreadConstraints:
        - maxSkew: 1
          topologyKey: kubernetes.io/hostname
          whenUnsatisfiable: DoNotSchedule
          labelSelector:
          matchLabelKeys:
            - pod-template-hash
---
apiVersion: v1
kind: Service
metadata:
  name: blog
spec:
  type: ClusterIP
  selector: {}
  ports:
    - name: http
      protocol: TCP
      port: 80
      targetPort: http
---
apiVersion: policy/v1
kind: PodDisruptionBudget
metadata:
  name: blog
spec:
  minAvailable: 1
  selector: