Use compose-go https://github.com/compose-spec/compose-go to make Katenary parsing compose file the official way. Add labels: - `volume-from` (with `same-pod`) to avoid volume repetition - `ignore` to ignore a service - `mapenv` (replaces the `env-to-service`) to map environment to helm variable (as a template string) - `secret-vars` declares variables as secret values More: - Now, environment (as secret vars) are set in values.yaml - Ingress has got annotations in values.yaml - Probes (liveness probe) are improved - fixed code to optimize - many others fixes about path, bad volume check, refactorisation, tests...
18 lines
367 B
Go
18 lines
367 B
Go
package writers
|
|
|
|
// IndentSize set the indentation size for yaml output. Could ba changed by command line argument.
|
|
var IndentSize = 2
|
|
|
|
// CountSpaces returns the number of spaces from the begining of the line.
|
|
func CountSpaces(line string) int {
|
|
var spaces int
|
|
for _, char := range line {
|
|
if char == ' ' {
|
|
spaces++
|
|
} else {
|
|
break
|
|
}
|
|
}
|
|
return spaces
|
|
}
|