Skip to content

Commit e27284d

Browse files
DSF: Support Extra Volumes Injection for hub components
1 parent 274a001 commit e27284d

3 files changed

Lines changed: 46 additions & 2 deletions

File tree

dynamic-scoring-framework/charts/dynamic-scoring-framework/templates/addon-controller.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,18 @@ spec:
2323
args:
2424
- "/dynamic-scoring-addon"
2525
- "controller"
26+
volumeMounts:
27+
{{- with .Values.hubSetting.extraVolumeMounts }}
28+
{{ toYaml . | nindent 10 }}
29+
{{- else }}
30+
[]
31+
{{- end }}
32+
volumes:
33+
{{- with .Values.hubSetting.extraVolumes }}
34+
{{ toYaml . | nindent 8 }}
35+
{{- else }}
36+
[]
37+
{{- end }}
2638
---
2739
apiVersion: v1
2840
kind: ServiceAccount

dynamic-scoring-framework/charts/dynamic-scoring-framework/templates/dynamic-scoring-controller.yaml

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,11 +392,21 @@ spec:
392392
capabilities:
393393
drop:
394394
- ALL
395-
volumeMounts: []
395+
volumeMounts:
396+
{{- with .Values.hubSetting.extraVolumeMounts }}
397+
{{ toYaml . | nindent 10 }}
398+
{{- else }}
399+
[]
400+
{{- end }}
396401
securityContext:
397402
runAsNonRoot: true
398403
seccompProfile:
399404
type: RuntimeDefault
400405
serviceAccountName: dynamic-scoring-framework-controller
401406
terminationGracePeriodSeconds: 10
402-
volumes: []
407+
volumes:
408+
{{- with .Values.hubSetting.extraVolumes }}
409+
{{ toYaml . | nindent 8 }}
410+
{{- else }}
411+
[]
412+
{{- end }}

dynamic-scoring-framework/charts/dynamic-scoring-framework/values.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,26 @@
11
hubSetting:
2+
# Additional pod volumes applied to all hub controller Deployments.
3+
# Example:
4+
# extraVolumes:
5+
# - name: scoring-config
6+
# configMap:
7+
# name: scoring-config
8+
# - name: scoring-secret
9+
# secret:
10+
# secretName: scoring-secret
11+
extraVolumes: []
12+
13+
# Additional volume mounts applied to all hub controller containers.
14+
# Example:
15+
# extraVolumeMounts:
16+
# - name: scoring-config
17+
# mountPath: /etc/dsf/config
18+
# readOnly: true
19+
# - name: scoring-secret
20+
# mountPath: /etc/dsf/secret
21+
# readOnly: true
22+
extraVolumeMounts: []
23+
224
# Namespace where the hub components (e.g. controllers) will be deployed
325
namespace: open-cluster-management
426

0 commit comments

Comments
 (0)