Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions roles/kubernetes-apps/csi_driver/vsphere/defaults/main.yml
Expand Up @@ -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: {}
Expand Up @@ -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) }}
oomichi marked this conversation as resolved.
Show resolved Hide resolved
{% endif %}
env:
- name: ADDRESS
value: /csi/csi.sock
Expand All @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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"
Expand Down Expand Up @@ -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
Expand Down
Expand Up @@ -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
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down