apiVersion: apps/v1
kind: Deployment
metadata:
  name: casskop
  labels:
    app: casskop
spec:
  replicas: 1
  selector:
    matchLabels:
      name: casskop
  template:
    metadata:
      labels:
        name: casskop
        app: casskop
    spec:
      serviceAccountName: casskop
      securityContext:
        runAsUser: 1000
      containers:
        - name: casskop
          # Replace this with the built image name
          image: REPLACE_IMAGE
          ports:
          - containerPort: 60000
            name: metrics
          livenessProbe:
            httpGet:
              path: /healthz
              port: 8081
            initialDelaySeconds: 15
            periodSeconds: 20
          readinessProbe:
            httpGet:
              path: /readyz
              port: 8081
            initialDelaySeconds: 5
            periodSeconds: 10
          command:
          - casskop
          imagePullPolicy: Always
          env:
            - name: WATCH_NAMESPACE
              valueFrom:
                fieldRef:
                  fieldPath: metadata.namespace
            - name: POD_NAME
              valueFrom:
                fieldRef:
                  fieldPath: metadata.name
            - name: OPERATOR_NAME
              value: "casskop"
