|
|
@ -104,8 +104,6 @@ func Templates(linter *support.Linter) {
|
|
|
|
if !validYaml {
|
|
|
|
if !validYaml {
|
|
|
|
continue
|
|
|
|
continue
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, path, validateNoNamespace(yamlStruct))
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -196,13 +194,6 @@ func validateYamlContent(err error) error {
|
|
|
|
return nil
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func validateNoNamespace(yamlStruct K8sYamlStruct) error {
|
|
|
|
|
|
|
|
if yamlStruct.Metadata.Namespace != "" {
|
|
|
|
|
|
|
|
return errors.New("namespace option is currently NOT supported")
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// K8sYamlStruct stubs a Kubernetes YAML file.
|
|
|
|
// K8sYamlStruct stubs a Kubernetes YAML file.
|
|
|
|
// Need to access for now to Namespace only
|
|
|
|
// Need to access for now to Namespace only
|
|
|
|
type K8sYamlStruct struct {
|
|
|
|
type K8sYamlStruct struct {
|
|
|
|