---
apiVersion: apps/v1
kind: Deployment
metadata:
  name: swagger
  labels:
    app: swagger
spec:
  selector:
    matchLabels:
      app: swagger
  template:
    metadata:
      name: swagger
      labels:
        app: swagger
    spec:
      securityContext:
        fsGroup: 65532
        runAsNonRoot: true
        seccompProfile:
          type: RuntimeDefault
      containers:
        - name: swagger
          image: quay.io/tekton-hub/swagger
          securityContext:
            allowPrivilegeEscalation: false
            runAsUser: 65532
            capabilities:
              drop:
                - ALL
          env:
            - name: API_URL
              valueFrom:
                configMapKeyRef:
                  name: swagger
                  key: API_URL
          ports:
            - containerPort: 8080
              protocol: TCP
          readinessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 8080
              scheme: HTTP
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 1
          livenessProbe:
            failureThreshold: 3
            httpGet:
              path: /
              port: 8080
              scheme: HTTP
            periodSeconds: 5
            successThreshold: 1
            timeoutSeconds: 1
