---
# Source: gitwebhookproxy/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
  labels:
    app: gitwebhookproxy
    group: com.stakater.platform
    provider: stakater
    version: v0.2.79
    chart: "gitwebhookproxy-v0.2.79"
    release: "gitwebhookproxy"
    heritage: "Tiller"
  annotations:
    configmap.reloader.stakater.com/reload: gitwebhookproxy
    secret.reloader.stakater.com/reload: gitwebhookproxy
  name: gitwebhookproxy
spec:
  replicas: 1
  revisionHistoryLimit: 2
  selector:
    matchLabels:
      app: gitwebhookproxy
      group: com.stakater.platform
      provider: stakater
  template:
    metadata:
      labels:
        app: gitwebhookproxy
        group: com.stakater.platform
        provider: stakater
    spec:
      securityContext: 
        runAsNonRoot: true
        runAsUser: 1001
        
      containers:
      - env:
        - name: KUBERNETES_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: GWP_PROVIDER
          valueFrom:
            configMapKeyRef:
              key: provider
              name: gitwebhookproxy
        - name: GWP_UPSTREAMURL
          valueFrom:
            configMapKeyRef:
              key: upstreamURL
              name: gitwebhookproxy
        - name: GWP_ALLOWEDPATHS
          valueFrom:
            configMapKeyRef:
              key: allowedPaths
              name: gitwebhookproxy
        - name: GWP_IGNOREDUSERS
          valueFrom:
            configMapKeyRef:
              key: ignoredUsers
              name: gitwebhookproxy
        - name: GWP_ALLOWEDUSERS
          valueFrom:
            configMapKeyRef:
              key: allowedUsers
              name: gitwebhookproxy
        - name: GWP_SECRET
          valueFrom:
            secretKeyRef:
              key: secret
              name: gitwebhookproxy
        image: "stakater/gitwebhookproxy:v0.2.79"
        imagePullPolicy: IfNotPresent
        securityContext: 
          allowPrivilegeEscalation: false
          readOnlyRootFilesystem: true
          
        name: gitwebhookproxy
        livenessProbe:
          failureThreshold: 5
          httpGet:
            path: /health
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 15
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 5
        readinessProbe:
          failureThreshold: 3
          httpGet:
            path: /health
            port: 8080
            scheme: HTTP
          initialDelaySeconds: 10
          periodSeconds: 10
          successThreshold: 1
          timeoutSeconds: 5

