apiVersion: apps/v1
kind: Deployment
metadata:
  name: controller-manager
  namespace: system
  labels:
    app.kubernetes.io/component: controller
    control-plane: moco-controller-manager
spec:
  selector:
    matchLabels:
      app.kubernetes.io/component: controller
      control-plane: moco-controller-manager
  replicas: 1
  template:
    metadata:
      labels:
        app.kubernetes.io/component: controller
        control-plane: moco-controller-manager
      annotations:
        prometheus.io/port: "8080"
    spec:
      containers:
      - name: manager
        command:
        - /moco-controller
        image: ghcr.io/cybozu-go/moco:latest
        resources:
          requests:
            memory: 256Mi
        env:
        - name: POD_NAMESPACE
          valueFrom:
            fieldRef:
              fieldPath: metadata.namespace
      terminationGracePeriodSeconds: 10
