apiVersion: apps/v1
kind: Deployment
metadata:
  name: gtoken-webhook-deployment
  labels:
    app: gtoken-webhook
spec:
  replicas: 1
  selector:
    matchLabels:
      app: gtoken-webhook
  template:
    metadata:
      labels:
        app: gtoken-webhook
    spec:
      containers:
        - name: gtoken-webhook
          image: gcr.io/cyco-main/gtoken-webhook
          imagePullPolicy: Always
          resources:
            requests:
              cpu: 250m
              memory: 512Mi
          args:
            - --log-level=debug
            - server
            - --tls-cert-file=/etc/webhook/certs/cert.pem
            - --tls-private-key-file=/etc/webhook/certs/key.pem
            - --image=gcr.io/cyco-main/gtoken
          volumeMounts:
            - name: webhook-certs
              mountPath: /etc/webhook/certs
              readOnly: true
      serviceAccountName: gtoken-webhook-sa
      volumes:
        - name: webhook-certs
          secret:
            secretName: gtoken-webhook-certs
