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

fix(apps/device-plugin-amd-gpu): issues after merge #607

Merged
merged 1 commit into from
Jan 14, 2024

Conversation

qlonik
Copy link
Owner

@qlonik qlonik commented Jan 14, 2024

Creates our own ClusterRole and ClusterRoleBinding, since the ones provided by the chart do not work. Also split apiVersion into group and version in a patch.

Fixes #606

Creates our own ClusterRole and ClusterRoleBinding, since the ones
provided by the chart do not work. Also split apiVersion into group and
version in a patch.

Fixes #606
@github-actions github-actions bot added the area/kubernetes Changes made in the kubernetes directory label Jan 14, 2024
Copy link

--- kubernetes/apps/tools/device-plugin-amd-gpu/app Kustomization: flux-system/device-plugin-amd-gpu HelmRelease: tools/amd-gpu

+++ kubernetes/apps/tools/device-plugin-amd-gpu/app Kustomization: flux-system/device-plugin-amd-gpu HelmRelease: tools/amd-gpu

@@ -31,32 +31,38 @@

             name: not-used
           spec:
             template:
               spec:
                 serviceAccountName: amd-gpu-node-labeller
         target:
-          apiVersion: apps/v1
+          group: apps
           kind: DaemonSet
           name: amd-gpu-labeller-daemonset
+          version: v1
       - patch: |-
+          $patch: delete
+          apiVersion: not-used
           kind: not-used
-          apiVersion: not-used
           metadata:
             name: not-used
-          subjects:
-            - kind: ServiceAccount
-              name: amd-gpu-node-labeller
-              namespace: tools
         target:
           group: rbac.authorization.k8s.io
           kind: ClusterRoleBinding
-          name: crb-amd-gpu-labeller
       - patch: |-
           $patch: delete
+          apiVersion: not-used
           kind: not-used
+          metadata:
+            name: not-used
+        target:
+          group: rbac.authorization.k8s.io
+          kind: ClusterRole
+      - patch: |-
+          $patch: delete
           apiVersion: not-used
+          kind: not-used
           metadata:
             name: not-used
         target:
           labelSelector: app.kubernetes.io/instance=amd-gpu,app.kubernetes.io/name=node-feature-discovery
   uninstall:
     keepHistory: false
--- kubernetes/apps/tools/device-plugin-amd-gpu/app Kustomization: flux-system/device-plugin-amd-gpu ClusterRole: flux-system/amd-gpu-node-labeller

+++ kubernetes/apps/tools/device-plugin-amd-gpu/app Kustomization: flux-system/device-plugin-amd-gpu ClusterRole: flux-system/amd-gpu-node-labeller

@@ -0,0 +1,20 @@

+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRole
+metadata:
+  labels:
+    app.kubernetes.io/name: device-plugin-amd-gpu
+    kustomize.toolkit.fluxcd.io/name: device-plugin-amd-gpu
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: amd-gpu-node-labeller
+rules:
+- apiGroups:
+  - ''
+  resources:
+  - nodes
+  verbs:
+  - watch
+  - get
+  - list
+  - update
+
--- kubernetes/apps/tools/device-plugin-amd-gpu/app Kustomization: flux-system/device-plugin-amd-gpu ClusterRoleBinding: flux-system/amd-gpu-node-labeller-binding

+++ kubernetes/apps/tools/device-plugin-amd-gpu/app Kustomization: flux-system/device-plugin-amd-gpu ClusterRoleBinding: flux-system/amd-gpu-node-labeller-binding

@@ -0,0 +1,18 @@

+---
+apiVersion: rbac.authorization.k8s.io/v1
+kind: ClusterRoleBinding
+metadata:
+  labels:
+    app.kubernetes.io/name: device-plugin-amd-gpu
+    kustomize.toolkit.fluxcd.io/name: device-plugin-amd-gpu
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: amd-gpu-node-labeller-binding
+roleRef:
+  apiGroup: rbac.authorization.k8s.io
+  kind: ClusterRole
+  name: amd-gpu-node-labeller
+subjects:
+- kind: ServiceAccount
+  name: amd-gpu-node-labeller
+  namespace: tools
+

@qlonik qlonik merged commit e046e70 into main Jan 14, 2024
3 checks passed
@qlonik qlonik deleted the amd-gpu-device-plugin-chart branch January 14, 2024 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant