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
beginBuildStep "Unused Service Cleanup""unusedServiceCleanup"
1708
1708
CLEANUP_OUTPUT=""
1709
1709
if [ "$(featureFlag CLEANUP_REMOVED_LAGOON_SERVICES)"!= enabled ];then
1710
+
# run it in dry-run mode
1710
1711
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml)
1711
1712
else
1713
+
# run it with the delete flag to actually remove services
1712
1714
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml --delete=true)
1713
1715
fi
1714
1716
CLEANUP_WARNING=false
@@ -1720,7 +1722,11 @@ else
1720
1722
echo">> No services detected that require clean up"
1721
1723
fi
1722
1724
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
1724
1730
if build-deploy-tool identify lagoon-services --images /kubectl-build-deploy/images.yaml > /kubectl-build-deploy/lagoon-services.json;then
1725
1731
echo"Updating lagoon-services configmap with a current service configurations"
1726
1732
if kubectl -n ${NAMESPACE} get configmap lagoon-services &> /dev/null;then
0 commit comments