You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.5 KiB

  1. # This YAML file shows how to deploy the snapshot controller
  2. # The snapshot controller implements the control loop for CSI snapshot functionality.
  3. # It should be installed as part of the base Kubernetes distribution in an appropriate
  4. # namespace for components implementing base system functionality. For installing with
  5. # Vanilla Kubernetes, kube-system makes sense for the namespace.
  6. ---
  7. kind: Deployment
  8. apiVersion: apps/v1
  9. metadata:
  10. name: snapshot-controller
  11. namespace: {{ snapshot_controller_namespace }}
  12. spec:
  13. replicas: {{ snapshot_controller_replicas }}
  14. selector:
  15. matchLabels:
  16. app.kubernetes.io/name: snapshot-controller
  17. # The snapshot controller won't be marked as ready if the v1 CRDs are unavailable.
  18. # The flag --retry-crd-interval-max is used to determine how long the controller
  19. # will wait for the CRDs to become available before exiting. The default is 30 seconds
  20. # so minReadySeconds should be set slightly higher than the flag value.
  21. minReadySeconds: 35
  22. strategy:
  23. rollingUpdate:
  24. maxSurge: 0
  25. maxUnavailable: 1
  26. type: RollingUpdate
  27. template:
  28. metadata:
  29. labels:
  30. app.kubernetes.io/name: snapshot-controller
  31. spec:
  32. serviceAccountName: snapshot-controller
  33. containers:
  34. - name: snapshot-controller
  35. image: {{ snapshot_controller_image_repo }}:{{ snapshot_controller_image_tag }}
  36. imagePullPolicy: {{ k8s_image_pull_policy }}
  37. args:
  38. - "--v=5"
  39. - "--leader-election={{ 'true' if snapshot_controller_replicas > 1 else 'false' }}"