Skip to content

Automatically determine volumeBindingMode of config-pvc #1906

@durera

Description

@durera

Feature and motivation

Lots of users are tripping over storageclasses that use volumeBindingMode=WaitForFirstConsumer, today the CLI asks the user to tell it what mode they are using, but this is proving error prone.

We can lookup the bind mode of the storage class being used, and take the correct action automatically. This will allow us to remove the --no-wait-for-bind flag and prompts entirely.

oc get storageclass ibmc-file-silver -o yaml
apiVersion: storage.k8s.io/v1
kind: StorageClass
metadata:
  creationTimestamp: "2025-11-21T15:32:43Z"
  labels:
    addonmanager.kubernetes.io/mode: EnsureExists
    kubernetes.io/cluster-service: "true"
  name: ibmc-file-silver
  resourceVersion: "3972"
  uid: e706b415-3459-4f6b-961b-2673e36a1912
parameters:
  billingType: hourly
  classVersion: "2"
  iopsPerGB: "4"
  sizeRange: '[20-12000]Gi'
  type: Endurance
provisioner: ibm.io/ibmc-file
reclaimPolicy: Delete
volumeBindingMode: Immediate

New code:

  • Lookup storage class and get the volumeBindingMode
  • If mode == Immediate then we wait
  • If mode == WaitForFirstConsumer then we don't

Remove all code that allows the user to control this behaviour manually.

Usage example

Seems to be common place error in AWS when using gp3 storage class, which is configured in WaitForFirstConsumer mode by default.

Metadata

Metadata

Labels

EnhancementNew feature or request

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions