Skip to content

Commit 8f03a25

Browse files
Add label app:nvidia-dra-driver-gpu to all project components
Signed-off-by: Carlos Eduardo Arango Gutierrez <[email protected]>
1 parent 3613b76 commit 8f03a25

File tree

7 files changed

+19
-1
lines changed

7 files changed

+19
-1
lines changed

cmd/compute-domain-controller/computedomain.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,10 @@ type GetComputeDomainFunc func(uid string) (*nvapi.ComputeDomain, error)
3535
const (
3636
informerResyncPeriod = 10 * time.Minute
3737

38-
computeDomainLabelKey = "resource.nvidia.com/computeDomain"
38+
computeDomainLabelKey = "resource.nvidia.com/computeDomain"
39+
appLabelKey = "app"
40+
appLabelValue = "nvidia-dra-driver-gpu"
41+
3942
computeDomainFinalizer = computeDomainLabelKey
4043

4144
computeDomainDefaultChannelDeviceClass = "compute-domain-default-channel.nvidia.com"

cmd/compute-domain-controller/daemonset.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ type DaemonSetTemplateData struct {
4747
Finalizer string
4848
ComputeDomainLabelKey string
4949
ComputeDomainLabelValue types.UID
50+
AppLabelKey string
51+
AppLabelValue string
5052
ResourceClaimTemplateName string
5153
ImageName string
5254
}
@@ -180,6 +182,8 @@ func (m *DaemonSetManager) Create(ctx context.Context, namespace string, cd *nva
180182
Finalizer: computeDomainFinalizer,
181183
ComputeDomainLabelKey: computeDomainLabelKey,
182184
ComputeDomainLabelValue: cd.UID,
185+
AppLabelKey: appLabelKey,
186+
AppLabelValue: appLabelValue,
183187
ResourceClaimTemplateName: rct.Name,
184188
ImageName: m.config.imageName,
185189
}

cmd/compute-domain-controller/resourceclaimtemplate.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@ type ResourceClaimTemplateTemplateData struct {
4949
Finalizer string
5050
ComputeDomainLabelKey string
5151
ComputeDomainLabelValue types.UID
52+
AppLabelKey string
53+
AppLabelValue string
5254
TargetLabelKey string
5355
TargetLabelValue string
5456
DeviceClassName string
@@ -298,6 +300,8 @@ func (m *DaemonSetResourceClaimTemplateManager) Create(ctx context.Context, name
298300
Finalizer: computeDomainFinalizer,
299301
ComputeDomainLabelKey: computeDomainLabelKey,
300302
ComputeDomainLabelValue: cd.UID,
303+
AppLabelKey: appLabelKey,
304+
AppLabelValue: appLabelValue,
301305
TargetLabelKey: computeDomainResourceClaimTemplateTargetLabelKey,
302306
TargetLabelValue: computeDomainResourceClaimTemplateTargetDaemon,
303307
DeviceClassName: computeDomainDaemonDeviceClass,

deployments/helm/nvidia-dra-driver-gpu/values.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,8 @@ resources:
6161
enabled: true
6262

6363
controller:
64+
labels:
65+
app: nvidia-dra-driver-gpu
6466
priorityClassName: "system-node-critical"
6567
podAnnotations: {}
6668
podSecurityContext: {}
@@ -82,6 +84,8 @@ controller:
8284
operator: "Exists"
8385

8486
kubeletPlugin:
87+
labels:
88+
app: nvidia-dra-driver-gpu
8589
priorityClassName: "system-node-critical"
8690
updateStrategy:
8791
type: RollingUpdate

templates/compute-domain-daemon-claim-template.tmpl.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata:
88
- {{ .Finalizer }}
99
labels:
1010
{{ .ComputeDomainLabelKey }}: {{ .ComputeDomainLabelValue }}
11+
{{ .AppLabelKey }}: {{ .AppLabelValue }}
1112
{{ .TargetLabelKey }}: {{ .TargetLabelValue }}
1213
spec:
1314
spec:

templates/compute-domain-daemon.tmpl.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata:
88
- {{ .Finalizer }}
99
labels:
1010
{{ .ComputeDomainLabelKey }}: {{ .ComputeDomainLabelValue }}
11+
{{ .AppLabelKey }}: {{ .AppLabelValue }}
1112
spec:
1213
selector:
1314
matchLabels:

templates/compute-domain-workload-claim-template.tmpl.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ metadata:
88
- {{ .Finalizer }}
99
labels:
1010
{{ .ComputeDomainLabelKey }}: {{ .ComputeDomainLabelValue }}
11+
{{ .AppLabelKey }}: {{ .AppLabelValue }}
1112
{{ .TargetLabelKey }}: {{ .TargetLabelValue }}
1213
spec:
1314
spec:

0 commit comments

Comments
 (0)