Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultDependsKindsGraph = map[string][]string{
"Namespace": {},
"ResourceQuota": {"Namespace"},
"StorageClass": {},
"CustomResourceDefinition": {},
"ServiceAccount": {"Namespace"},
"PodSecurityPolicy": {},
"Role": {"Namespace"},
"ClusterRole": {},
"RoleBinding": {"Namespace", "ServiceAccount", "Role"},
"ClusterRoleBinding": {"ServiceAccount", "ClusterRole"},
"ConfigMap": {"Namespace"},
"Secret": {"Namespace"},
"Endpoints": {"Namespace"},
"Service": {"Namespace", "Endpoints"},
"LimitRange": {"Namespace", "StorageClass"},
"PriorityClass": {},
"PersistentVolume": {"StorageClass"},
"PersistentVolumeClaim": {"Namespace", "ResourceQuota", "StorageClass", "PersistentVolume"},
"Deployment": {"Namespace", "ResourceQuota", "PersistentVolumeClaim", "ServiceAccount", "PodSecurityPolicy", "ConfigMap", "Secret", "Service", "LimitRange"},
"StatefulSet": {"Namespace", "ResourceQuota", "PersistentVolumeClaim", "ServiceAccount", "PodSecurityPolicy", "ConfigMap", "Secret", "Service", "LimitRange"},
"CronJob": {"Namespace", "ResourceQuota", "PersistentVolumeClaim", "ServiceAccount", "PodSecurityPolicy", "ConfigMap", "Secret", "Service", "LimitRange"},
"PodDisruptionBudget": {"Namespace", "Deployment", "StatefulSet", "CronJob"},
"MutatingWebhookConfiguration": {"Namespace", "ServiceAccount", "RoleBinding", "ClusterRoleBinding", "ConfigMap", "Secret", "Service"},
"ValidatingWebhookConfiguration": {"Namespace", "ServiceAccount", "RoleBinding", "ClusterRoleBinding", "ConfigMap", "Secret", "Service"},
}
DefaultDependsKindsGraph defines the default dependency relationships between Kubernetes resource kinds. This graph maps each resource kind to the list of resource kinds it potentially depends on (not strictly required, but commonly associated in practice).
Structure:
- Key: The resource kind (e.g., "Deployment")
- Value: Slice of resource kinds this resource may depend on
Example:
"Deployment": {"Namespace", "ServiceAccount", ...}
Functions ¶
func HasCycleInGraph ¶
HasCycleInGraph checks if there's a cycle in the dependency graph. Returns true if a cycle is detected, false otherwise.
func NamespaceResource ¶
NamespaceResource returns a Kubernetes Namespace resource wrapped into the form of Kusion Resource.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.