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:
@@ -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
|
||||
}
|
||||
|
Reference in New Issue
Block a user