Skip to content

Commit

Permalink
added daemonset for reserve storage-node
Browse files Browse the repository at this point in the history
  • Loading branch information
geoffrey1330 committed Sep 16, 2024
1 parent ddf7eac commit 54d4ba6
Show file tree
Hide file tree
Showing 4 changed files with 59 additions and 3 deletions.
3 changes: 2 additions & 1 deletion charts/latest/spdk-csi/templates/caching-node-handler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ spec:
serviceAccountName: caching-node-service-account
containers:
- name: caching-node-handler
image: simplyblock/caching-node-handler
image: "{{ .Values.image.cachingNode.repository }}:{{ .Values.image.cachingNode.tag }}"
imagePullPolicy: "Always"
env:
- name: SPDKCSI_SECRET
valueFrom:
Expand Down
3 changes: 2 additions & 1 deletion charts/latest/spdk-csi/templates/storage-node-handler.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ spec:
serviceAccountName: storage-node-service-account
containers:
- name: storage-node-handler
image: simplyblock/storage-node-handler
image: "{{ .Values.image.storageNode.repository }}:{{ .Values.image.storageNode.tag }}"
imagePullPolicy: "Always"
env:
- name: SPDKCSI_SECRET
valueFrom:
Expand Down
47 changes: 47 additions & 0 deletions charts/latest/spdk-csi/templates/storage-node.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,50 @@ spec:
volumeMounts:
- name: dev-vol
mountPath: /dev

---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: storage-node-ds-reserve
annotations:
helm.sh/hook: post-install
spec:
selector:
matchLabels:
app: storage-node-reserve
template:
metadata:
labels:
app: storage-node-reserve
spec:
serviceAccountName: storage-node-sa
nodeSelector:
type: simplyblock-storage-plane
volumes:
- name: dev-vol
hostPath:
path: /dev
hostNetwork: true
{{- if .Values.storagenode.tolerations.create }}
tolerations:
- effect: {{ .Values.storagenode.tolerations.effect }}
key: {{ .Values.storagenode.tolerations.key }}
operator: {{ .Values.storagenode.tolerations.operator }}
value: {{ .Values.storagenode.tolerations.value }}
{{- end }}
containers:
- name: s-node-api-container
image: "{{ .Values.image.simplyblock.repository }}:{{ .Values.image.simplyblock.tag }}"
imagePullPolicy: "Always"
command: ["python", "simplyblock_web/snode_app_k8s.py"]
env:
- name: HOSTNAME
valueFrom:
fieldRef:
fieldPath: spec.nodeName
securityContext:
privileged: true
volumeMounts:
- name: dev-vol
mountPath: /dev
9 changes: 8 additions & 1 deletion charts/latest/spdk-csi/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,14 @@ image:
repository: simplyblock/simplyblock
tag: release_v1
pullPolicy: Always

storageNode:
repository: simplyblock/storage-node-handler
tag: latest
pullPolicy: Always
cachingNode:
repository: simplyblock/caching-node-handler
tag: latest
pullPolicy: Always
serviceAccount:
# Specifies whether a serviceAccount should be created
create: true
Expand Down

0 comments on commit 54d4ba6

Please sign in to comment.