Skip to content

Commit

Permalink
Add GRPC timeout to external snapshotter (#111)
Browse files Browse the repository at this point in the history
Without the timeout the infra snapshot might take
longer than the default, and the context will expire
and a retry is issued. This causes the tenant snapshot
to sometimes fail to become ready in time.

Signed-off-by: Alexander Wels <awels@redhat.com>
  • Loading branch information
awels authored May 6, 2024
1 parent 2e9f6f1 commit a3a9957
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 26 deletions.
1 change: 1 addition & 0 deletions deploy/controller-infra/base/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ spec:
- "--v=5"
- "--csi-address=/csi/csi.sock"
- "--kubeconfig=/var/run/secrets/tenantcluster/value"
- "--timeout=3m"
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
imagePullPolicy: IfNotPresent
terminationMessagePath: /dev/termination-log
Expand Down
42 changes: 16 additions & 26 deletions deploy/controller-tenant/base/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ spec:
- "--infra-cluster-namespace=$(INFRACLUSTER_NAMESPACE)"
- "--infra-cluster-kubeconfig=/var/run/secrets/infracluster/kubeconfig"
- "--infra-cluster-labels=$(INFRACLUSTER_LABELS)"
- --v=5
- "--v=5"
ports:
- name: healthz
containerPort: 10301
Expand Down Expand Up @@ -73,15 +73,14 @@ spec:
requests:
memory: 50Mi
cpu: 10m
limits:
memory: 500Mi
cpu: 250m
- name: csi-provisioner
image: quay.io/openshift/origin-csi-external-provisioner:latest
args:
- --csi-address=$(ADDRESS)
- --default-fstype=ext4
- --v=5
- "--csi-address=$(ADDRESS)"
- "--default-fstype=ext4"
- "--v=5"
- "--timeout=3m"
- "--retry-interval-max=1m"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -92,14 +91,13 @@ spec:
requests:
memory: 50Mi
cpu: 10m
limits:
memory: 500Mi
cpu: 250m
- name: csi-attacher
image: quay.io/openshift/origin-csi-external-attacher:latest
args:
- --csi-address=$(ADDRESS)
- --v=5
- "--csi-address=$(ADDRESS)"
- "--v=5"
- "--timeout=3m"
- "--retry-interval-max=1m"
env:
- name: ADDRESS
value: /var/lib/csi/sockets/pluginproxy/csi.sock
Expand All @@ -110,29 +108,24 @@ spec:
requests:
memory: 50Mi
cpu: 10m
limits:
memory: 500Mi
cpu: 250m
- name: csi-liveness-probe
image: quay.io/openshift/origin-csi-livenessprobe:latest
args:
- --csi-address=/csi/csi.sock
- --probe-timeout=3s
- --health-port=10301
- "--csi-address=/csi/csi.sock"
- "--probe-timeout=3s"
- "--health-port=10301"
volumeMounts:
- name: socket-dir
mountPath: /csi
resources:
requests:
memory: 50Mi
cpu: 10m
limits:
memory: 500Mi
cpu: 250m
- name: csi-snapshotter
args:
- --v=3
- --csi-address=/csi/csi.sock
- "--v=3"
- "--csi-address=/csi/csi.sock"
- "--timeout=3m"
image: k8s.gcr.io/sig-storage/csi-snapshotter:v4.2.1
imagePullPolicy: IfNotPresent
securityContext:
Expand All @@ -146,9 +139,6 @@ spec:
requests:
memory: 20Mi
cpu: 10m
limits:
memory: 500Mi
cpu: 250m
volumes:
- name: socket-dir
emptyDir: {}
Expand Down

0 comments on commit a3a9957

Please sign in to comment.