Skip to content

Commit

Permalink
remove aging crd, support setting resources on all containers
Browse files Browse the repository at this point in the history
Signed-off-by: Travis Glenn Hansen <travisghansen@yahoo.com>
  • Loading branch information
travisghansen committed Jun 6, 2022
1 parent 0a3f7ea commit f58f097
Show file tree
Hide file tree
Showing 7 changed files with 57 additions and 44 deletions.
2 changes: 1 addition & 1 deletion stable/democratic-csi/Chart.yaml
Expand Up @@ -2,4 +2,4 @@ apiVersion: v1
appVersion: "1.0"
description: csi storage for container orchestration systems
name: democratic-csi
version: 0.13.0
version: 0.13.1
24 changes: 24 additions & 0 deletions stable/democratic-csi/templates/_helpers.tpl
Expand Up @@ -54,6 +54,10 @@ Create chart name and version as used by the chart label.
{{- end }}
{{- range .Values.controller.externalAttacher.extraArgs }}
- {{ tpl . $root }}
{{- end }}
{{- if .Values.controller.externalAttacher.resources }}
resources:
{{ toYaml .Values.controller.externalAttacher.resources | indent 4 }}
{{- end }}
{{- if eq $windows "0" }}
volumeMounts:
Expand All @@ -77,6 +81,10 @@ Create chart name and version as used by the chart label.
{{- end }}
{{- range .Values.controller.externalProvisioner.extraArgs }}
- {{ tpl . $root }}
{{- end }}
{{- if .Values.controller.externalProvisioner.resources }}
resources:
{{ toYaml .Values.controller.externalProvisioner.resources | indent 4 }}
{{- end }}
{{- if eq $windows "0" }}
volumeMounts:
Expand Down Expand Up @@ -116,6 +124,10 @@ Create chart name and version as used by the chart label.
{{- end }}
{{- range .Values.controller.externalResizer.extraArgs }}
- {{ tpl . $root }}
{{- end }}
{{- if .Values.controller.externalResizer.resources }}
resources:
{{ toYaml .Values.controller.externalResizer.resources | indent 4 }}
{{- end }}
{{- if eq $windows "0" }}
volumeMounts:
Expand Down Expand Up @@ -158,6 +170,10 @@ Create chart name and version as used by the chart label.
{{- end }}
{{- range .Values.controller.externalSnapshotter.extraArgs }}
- {{ tpl . $root }}
{{- end }}
{{- if .Values.controller.externalSnapshotter.resources }}
resources:
{{ toYaml .Values.controller.externalSnapshotter.resources | indent 4 }}
{{- end }}
{{- if eq $windows "0" }}
volumeMounts:
Expand Down Expand Up @@ -197,6 +213,10 @@ Create chart name and version as used by the chart label.
{{- end }}
{{- range .Values.controller.externalHealthMonitorController.extraArgs }}
- {{ tpl . $root }}
{{- end }}
{{- if .Values.controller.externalHealthMonitorController.resources }}
resources:
{{ toYaml .Values.controller.externalHealthMonitorController.resources | indent 4 }}
{{- end }}
{{- if eq $windows "0" }}
volumeMounts:
Expand All @@ -213,6 +233,10 @@ Create chart name and version as used by the chart label.
{{- $root := . -}}
- name: csi-proxy
image: {{ .Values.csiProxy.image }}
{{- if .Values.csiProxy.resources }}
resources:
{{ toYaml .Values.csiProxy.resources | indent 4 }}
{{- end }}
env:
- name: BIND_TO
value: "unix://{{ .csiSocketAddress }}"
Expand Down
5 changes: 5 additions & 0 deletions stable/democratic-csi/templates/controller.yaml
Expand Up @@ -98,6 +98,11 @@ spec:
- --server-socket=/csi-data/csi.sock
{{- end }}

{{- if .Values.controller.driver.resources }}
resources:
{{ toYaml .Values.controller.driver.resources | indent 10 }}
{{- end }}

env:
- name: NODE_EXTRA_CA_CERTS
value: "/tmp/certs/extra-ca-certs.crt"
Expand Down
39 changes: 0 additions & 39 deletions stable/democratic-csi/templates/csidrivercrd.yaml

This file was deleted.

9 changes: 9 additions & 0 deletions stable/democratic-csi/templates/node-windows.yaml
Expand Up @@ -99,6 +99,11 @@ spec:
{{- end }}
- --server-socket={{ $csiPipeAddress }}

{{- if .Values.node.driver.resources }}
resources:
{{ toYaml .Values.node.driver.resources | indent 10 }}
{{- end }}

env:
- name: CSI_NODE_ID
valueFrom:
Expand Down Expand Up @@ -156,6 +161,10 @@ spec:
- {{ tpl . $root }}
{{- end }}
- --plugin-registration-path={{ .Values.node.kubeletHostPath }}/plugins_registry
{{- if .Values.node.driverRegistrar.resources }}
resources:
{{ toYaml .Values.node.driverRegistrar.resources | indent 10 }}
{{- end }}
env:
- name: KUBE_NODE_NAME
valueFrom:
Expand Down
9 changes: 9 additions & 0 deletions stable/democratic-csi/templates/node.yaml
Expand Up @@ -99,6 +99,11 @@ spec:
- --server-socket={{ .csiSocketAddress }}
{{- end }}

{{- if .Values.node.driver.resources }}
resources:
{{ toYaml .Values.node.driver.resources | indent 10 }}
{{- end }}

securityContext:
allowPrivilegeEscalation: true
capabilities:
Expand Down Expand Up @@ -193,6 +198,10 @@ spec:
{{- end }}
{{- range .Values.node.driverRegistrar.extraArgs }}
- {{ tpl . $root }}
{{- end }}
{{- if .Values.node.driverRegistrar.resources }}
resources:
{{ toYaml .Values.node.driverRegistrar.resources | indent 10 }}
{{- end }}
env:
- name: KUBE_NODE_NAME
Expand Down
13 changes: 9 additions & 4 deletions stable/democratic-csi/values.yaml
Expand Up @@ -39,10 +39,6 @@ csiDriver:
# None|File|ReadWriteOnceWithFSType
# fsGroupPolicy: ReadWriteOnceWithFSType

# clusters before k8s 1.14 requeired manual installation
# kubectl create -f https://raw.githubusercontent.com/kubernetes/csi-api/master/pkg/crd/manifests/csidriver.yaml
installCRD: false

# k8s 1.16+
# volumeLifecycleModes: []

Expand Down Expand Up @@ -87,6 +83,7 @@ controller:
- --csi-address={{ .csiSocketAddress }}
# if you do not want to completely override the defaults use this
extraArgs: []
resources:

# https://kubernetes-csi.github.io/docs/external-provisioner.html
externalProvisioner:
Expand All @@ -102,6 +99,7 @@ controller:
- --csi-address={{ .csiSocketAddress }}
# if you do not want to completely override the defaults use this
extraArgs: []
resources:

# https://kubernetes-csi.github.io/docs/external-resizer.html
externalResizer:
Expand All @@ -116,6 +114,7 @@ controller:
- --csi-address={{ .csiSocketAddress }}
# if you do not want to completely override the defaults use this
extraArgs: []
resources:

# https://kubernetes-csi.github.io/docs/external-snapshotter.html
externalSnapshotter:
Expand All @@ -132,6 +131,7 @@ controller:
- --csi-address={{ .csiSocketAddress }}
# if you do not want to completely override the defaults use this
extraArgs: []
resources:

# https://github.com/kubernetes-csi/external-health-monitor
externalHealthMonitorController:
Expand All @@ -148,6 +148,7 @@ controller:
#- --list-volumes-interval
# if you do not want to completely override the defaults use this
extraArgs: []
resources:

# https://kubernetes-csi.github.io/docs/cluster-driver-registrar.html
# not implemented, likely uncessary at this point
Expand Down Expand Up @@ -178,6 +179,7 @@ controller:
# - SYS_ADMIN
# privileged: true

resources:
extraEnv: []
extraVolumeMounts: []
# - name: foo
Expand Down Expand Up @@ -235,6 +237,7 @@ node:
# exec:
# command: ["/bin/sh","-c","nginx -s quit; while killall -0 nginx; do sleep 1; done"]

resources:
extraEnv: []
extraVolumeMounts: []
# - name: foo
Expand All @@ -250,6 +253,7 @@ node:
- --kubelet-registration-path={{ .Values.node.kubeletHostPath }}/plugins/{{ .Values.csiDriver.name }}/csi.sock
# if you do not want to completely override the defaults use this
extraArgs: []
resources:

extraVolumes: []
# - name: foo
Expand Down Expand Up @@ -312,6 +316,7 @@ volumeSnapshotClasses: []
csiProxy:
enabled: true
image: docker.io/democraticcsi/csi-grpc-proxy:v0.5.3
resources:

# Configure a pod security policy to allow privileged pods
enablePSP: false

0 comments on commit f58f097

Please sign in to comment.