apiVersion: apps/v1
kind: Deployment
metadata:
  name: oauth-service
  namespace: system
spec:
  selector:
    matchLabels:
      control-plane: controller-manager
      app.kubernetes.io/name: service-provider-integration-oauth
  replicas: 1
  template:
    metadata:
      labels:
        control-plane: controller-manager
        app.kubernetes.io/name: service-provider-integration-oauth
    spec:
      securityContext:
        runAsNonRoot: true
      containers:
        - command:
          - /spi-oauth
          image: quay.io/redhat-appstudio/service-provider-integration-oauth:latest
          name: oauth
          securityContext:
            allowPrivilegeEscalation: false
          livenessProbe:
            httpGet:
              path: /health
              port: 8000
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /ready
              port: 8000
            initialDelaySeconds: 5
            periodSeconds: 10
          resources:
            limits:
              cpu: 200m
              memory: 100Mi
            requests:
              cpu: 100m
              memory: 20Mi
          volumeMounts:
          - mountPath: /etc/spi/
            name: oauth-config
            readOnly: true
      serviceAccountName: oauth-sa
      terminationGracePeriodSeconds: 10
      volumes:
      - name: oauth-config
        secret:
          secretName: oauth-config
          items:
            - key: config.yaml
              path: config.yaml
