Documentation
¶
Index ¶
- Constants
- Variables
- func Annotations(obj ast.FileObject) status.Error
- func CRDName(obj ast.FileObject) status.Error
- func ClusterSelectorsForHierarchical(objs *fileobjects.Raw) status.MultiError
- func ClusterSelectorsForUnstructured(objs *fileobjects.Raw) status.MultiError
- func DeprecatedKinds(obj ast.FileObject) status.Error
- func Directory(obj ast.FileObject) status.Error
- func DisallowedFields(objs *fileobjects.Raw) status.MultiError
- func HNCLabels(obj ast.FileObject) status.Error
- func HasDepthSuffix(s string) bool
- func IllegalCRD(obj ast.FileObject) status.Error
- func IllegalKindsForHierarchical(obj ast.FileObject) status.Error
- func IllegalKindsForUnstructured(obj ast.FileObject) status.Error
- func IsInvalidAnnotation(k string) bool
- func IsInvalidLabel(k string) bool
- func Labels(obj ast.FileObject) status.Error
- func ManagementAnnotation(obj ast.FileObject) status.Error
- func Name(obj ast.FileObject) status.Error
- func Namespace(obj ast.FileObject) status.Error
- func RemovedCRDs(objs *fileobjects.Raw) status.MultiError
- func Repo(objs *fileobjects.Raw) status.MultiError
- func SelfReconcile(reconcilerName string) fileobjects.ObjectVisitor
- func SelfReconcileError(o client.Object) status.Error
Constants ¶
const OldAllowedRepoVersion = "0.1.0"
OldAllowedRepoVersion is the old (but still supported) Repo.Spec.Version.
Variables ¶
var SelfReconcileErrorCode = "1069"
SelfReconcileErrorCode is the code for an RootSync/RepoSync that reconciles itself.
Functions ¶
func Annotations ¶
func Annotations(obj ast.FileObject) status.Error
Annotations verifies that the given object does not have any invalid annotations.
func CRDName ¶
func CRDName(obj ast.FileObject) status.Error
CRDName returns an error if the CRD's name does not match the Kubernetes specification: https://kubernetes.io/docs/tasks/extend-kubernetes/custom-resources/custom-resource-definitions/
func ClusterSelectorsForHierarchical ¶
func ClusterSelectorsForHierarchical(objs *fileobjects.Raw) status.MultiError
ClusterSelectorsForHierarchical verifies that all ClusterSelectors have a unique name and are under the correct top-level directory. It also verifies that no invalid FileObjects are cluster-selected.
func ClusterSelectorsForUnstructured ¶
func ClusterSelectorsForUnstructured(objs *fileobjects.Raw) status.MultiError
ClusterSelectorsForUnstructured verifies that all ClusterSelectors have a unique name. It also verifies that no invalid FileObjects are cluster-selected.
func DeprecatedKinds ¶
func DeprecatedKinds(obj ast.FileObject) status.Error
DeprecatedKinds verifies that the given FileObject is not deprecated.
func Directory ¶
func Directory(obj ast.FileObject) status.Error
Directory verifies that the given FileObject is placed in a valid directory according to the following rules: - if the object is a Namespace, the directory must match its name - if the object has a metadata namespace, the directory must match it
func DisallowedFields ¶
func DisallowedFields(objs *fileobjects.Raw) status.MultiError
DisallowedFields verifies if the given Raw objects contain any fields which are not allowed to be declared in Git.
func HNCLabels ¶
func HNCLabels(obj ast.FileObject) status.Error
HNCLabels verifies that the given object does not have any HNC depth labels.
func HasDepthSuffix ¶
HasDepthSuffix returns true if the string ends with ".tree.hnc.x-k8s.io/depth".
func IllegalCRD ¶
func IllegalCRD(obj ast.FileObject) status.Error
IllegalCRD returns an error if the given FileObject is a CRD of a Config Sync type.
func IllegalKindsForHierarchical ¶
func IllegalKindsForHierarchical(obj ast.FileObject) status.Error
IllegalKindsForHierarchical verifies that the given FileObject is legal for a structured hierarchical repo.
func IllegalKindsForUnstructured ¶
func IllegalKindsForUnstructured(obj ast.FileObject) status.Error
IllegalKindsForUnstructured verifies that the given FileObject is legal for an unstructured repo.
func IsInvalidAnnotation ¶
IsInvalidAnnotation returns true if the annotation cannot be declared by users.
func IsInvalidLabel ¶
IsInvalidLabel returns true if the label cannot be declared by users.
func Labels ¶
func Labels(obj ast.FileObject) status.Error
Labels verifies that the given object does not have any invalid labels.
func ManagementAnnotation ¶
func ManagementAnnotation(obj ast.FileObject) status.Error
ManagementAnnotation returns an Error if the user-specified management annotation is invalid. The only valid value in the source is `disabled`.
func Name ¶
func Name(obj ast.FileObject) status.Error
Name verifies that the given FileObject has a valid name according to the following rules: - the object can not have an empty name - if the object is related to RBAC, its name must be a valid path segment - otherwise the object's name must be a valid DNS1123 subdomain
func Namespace ¶
func Namespace(obj ast.FileObject) status.Error
Namespace verifies that the given FileObject has a valid namespace according to the following rules: - if the object is a Namespace, it must not be `config-management-system` - if the object has a metadata namespace, it must be a valid k8s namespace
func RemovedCRDs ¶
func RemovedCRDs(objs *fileobjects.Raw) status.MultiError
RemovedCRDs verifies that the Raw objects do not remove any CRDs that still have CRs using them.
func Repo ¶
func Repo(objs *fileobjects.Raw) status.MultiError
Repo verifies that there is exactly one Repo object and that it has the correct version.
func SelfReconcile ¶
func SelfReconcile(reconcilerName string) fileobjects.ObjectVisitor
SelfReconcile checks if the given RootSync or RepoSync is the one that configures the reconciler.
Types ¶
This section is empty.
Source Files
¶
- annotation_validator.go
- cluster_selector_validator.go
- crd_name.go
- crd_removal_validator.go
- deprecated_kind_validator.go
- directory_validator.go
- disallowed_fields_validator.go
- hnc_validator.go
- illegal_crd_validator.go
- illegal_kind_validator.go
- label_validator.go
- management_annotation.go
- name_validator.go
- namespace_validator.go
- repo_validator.go
- self_reconcile_validator.go