initial version of confiuration is now parsed.
This commit is contained in:
parent
e943e2cd37
commit
f99e885f7a
@ -39,7 +39,20 @@ type CIDRS struct {
|
|||||||
Except []CIDR `yaml:"except,omitempty"`
|
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
|
// Config represents the top-level YAML structure
|
||||||
type Config struct {
|
type Config struct {
|
||||||
Networks []CIDRS `yaml:"networks"`
|
Networks []CIDRS `yaml:"networks"`
|
||||||
|
Namespaces []Namespace `yaml:"namespaces"`
|
||||||
}
|
}
|
||||||
|
@ -10,3 +10,22 @@ networks:
|
|||||||
- 192.168.0.0/16
|
- 192.168.0.0/16
|
||||||
|
|
||||||
|
|
||||||
|
namespaces:
|
||||||
|
- namespace: wamblee-org
|
||||||
|
capabilities:
|
||||||
|
- linkerd
|
||||||
|
applications:
|
||||||
|
- name: nexus-server
|
||||||
|
# ports when specified at the application level are used when
|
||||||
|
# not explicitly mentioned when a link is made
|
||||||
|
ports:
|
||||||
|
- 8081
|
||||||
|
- 8082
|
||||||
|
matchLabels:
|
||||||
|
app: nexus-server
|
||||||
|
|
||||||
|
- namespace: exposure
|
||||||
|
applications:
|
||||||
|
- name: httpd-wamblee-org
|
||||||
|
matchLabels:
|
||||||
|
app: wamblee-org
|
||||||
|
Loading…
Reference in New Issue
Block a user