You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 18, 2024. It is now read-only.
Solution: Update documentation to reflect the fact that the yamls need to be reviewed and the image: line updated to reflect the right registry url and - namespace.
Alternative: Centralize the location for management of the registry url and - namespace
It doesn't seem possible to use environment variables in the yaml files directly this can be solved using the shell command envsubst.
One way to centralize the management of the registry location is to export $REGISTRY_URL and $REGISTRY_NAMESPACE from the pipeline/rolling-code-deploy.sh script.
The yaml files need to be updated so that the image: line reads: image: "$REGISTRY_URL/$REGISTRY_NAMESPACE/<imagename>:<label>"
Using the shell command envsubst you can now substitute the $VARIABLE tags in the yaml files, for the actual value of the environment variable with the same name, before passing the yaml to kubectl for execution. To do this:
The kubectl apply -f statements in the pipeline/rolling-code-deploy.sh script should be changed to:
Error msg form the kubernetes dashboard:
Cause: The following files for their image refer statically to
image: "registry.ng.bluemix.net/orod/<imagename>:<label>"
:nginx-prd.yaml, nginx-stg.yaml
php-fpm-prd.yaml, phpfpm-stg.yaml
php-cli.yaml
Solution: Update documentation to reflect the fact that the yamls need to be reviewed and the
image:
line updated to reflect the right registry url and - namespace.Alternative: Centralize the location for management of the registry url and - namespace
It doesn't seem possible to use environment variables in the yaml files directly this can be solved using the shell command
envsubst
.One way to centralize the management of the registry location is to export $REGISTRY_URL and $REGISTRY_NAMESPACE from the
pipeline/rolling-code-deploy.sh
script.The yaml files need to be updated so that the
image:
line reads:image: "$REGISTRY_URL/$REGISTRY_NAMESPACE/<imagename>:<label>"
Using the shell command
envsubst
you can now substitute the $VARIABLE tags in the yaml files, for the actual value of the environment variable with the same name, before passing the yaml to kubectl for execution. To do this:The
kubectl apply -f
statements in thepipeline/rolling-code-deploy.sh
script should be changed to:envsubst < ../kubernetes/<yaml file> | kubectl apply -f -
e.g.:
envsubst < ../kubernetes/php-cli.yaml | kubectl apply -f -
Update the documentation to reflect these changes.
The text was updated successfully, but these errors were encountered: