Documentation ¶
Index ¶
Constants ¶
View Source
const ( // K8s config kinds. ClusterRoleKind = "ClusterRole" ClusterRoleBindingKind = "ClusterRoleBinding" CronJobKind = "CronJob" DaemonSetKind = "DaemonSet" DeploymentKind = "Deployment" NamespaceKind = "Namespace" PodSecurityPolicyKind = "PodSecurityPolicy" RoleBindingKind = "RoleBinding" ServiceKind = "Service" ServiceAccountKind = "ServiceAccount" StatefulSetKind = "StatefulSet" // Unsupported kinds. BackendConfigKind = "BackendConfig" ClusterPodMonitoringKind = "ClusterPodMonitoring" ClusterRulesKind = "ClusterRules" ConfigMapKind = "ConfigMap" IngressKind = "Ingress" OperatorConfigKind = "OperatorConfig" PodDisruptionBudgetKind = "PodDisruptionBudget" StorageClassKind = "StorageClass" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ByteRange ¶
func SplitYAMLDocs ¶
SplitYAMLDocs splits the given YAML file contents into its component YAML documents. Returns the documents and their line ranges within the file.
type K8sConfigFile ¶
type K8sConfigFile struct { ClusterRole []*rbac.ClusterRole ClusterRoleBinding []*rbac.ClusterRoleBinding CronJob []*batch.CronJob DaemonSet []*apps.DaemonSet Deployment []*apps.Deployment Namespace []*core.Namespace PodSecurityPolicy []*policy.PodSecurityPolicy RoleBinding []*rbac.RoleBinding Service []*core.Service ServiceAccount []*core.ServiceAccount StatefulSet []*apps.StatefulSet }
func ParseK8sConfigFile ¶
func ParseK8sConfigFile(contents []byte) (*K8sConfigFile, map[interface{}]*ByteRange, error)
ParseK8sConfigFile parses the given config file contents and returns the configs it contains.
func ParseYamlDoc ¶
func ParseYamlDoc(yamlDoc []byte) (*K8sConfigFile, error)
ParseYamlDoc parses a single YAML document and returns the configs it contains.
Click to show internal directories.
Click to hide internal directories.