Fix: Add default value for SeaweedFS password in whisk.yaml template #167
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fix: Add default value for SeaweedFS password in whisk.yaml template
🐛 Bug Description
Similar to the issue fixed in PR #166, the
seaweedfs.nuvolaris.passwordfield insetup/kubernetes/whisk.yamllacks a default value. This causes deployment failures when users enable the SeaweedFS component (OPERATOR_COMPONENT_SEAWEEDFS=true) without explicitly setting theSECRET_SEAWEEDFS_NUVOLARISenvironment variable.🔍 How to Reproduce the Bug
Prerequisites
opsCLI installedSteps to Reproduce
Enable SeaweedFS component:
export OPERATOR_COMPONENT_SEAWEEDFS=trueEnsure the password variable is NOT set:
unset SECRET_SEAWEEDFS_NUVOLARISAttempt deployment:
Expected Error
Root cause: The template uses
$SECRET_SEAWEEDFS_NUVOLARISwithout a default value, and when the variable is unset,envsubstproduces an empty string, causing Kubernetes validation to fail.🔧 The Fix
Code Change
File:
setup/kubernetes/whisk.yamlLine: 261
Before:
After:
Technical Details
This change uses Bash parameter expansion syntax
${VAR:-default}:SECRET_SEAWEEDFS_NUVOLARISis set and non-empty → uses that valueSECRET_SEAWEEDFS_NUVOLARISis unset or empty → useschangeme-seaweedfsThis ensures that:
export SECRET_SEAWEEDFS_NUVOLARIS="my-secure-pass"✅ Testing
Test 1: Deployment with SeaweedFS enabled (no variable set)
Expected result: ✅ Deployment succeeds, SeaweedFS uses
changeme-seaweedfsas passwordTest 2: Deployment with custom password
Expected result: ✅ Deployment succeeds, SeaweedFS uses custom password
Test 3: Verify the password in deployed Whisk CR
Expected output:
📊 Impact Analysis
Components Affected
OPERATOR_COMPONENT_SEAWEEDFS=false)Backward Compatibility
SECRET_SEAWEEDFS_NUVOLARISwill continue to workRelated Components with Similar Pattern
This fix continues the pattern established in PR #166. Other components in
whisk.yamlalready use default values:🔐 Security Considerations
Default password is intentionally simple: The value
changeme-seaweedfsis meant to be changed in production environmentsProduction recommendation: Users should always set custom passwords:
Component is optional: SeaweedFS is disabled by default (
OPERATOR_COMPONENT_SEAWEEDFS=false), so this default password is only used when explicitly enabledConsistent with project patterns: Uses the same security approach as other components (registry, minio, etc.)
📝 Additional Context
Why SeaweedFS Needs Authentication
SeaweedFS is a distributed object storage system that provides:
Authentication is required to:
Component Status
According to line 73 in
whisk.yaml:SeaweedFS is optional and disabled by default, so this bug only manifests when users explicitly enable it.
🎯 Summary
This PR fixes a deployment blocker for users who want to enable the SeaweedFS component. The fix:
🔗 Related Issues
Tested on: Ubuntu 24.04 with MicroK8s
Test date: October 26, 2025
Contributor: @mobs75