github.com/openshift/dpu-operator@v0.0.0-20240502153209-3af840d137c2/config/manager/manager.yaml (about)

     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: dpu-operator
    10      app.kubernetes.io/part-of: dpu-operator
    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: dpu-operator
    25      app.kubernetes.io/part-of: dpu-operator
    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          env:
    74          - name: DPU_DAEMON_IMAGE
    75            value: quay.io/openshift/origin-dpu-daemon:4.16
    76          image: quay.io/openshift/origin-dpu-operator:4.16
    77          name: manager
    78          securityContext:
    79            allowPrivilegeEscalation: false
    80            capabilities:
    81              drop:
    82                - "ALL"
    83          livenessProbe:
    84            httpGet:
    85              path: /healthz
    86              port: 8081
    87            initialDelaySeconds: 15
    88            periodSeconds: 20
    89          readinessProbe:
    90            httpGet:
    91              path: /readyz
    92              port: 8081
    93            initialDelaySeconds: 5
    94            periodSeconds: 10
    95          # TODO(user): Configure the resources accordingly based on the project requirements.
    96          # More info: https://kubernetes.io/docs/concepts/configuration/manage-resources-containers/
    97          resources:
    98            limits:
    99              cpu: 500m
   100              memory: 128Mi
   101            requests:
   102              cpu: 10m
   103              memory: 64Mi
   104        serviceAccountName: controller-manager
   105        terminationGracePeriodSeconds: 10