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"
1692
1692
CLEANUP_OUTPUT=""
1693
1693
if [ "$(featureFlag CLEANUP_REMOVED_LAGOON_SERVICES)"!= enabled ];then
1694
+
# run it in dry-run mode
1694
1695
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml)
1695
1696
else
1697
+
# run it with the delete flag to actually remove services
1696
1698
CLEANUP_OUTPUT=$(build-deploy-tool run cleanup --images /kubectl-build-deploy/images.yaml --delete=true)
1697
1699
fi
1698
1700
CLEANUP_WARNING=false
@@ -1704,7 +1706,11 @@ else
1704
1706
echo">> No services detected that require clean up"
1705
1707
fi
1706
1708
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
1708
1714
if build-deploy-tool identify lagoon-services --images /kubectl-build-deploy/images.yaml > /kubectl-build-deploy/lagoon-services.json;then
1709
1715
echo"Updating lagoon-services configmap with a current service configurations"
1710
1716
if kubectl -n ${NAMESPACE} get configmap lagoon-services &> /dev/null;then
0 commit comments