apiVersion: apps/v1
kind: Deployment
metadata:
  name: deno-holiday-api
spec:
  replicas: 2
  selector:
    matchLabels:
      app: deno
  strategy:
    rollingUpdate:
      maxSurge: 25%
      maxUnavailable: 25%
    type: RollingUpdate
  template:
    metadata:
      labels:
        app: deno
    spec:
      containers:
        - env:
            - name: EXTERNAL_HOLIDAYS_API
              value: "https://date.nager.at/api/v2/publicholidays"
            - name: SERVER_PORT
              value: "9090"
          image: fsschmitt/deno-holiday-api:latest
          imagePullPolicy: IfNotPresent
          name: holiday-api
          ports:
            - containerPort: 8080
              name: exposed
              protocol: TCP
          resources: {}
          securityContext:
            runAsGroup: 1001
            runAsNonRoot: true
            runAsUser: 1001
