Skip to content

[helm/v2-alpha] missing tolerations, affinity and nodeSelector parameters #5246

@robinlioret

Description

@robinlioret

What do you want to happen?

The generated dist/chart/templates/manager/manager.yaml file for the Deployment of the operator is currently not exposing the tolerations, nodeSelector nor affinity options. Which could be required in certain deployment cases.

The plugin should generate something like this:

# dist/chart/templates/manager/manager.yaml
apiVersion: apps/v1
kind: Deployment
# ...
spec:
    # ...
    template:
        # ...
        spec:
            {{- with .Values.manager.tolerations }}
            tolerations: {{ toYaml . | nindent 16 }}
            {{- end }}
            {{- with .Values.manager.nodeSelector }}
            nodeSelector: {{ toYaml . | nindent 16 }}
            {{- end }}
            {{- with .Values.manager.affinity }}
            affinity: {{ toYaml . | nindent 16 }}
            {{- end }}
            containers:
             # ...

And expose it in the default values file:

# dist/chart/values.yaml

# Configure the controller manager deployment
manager:
  # ...

  # Pods tolerations
  tolerations: []

  # Pods node selection
  nodeSelector: {}

  # Pod affinity
  affinity: {}

Note: I'm aware that this is kind of a duplicate of #4912 but since the previous issue was closed, i'm opening a new one.

Extra Labels

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/featureCategorizes issue or PR as related to a new feature.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions