Skip to content

Commit 37e2347

Browse files
committed
chore: add some notes
1 parent b5ebe8d commit 37e2347

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

legacy/build-deploy-docker-compose.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1707,8 +1707,10 @@ previousStepEnd=${currentStepEnd}
17071707
beginBuildStep "Unused Service Cleanup" "unusedServiceCleanup"
17081708
CLEANUP_OUTPUT=""
17091709
if [ "$(featureFlag CLEANUP_REMOVED_LAGOON_SERVICES)" != enabled ]; then
1710+
# run it in dry-run mode
17101711
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml)
17111712
else
1713+
# run it with the delete flag to actually remove services
17121714
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml --delete=true)
17131715
fi
17141716
CLEANUP_WARNING=false
@@ -1720,7 +1722,11 @@ else
17201722
echo ">> No services detected that require clean up"
17211723
fi
17221724

1723-
# collect data and save in configmap structured json of environment status, remote-controller will check for this configmap to provide to the api environment services
1725+
# collect data and save in configmap structured json of environment state, remote-controller will check for this configmap to provide to the api environment services
1726+
# this is run after the cleanup to ensure that only items that exist are stored in the configmap
1727+
# if a service has been abandoned (removed from the docker-compose file) and not cleaned up
1728+
# then the payload will contain the `abandoned` flag on the resource for when it is added to the lagoon api later on
1729+
# this will allow for visual representation in the api/ui of things that probably don't need to exist
17241730
if build-deploy-tool identify lagoon-services --images /kubectl-build-deploy/images.yaml > /kubectl-build-deploy/lagoon-services.json; then
17251731
echo "Updating lagoon-services configmap with a current service configurations"
17261732
if kubectl -n ${NAMESPACE} get configmap lagoon-services &> /dev/null; then

0 commit comments

Comments
 (0)