Skip to content

Commit 6977b78

Browse files
committed
chore: add some notes
1 parent 0010cb5 commit 6977b78

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
@@ -1691,8 +1691,10 @@ previousStepEnd=${currentStepEnd}
16911691
beginBuildStep "Unused Service Cleanup" "unusedServiceCleanup"
16921692
CLEANUP_OUTPUT=""
16931693
if [ "$(featureFlag CLEANUP_REMOVED_LAGOON_SERVICES)" != enabled ]; then
1694+
# run it in dry-run mode
16941695
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml)
16951696
else
1697+
# run it with the delete flag to actually remove services
16961698
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml --delete=true)
16971699
fi
16981700
CLEANUP_WARNING=false
@@ -1704,7 +1706,11 @@ else
17041706
echo ">> No services detected that require clean up"
17051707
fi
17061708

1707-
# 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
1709+
# 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
1710+
# this is run after the cleanup to ensure that only items that exist are stored in the configmap
1711+
# if a service has been abandoned (removed from the docker-compose file) and not cleaned up
1712+
# then the payload will contain the `abandoned` flag on the resource for when it is added to the lagoon api later on
1713+
# this will allow for visual representation in the api/ui of things that probably don't need to exist
17081714
if build-deploy-tool identify lagoon-services --images /kubectl-build-deploy/images.yaml > /kubectl-build-deploy/lagoon-services.json; then
17091715
echo "Updating lagoon-services configmap with a current service configurations"
17101716
if kubectl -n ${NAMESPACE} get configmap lagoon-services &> /dev/null; then

0 commit comments

Comments
 (0)