apiVersion: apps/v1
kind: Deployment
metadata:
  name: exposecontroller
  namespace: kube-system
  labels:
    app.kubernetes.io/name: exposecontroller
spec:
  replicas: 1
  selector:
    matchLabels:
      app.kubernetes.io/name: exposecontroller
  template:
    metadata:
      labels:
        app.kubernetes.io/name: exposecontroller
    spec:
      containers:
      - name: exposecontroller
        image: "olliai/exposecontroller:latest"
        command:
        - /exposecontroller
        - --daemon
        - --watch-current-namespace=false
        env:
        - name: KUBERNETES_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
        ports:
        - name: health
          containerPort: 10254
        readinessProbe:
          httpGet:
            path: /healthz
            port: health
        livenessProbe:
          httpGet:
            path: /healthz
            port: health
        resources:
          limits:
            cpu: 100m
            memory: 128Mi
          requests:
            cpu: 100m
            memory: 128Mi
      serviceAccountName: exposecontroller
