svc-optional

This commit is contained in:
2025-11-30 17:18:19 -06:00
parent 7230081401
commit 73be50588a
12 changed files with 61 additions and 1 deletions

View File

@@ -50,6 +50,9 @@ func Generate(project *types.Project) (*HelmChart, error) {
// drop all services with the "ignore" label
dropIngoredServices(project)
// optional all services with the "svc-optional" label
makeSvcOptionalServices(project)
fixContainerNames(project)
// rename all services name to remove dashes
@@ -223,6 +226,16 @@ func dropIngoredServices(project *types.Project) {
}
}
// makeSvcOptionalServices makes all services optional with the "svc-optional" label set to true (or yes).
func makeSvcOptionalServices(project *types.Project) {
for name, service := range project.Services {
if isSvcOptional(service) {
// delete(project.Services, name)
// make optional
}
}
}
// fixResourceNames renames all services and related resources to remove dashes.
func fixResourceNames(project *types.Project) error {
// rename all services name to remove dashes