initial version of confiuration is now parsed.

This commit is contained in:
2025-01-02 11:44:32 +01:00
parent e943e2cd37
commit f99e885f7a
2 changed files with 33 additions and 1 deletions
+14 -1
View File
@@ -39,7 +39,20 @@ type CIDRS struct {
Except []CIDR `yaml:"except,omitempty"`
}
type Application struct {
Name string `yaml:"name"`
Ports []string `yaml:"ports,omitempty"`
MatchLabels map[string]string `yaml:"matchLabels"`
}
type Namespace struct {
Namespace string `yaml:"namespace"`
Capabilities []string `yaml:"capabilities"`
Applications []Application `yaml:"applications"`
}
// Config represents the top-level YAML structure
type Config struct {
Networks []CIDRS `yaml:"networks"`
Networks []CIDRS `yaml:"networks"`
Namespaces []Namespace `yaml:"namespaces"`
}