Skip to content

Commit 84299ff

Browse files
authored
Example readme and yamls corrections (#20)
* Example readme and yamls corrections Signed-off-by: Punith Kenchappa <[email protected]> * fix not found of power-dra-kubeletplugin and cdi file Signed-off-by: Punith Kenchappa <[email protected]> --------- Signed-off-by: Punith Kenchappa <[email protected]>
1 parent b2c575e commit 84299ff

File tree

4 files changed

+13
-11
lines changed

4 files changed

+13
-11
lines changed

build/Containerfile

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,12 @@ FROM registry.access.redhat.com/ubi9/ubi:9.4 as builder
22
USER root
33
WORKDIR /workspace
44

5+
# Copy go.mod and go.sum first to cache dependencies
6+
COPY go.mod go.sum ./
7+
8+
# Now copy the rest of the source code
9+
COPY . .
10+
511
# From https://github.com/openshift/oc-mirror/blob/main/Dockerfile#L8C1-L20C2
612
# DNF Package Install List
713
ARG DNF_LIST="\

deployments/helm/power-dra-driver/templates/kubeletplugin.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ spec:
7878
- name: cdi
7979
hostPath:
8080
path: /var/run/cdi
81-
type: Directory
81+
type: DirectoryOrCreate
8282
{{- with .Values.kubeletPlugin.nodeSelector }}
8383
nodeSelector:
8484
{{- toYaml . | nindent 8 }}

example/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11

22

3-
1. Create namespace `oc new-project ex-dra-driver`
3+
1. Create namespace `oc new-project ex-power-dra`
44
2. Install Scenario - `kustomize build examples/<scenario> | oc apply -f -`
55
3. Uninstall Scenario - `kustomize build examples/<scenario> | oc delete -f -`
66

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: apps/v1
22
kind: Deployment
33
metadata:
4-
name: ex-power-dra
4+
name: ex-power-dra-sec
55
labels:
6-
app: ex-power-dra
6+
app: ex-power-dra-sec
77
spec:
88
selector:
99
matchLabels:
@@ -13,6 +13,7 @@ spec:
1313
labels:
1414
app: ex-power-dra
1515
spec:
16+
serviceAccountName: ex-sa
1617
containers:
1718
- name: driver
1819
image: quay.io/powercloud/power-dra-driver:latest
@@ -25,10 +26,6 @@ spec:
2526
requests:
2627
cpu: 100m
2728
memory: 100Mi
28-
claims:
29-
- name: nx-gzip
30-
serviceAccount: ex-sa
31-
serviceAccountName: ex-sa
3229
securityContext:
3330
privileged: false
3431
runAsUser: 1000
@@ -38,10 +35,9 @@ spec:
3835
runAsNonRoot: true
3936
readOnlyRootFilesystem: true
4037
allowPrivilegeEscalation: false
38+
# Resource Claims should be outside of `containers`
4139
resourceClaims:
4240
- name: nx-gzip
4341
resourceClaimTemplateName: nx-gzip
44-
serviceAccount: ex-sa
45-
serviceAccountName: ex-sa
4642
updateStrategy:
47-
type: RollingUpdate
43+
type: RollingUpdate

0 commit comments

Comments
 (0)