manager.yaml 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. apiVersion: v1
  2. kind: Namespace
  3. metadata:
  4. labels:
  5. control-plane: controller-manager
  6. app.kubernetes.io/name: namespace
  7. app.kubernetes.io/instance: system
  8. app.kubernetes.io/component: manager
  9. app.kubernetes.io/created-by: nodb
  10. app.kubernetes.io/part-of: nodb
  11. app.kubernetes.io/managed-by: kustomize
  12. name: system
  13. ---
  14. apiVersion: apps/v1
  15. kind: Deployment
  16. metadata:
  17. name: controller-manager
  18. namespace: system
  19. labels:
  20. control-plane: controller-manager
  21. app.kubernetes.io/name: deployment
  22. app.kubernetes.io/instance: controller-manager
  23. app.kubernetes.io/component: manager
  24. app.kubernetes.io/created-by: nodb
  25. app.kubernetes.io/part-of: nodb
  26. app.kubernetes.io/managed-by: kustomize
  27. spec:
  28. selector:
  29. matchLabels:
  30. control-plane: controller-manager
  31. replicas: 1
  32. template:
  33. metadata:
  34. annotations:
  35. kubectl.kubernetes.io/default-container: manager
  36. labels:
  37. control-plane: controller-manager
  38. spec:
  39. # TODO(user): Uncomment the following code to configure the nodeAffinity expression
  40. # according to the platforms which are supported by your solution.
  41. # It is considered best practice to support multiple architectures. You can
  42. # build your manager image using the makefile target docker-buildx.
  43. # affinity:
  44. # nodeAffinity:
  45. # requiredDuringSchedulingIgnoredDuringExecution:
  46. # nodeSelectorTerms:
  47. # - matchExpressions:
  48. # - key: kubernetes.io/arch
  49. # operator: In
  50. # values:
  51. # - amd64
  52. # - arm64
  53. # - ppc64le
  54. # - s390x
  55. # - key: kubernetes.io/os
  56. # operator: In
  57. # values:
  58. # - linux
  59. securityContext:
  60. runAsNonRoot: true
  61. # TODO(user): For common cases that do not require escalating privileges
  62. # it is recommended to ensure that all your Pods/Containers are restrictive.
  63. # More info: https://kubernetes.io/docs/concepts/security/pod-security-standards/#restricted
  64. # Please uncomment the following code if your project does NOT have to work on old Kubernetes
  65. # versions < 1.19 or on vendors versions which do NOT support this field by default (i.e. Openshift < 4.11 ).
  66. # seccompProfile:
  67. # type: RuntimeDefault
  68. containers:
  69. - command:
  70. - /manager
  71. args:
  72. - --leader-elect
  73. image: controller:latest
  74. name: manager
  75. securityContext:
  76. allowPrivilegeEscalation: false
  77. capabilities:
  78. drop:
  79. - "ALL"
  80. livenessProbe:
  81. httpGet:
  82. path: /healthz
  83. port: 8081
  84. initialDelaySeconds: 15
  85. periodSeconds: 20
  86. readinessProbe:
  87. httpGet:
  88. path: /readyz
  89. port: 8081
  90. initialDelaySeconds: 5
  91. periodSeconds: 10
  92. # TODO(user): Configure the resources accordingly based on the project requirements.
  93. # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
  94. resources:
  95. limits:
  96. cpu: 500m
  97. memory: 128Mi
  98. requests:
  99. cpu: 10m
  100. memory: 64Mi
  101. serviceAccountName: controller-manager
  102. terminationGracePeriodSeconds: 10