apiVersion: apps/v1
kind: Deployment
metadata:
  name: db
  namespace: default
  labels:
    app: db
    environment: prod
  annotations:
    opslevel.com/description: "Our Database - Handle With Care!"
    opslevel.com/owner: "infrastructure"
    opslevel.com/lifecycle: "generally_available"
    opslevel.com/tier: "tier_1"
    opslevel.com/product: "Example"
    opslevel.com/language: "c++"
    opslevel.com/framework: "postgres"
    opslevel.com/tools.other.url: "https://example.com"
spec:
  replicas: 1
  selector:
    matchLabels:
      app: worker
      environment: prod
  strategy:
    type: RollingUpdate
    rollingUpdate:
      maxSurge: 1
      maxUnavailable: 0
  template:
    metadata:
      labels:
        app: worker
        environment: prod
        version: "1.0"
    spec:
      containers:
        - name: worker
          image: cilium/echoserver
          imagePullPolicy: Always
          resources:
            requests:
              memory: 1Mi
              cpu: "0.1"
            limits:
              memory: 50Mi
              cpu: "0.5"
          env:
            - name: PORT
              value: "8899"
          ports:
            - containerPort: 8899
          readinessProbe:
            httpGet:
              path: /ping
              port: 8899
            initialDelaySeconds: 10
            timeoutSeconds: 5
          livenessProbe:
            httpGet:
              path: /ping
              port: 8899
            initialDelaySeconds: 20
            periodSeconds: 60
