Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow adding custom labels and securityContext to the components deployed by ClusterPolicy #1030

Open
inesshz opened this issue Oct 10, 2024 · 0 comments

Comments

@inesshz
Copy link

inesshz commented Oct 10, 2024

Hello,

  • We have requirement in our company where we need to have a custom labels for all Daemonsets and Jobs created by the ClusterPolicy as well as node feature discovery DSs and deployments.
  • For all of the DSs created by ClusterPolicy, we are using:
    daemonsets:
    labels: {}

  • However, this label is not applied to the kubernetes job created by the validator DS (cuda-validator) and we were not able to find a way to set labels for this job. The CRD also doesnt allow adding a label for this specific job. (https://github.com/NVIDIA/gpu-operator/blob/main/deployments/gpu-operator/crds/nvidia.com_clusterpolicies.yaml#L1766)

  • Regarding the node feature discovery, there isn't a way to set custom labels as the only labels are being filled through _helpers.tpl:

                          {{- define "node-feature-discovery.labels" -}}
                          helm.sh/chart: {{ include "node-feature-discovery.chart" . }}
                          {{ include "node-feature-discovery.selectorLabels" . }}
                          {{- if .Chart.AppVersion }}
                          app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
                          {{- end }}
                          app.kubernetes.io/managed-by: {{ .Release.Service }}
                          {{- end -}}
                          
    
                          {{- define "node-feature-discovery.selectorLabels" -}}
                          app.kubernetes.io/name: {{ include "node-feature-discovery.name" . }}
                          app.kubernetes.io/instance: {{ .Release.Name }}
                          {{- end -}}
    
  • Another issue we are facing is that we are not able to set our custom securityContext for the DSs created by the ClusterPolicy. (CRD doesnt allow setting this as well)

Can we get help with templating and customizing the above ?

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant