forked from Katenary/katenary
svc-optional
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user