Skip to content

Commit b9390d8

Browse files
committed
S3CSI-195: Update user-facing docs for secret configuration requirement
Update dynamic provisioning user documentation to reflect actual behavior: Changes to overview.md: - Clarify two authentication modes (secret-based vs driver-level) - Emphasize both secrets must be configured together - Explain CSI limitation preventing node-only secret detection Changes to storageclass-reference-and-usage-examples.md: - Removed misleading 'only node-publish-secret' example - Removed 'only provisioner-secret' example - Added 'shared secret' example showing both pointing to same Secret - Added warning callout about single secret configuration These updates align user-facing docs with the implementation and prevent users from attempting unsupported configurations.
1 parent bbb662b commit b9390d8

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

docs/volume-provisioning/dynamic-provisioning/overview.md

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,12 +167,20 @@ Dynamic provisioning supports all [mount options](../mount-options.md) through t
167167

168168
## Authentication
169169

170-
Dynamic provisioning requires two sets of credentials. If either or both credential types are missing from the StorageClass configuration, the CSI driver will fall back to the default driver-level credentials.
170+
Dynamic provisioning supports two authentication modes:
171171

172-
1. **Provisioner Secrets**: Used by CSI controller for bucket creation and deletion
173-
2. **Node Secrets**: Used by nodes for mounting operations
172+
1. **Secret-based Authentication (Recommended)**: Configure **both** `provisioner-secret` and `node-publish-secret` in StorageClass
173+
- **Provisioner Secret**: Used by CSI controller for bucket creation/deletion
174+
- **Node-Publish Secret**: Used by nodes for mounting operations
175+
- Both secrets can point to the same Secret or different Secrets (for least privilege)
174176

175-
See the [Credential Management Guide](../../architecture/ring-s3-credentials-management/dynamic-provisioning-credentials-management.md) for detailed configuration.
177+
2. **Driver-level Authentication**: Omit both secret parameters to use driver-level credentials for all operations
178+
179+
**Important:** Both secrets must be configured together when using secret-based authentication.
180+
The controller cannot detect if only `node-publish-secret` is configured (CSI specification limitation),
181+
so configuring only one secret will result in driver-level credentials being used.
182+
183+
See the [Credential Management Guide](../../architecture/ring-s3-credentials-management/dynamic-provisioning-credentials-management.md) for detailed configuration and examples.
176184

177185
## Limitations
178186

docs/volume-provisioning/dynamic-provisioning/storageclass-reference-and-usage-examples.md

Lines changed: 10 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -50,37 +50,29 @@ mountOptions:
5050
- allow-other
5151
```
5252
53-
```yaml title="Only node publish secrets - Driver level secrets will be used for CreateBucket and DeleteBucket operations"
53+
```yaml title="Same secret for both provisioner and node operations"
5454
apiVersion: storage.k8s.io/v1
5555
kind: StorageClass
5656
metadata:
57-
name: s3-basic
57+
name: s3-shared-secret
5858
provisioner: s3.csi.scality.com
5959
reclaimPolicy: Delete
6060
volumeBindingMode: Immediate
6161
parameters:
62-
csi.storage.k8s.io/node-publish-secret-name: s3-node-secret
62+
# Both secrets point to the same Secret
63+
csi.storage.k8s.io/provisioner-secret-name: s3-shared-credentials
64+
csi.storage.k8s.io/provisioner-secret-namespace: kube-system
65+
csi.storage.k8s.io/node-publish-secret-name: s3-shared-credentials
6366
csi.storage.k8s.io/node-publish-secret-namespace: kube-system
6467
mountOptions:
6568
- allow-delete
6669
- allow-other
6770
```
6871
69-
```yaml title="Only provisioner secrets - Driver level secrets will be used for mount operations"
70-
apiVersion: storage.k8s.io/v1
71-
kind: StorageClass
72-
metadata:
73-
name: s3-basic
74-
provisioner: s3.csi.scality.com
75-
reclaimPolicy: Delete
76-
volumeBindingMode: Immediate
77-
parameters:
78-
csi.storage.k8s.io/provisioner-secret-name: s3-provisioner-secret
79-
csi.storage.k8s.io/provisioner-secret-namespace: kube-system
80-
mountOptions:
81-
- allow-delete
82-
- allow-other
83-
```
72+
!!! warning "Single Secret Configuration Not Supported"
73+
Configuring only `provisioner-secret` OR only `node-publish-secret` is **not recommended** and may not work as expected.
74+
The controller uses `provisioner-secret` presence to determine if secret-based authentication is enabled (CSI spec limitation).
75+
Always configure both secrets together, pointing to the same Secret if you don't need separate admin/user credentials.
8476

8577
```yaml title="No secrets - Driver level secrets will be used for CreateBucket, DeleteBucket and mount operations"
8678
apiVersion: storage.k8s.io/v1

0 commit comments

Comments
 (0)