apiVersion: apps/v1
kind: Deployment
metadata:
  name: validator
  namespace: system
  labels:
    app: validator
spec:
  selector:
    matchLabels:
      app: validator
  replicas: 1
  template:
    metadata:
      labels:
        app: validator
    spec:
      serviceAccountName: validator
      containers:
      - command:
        - /myapp/k8s-manifest-sigstore
        image: k8s-manifest-sigstore
        imagePullPolicy: Always
        name: manager
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        - name: COSIGN_EXPERIMENTAL
          value: "1"
        - name: K8S_MANIFEST_SIGSTORE_LOG_LEVEL
          value: debug
        ports:
        - containerPort: 9443
          name: validator-port
          protocol: TCP
        livenessProbe:
          exec:
            command: ["ls"]
        readinessProbe:
          exec:
            command: ["ls"]
        resources:
          limits:
            cpu: 500m
            memory: 500Mi
          requests:
            cpu: 200m
            memory: 200Mi
        volumeMounts:
          - mountPath: /run/secrets/tls
            name: webhook-tls
      volumes:
        - name: webhook-tls
          secret:
            secretName: validator-tls
      terminationGracePeriodSeconds: 10

