Add resources section to all containers releated to Vsphere CSI driver (#9687)

pull/9836/head
Eugene Artemenko 2023-02-27 12:36:20 +02:00 committed by GitHub
parent 62f34c6085
commit 5cbcec8968
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 50 additions and 0 deletions

View File

@ -38,3 +38,17 @@ vsphere_csi_block_volume_snapshot: false
external_vsphere_user: "{{ lookup('env','VSPHERE_USER') }}"
external_vsphere_password: "{{ lookup('env','VSPHERE_PASSWORD') }}"
# Controller resources
vsphere_csi_snapshotter_resources: {}
vsphere_csi_provisioner_resources: {}
vsphere_syncer_resources: {}
vsphere_csi_liveness_probe_controller_resources: {}
vsphere_csi_resources: {}
vsphere_csi_resizer_resources: {}
vsphere_csi_attacher_resources: {}
# DaemonSet node resources
vsphere_csi_node_driver_registrar_resources: {}
vsphere_csi_driver_resources: {}
vsphere_csi_liveness_probe_ds_resources: {}

View File

@ -62,6 +62,10 @@ spec:
- "--leader-election"
- "--kube-api-qps=100"
- "--kube-api-burst=100"
{% if vsphere_csi_attacher_resources | length > 0 %}
resources:
{{ vsphere_csi_attacher_resources | default({}) | to_nice_yaml | trim | indent(width=12) }}
{% endif %}
env:
- name: ADDRESS
value: /csi/csi.sock
@ -79,6 +83,10 @@ spec:
- "--kube-api-qps=100"
- "--kube-api-burst=100"
- "--leader-election"
{% if vsphere_csi_resizer_resources | length > 0 %}
resources:
{{ vsphere_csi_resizer_resources | default({}) | to_nice_yaml | trim | indent(width=12) }}
{% endif %}
env:
- name: ADDRESS
value: /csi/csi.sock
@ -93,6 +101,10 @@ spec:
- "--fss-namespace={{ vsphere_csi_namespace }}"
- "--supervisor-fss-namespace={{ vsphere_csi_namespace }}"
- "--use-gocsi=false"
{% if vsphere_csi_resources | length > 0 %}
resources:
{{ vsphere_csi_resources | default({}) | to_nice_yaml | trim | indent(width=12) }}
{% endif %}
imagePullPolicy: {{ k8s_image_pull_policy }}
env:
- name: CSI_ENDPOINT
@ -139,6 +151,10 @@ spec:
args:
- "--v=4"
- "--csi-address=$(ADDRESS)"
{% if vsphere_csi_liveness_probe_controller_resources | length > 0 %}
resources:
{{ vsphere_csi_liveness_probe_controller_resources | default({}) | to_nice_yaml | trim | indent(width=12) }}
{% endif %}
env:
- name: ADDRESS
value: {{ csi_endpoint }}/csi.sock
@ -157,6 +173,10 @@ spec:
- containerPort: 2113
name: prometheus
protocol: TCP
{% if vsphere_syncer_resources | length > 0 %}
resources:
{{ vsphere_syncer_resources | default({}) | to_nice_yaml | trim | indent(width=12) }}
{% endif %}
env:
- name: FULL_SYNC_INTERVAL_MINUTES
value: "30"
@ -189,6 +209,10 @@ spec:
# needed only for topology aware setup
#- "--feature-gates=Topology=true"
#- "--strict-topology"
{% if vsphere_csi_provisioner_resources | length > 0 %}
resources:
{{ vsphere_csi_provisioner_resources | default({}) | to_nice_yaml | trim | indent(width=12) }}
{% endif %}
env:
- name: ADDRESS
value: /csi/csi.sock

View File

@ -39,6 +39,10 @@ spec:
- "--v=5"
- "--csi-address=$(ADDRESS)"
- "--kubelet-registration-path=$(DRIVER_REG_SOCK_PATH)"
{% if vsphere_csi_node_driver_registrar_resources | length > 0 %}
resources:
{{ vsphere_csi_node_driver_registrar_resources | default({}) | to_nice_yaml | trim | indent(width=10) }}
{% endif %}
env:
- name: ADDRESS
value: /csi/csi.sock
@ -65,6 +69,10 @@ spec:
- "--supervisor-fss-namespace={{ vsphere_csi_namespace }}"
- "--use-gocsi=false"
imagePullPolicy: "Always"
{% if vsphere_csi_driver_resources | length > 0 %}
resources:
{{ vsphere_csi_driver_resources | default({}) | to_nice_yaml | trim | indent(width=10) }}
{% endif %}
env:
- name: NODE_NAME
valueFrom:
@ -123,6 +131,10 @@ spec:
- "--v=4"
{% endif %}
- "--csi-address=/csi/csi.sock"
{% if vsphere_csi_liveness_probe_ds_resources | length > 0 %}
resources:
{{ vsphere_csi_liveness_probe_ds_resources | default({}) | to_nice_yaml | trim | indent(width=10) }}
{% endif %}
volumeMounts:
- name: plugin-dir
mountPath: /csi