1
0
mirror of https://github.com/rancher/rke.git synced 2025-09-13 21:52:08 +00:00

Add nginx ingress controller and labels/taints sync

This commit is contained in:
galal-hussein
2018-02-01 23:28:31 +02:00
parent 597c844a02
commit f8f877ba27
22 changed files with 706 additions and 147 deletions

View File

@@ -31,6 +31,11 @@ func (c *Cluster) ValidateCluster() error {
return err
}
// validate Ingress options
if err := validateIngressOptions(c); err != nil {
return err
}
// validate services options
return validateServicesOptions(c)
}
@@ -91,3 +96,11 @@ func validateServicesOptions(c *Cluster) error {
}
return nil
}
func validateIngressOptions(c *Cluster) error {
// Should be changed when adding more ingress types
if c.Ingress.Type != DefaultIngressController && c.Ingress.Type != "none" {
return fmt.Errorf("Ingress controller %s is incorrect", c.Ingress.Type)
}
return nil
}