Skip to content

Commit 6d612e4

Browse files
committed
update deviceclass to resource.k8s.io/v1alpha3
Add openshiftprivilegerolebinging.yaml to helm build Signed-off-by: Jason Cho <[email protected]>
1 parent 8e90275 commit 6d612e4

File tree

5 files changed

+22
-18
lines changed

5 files changed

+22
-18
lines changed

Dockerfile

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -7,18 +7,5 @@ ARG CONTROLLER_GEN_VERSION=0.17.1
77
ARG CI_LINT_VERSION=1.52.0
88
ARG MOQ_VERSION=0.3.4
99

10-
WORKDIR /build
11-
COPY ..
12-
1310
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v${CI_LINT_VERSION} && go install github.com/matryer/moq@v${MOQ_VERSION} && go install sigs.k8s.io/controller-tools/cmd/controller-gen@v${CONTROLLER_GEN_VERSION} && go install k8s.io/code-generator/cmd/client-gen@v${CLIENT_GEN_VERSION} && go install k8s.io/code-generator/cmd/lister-gen@v${LISTER_GEN_VERSION} && go install k8s.io/code-generator/cmd/informer-gen@v${INFORMER_GEN_VERSION}
14-
15-
FROM registry.access.redhat.com/ubi9/ubi-minimal:9.4
16-
LABEL io.k8s.dispaly-name="Power Driver for Dynamic Resource Allocation (DRA)"
17-
LABEL name="IBM Power DRA Driver"
18-
LABEL vendor="IBM"
19-
LABEL version="1.0.0"
20-
21-
RUN microdnf -y update && microdnf clean all
22-
WORKDIR /
23-
COPY ./build/entrypoint.sh /
24-
ENTRYPOINT ["/entrypoint.sh"]
11+
RUN git config --file=/.gitconfig --add safe.directory /work

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ ARCH ?= ppc64le
33

44
REGISTRY ?= quay.io/jcho0
55
REPOSITORY ?= power-dra-driver
6-
TAG ?= first-test
6+
TAG ?= v0.1.0
77

88
CONTAINER_RUNTIME ?= $(shell command -v podman 2> /dev/null || echo docker)
99

build/helm/power-dra-driver/templates/deviceclass.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
apiVersion: resource.k8s.io/v1beta1
1+
apiVersion: resource.k8s.io/v1alpha3
22
kind: DeviceClass
33
metadata:
44
name: gpu.powervs-openshift-ipi.cis.ibm.net
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# Apply only when running on OpenShift to let the kublet plugin run privileged
2+
{{- if .Capabilities.APIVersions.Has "security.openshift.io/v1/SecurityContextConstraints" -}}
3+
---
4+
apiVersion: rbac.authorization.k8s.io/v1
5+
kind: RoleBinding
6+
metadata:
7+
name: {{ include "power-dra-driver.fullname" . }}-openshift-privileged-role-binding
8+
namespace: {{ include "power-dra-driver.namespace" . }}
9+
subjects:
10+
- kind: ServiceAccount
11+
name: {{ include "power-dra-driver.serviceAccountName" . }}
12+
namespace: {{ include "power-dra-driver.namespace" . }}
13+
roleRef:
14+
kind: ClusterRole
15+
name: system:openshift:scc:privileged
16+
apiGroup: rbac.authorization.k8s.io
17+
{{- end }}

build/helm/power-dra-driver/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,11 @@ selectorLabelsOverride: {}
55

66
allowDefaultNamespace: false
77

8-
deviceClasses: ["gpu","mig","imex"]
8+
deviceClasses: ["gpu"]
99

1010
imagePullSecrets: []
1111
image:
12-
repository: quay.io/jcho0/power-dra-driver:first-test
12+
repository: quay.io/jcho0/power-dra-driver
1313
pullPolicy: IfNotPresent
1414
# Overrides the image tag whose default is the chart appVersion.
1515
tag: ""

0 commit comments

Comments
 (0)