Add default value for registry password in Whisk CR template
Problem:
- ops setup cluster fails with 'spec.registry.auth.password: Required value'
- REGISTRY_CONFIG_SECRET_PUSH_PULL variable is often not set
- Users must manually export the variable before running ops
Solution:
- Add default value 'changeme-registry' using bash parameter expansion
- Change: password: $REGISTRY_CONFIG_SECRET_PUSH_PULL
- To: password: ${REGISTRY_CONFIG_SECRET_PUSH_PULL:-changeme-registry}
Impact:
- ops setup cluster now works without manual variable export
- Maintains backward compatibility (variable can still override default)
- Improves user experience for new installations
Tested on MicroK8s cluster with operator version 0.1.0-incubating.2510012114
diff --git a/setup/kubernetes/whisk.yaml b/setup/kubernetes/whisk.yaml
index c774d50..0e8cb31 100644
--- a/setup/kubernetes/whisk.yaml
+++ b/setup/kubernetes/whisk.yaml
@@ -250,7 +250,7 @@
volume-size: ${REGISTRY_CONFIG_VOLUME_SIZE:-50}
auth:
username: ${REGISTRY_CONFIG_USERNAME:-opsuser}
- password: $REGISTRY_CONFIG_SECRET_PUSH_PULL
+ password: ${REGISTRY_CONFIG_SECRET_PUSH_PULL:-changeme-registry}
hostname: ${REGISTRY_CONFIG_HOSTNAME:-auto}
ingress:
enabled: ${REGISTRY_CONFIG_INGRESS_ENABLED:-false}