Documentation ¶
Index ¶
- func EnsureCRD(...) error
- func EnsureClusterRole(clusterRoleInterface rbacv1types.ClusterRoleInterface, ...) error
- func EnsureClusterRoleBinding(clusterRoleBindingInterface rbacv1types.ClusterRoleBindingInterface, ...) error
- func EnsureConfigMap(configMapInterface corev1types.ConfigMapInterface, required *corev1.ConfigMap) error
- func EnsureDaemonSet(daemonSetInterface appsv1types.DaemonSetInterface, required *appsv1.DaemonSet) error
- func EnsureDeployment(deploymentInterface appsv1types.DeploymentInterface, ...) error
- func EnsureMutatingWebhookConfiguration(...) error
- func EnsureNamespace(namespaceInterface corev1types.NamespaceInterface, required *corev1.Namespace) error
- func EnsureRole(roleInterface rbacv1types.RoleInterface, required *rbacv1.Role) error
- func EnsureRoleBinding(roleBindingInterface rbacv1types.RoleBindingInterface, ...) error
- func EnsureSecret(secretInterface corev1types.SecretInterface, required *corev1.Secret) error
- func EnsureService(serviceInterface corev1types.ServiceInterface, required *corev1.Service) error
- func EnsureServiceAccount(serviceAccountInterface corev1types.ServiceAccountInterface, ...) error
- func KubernetesToYAML(data []interface{}) (string, error)
- func MergeStringMap(modified *bool, destination *map[string]string, required map[string]string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureCRD ¶
func EnsureCRD(customResourceDefinitionInterface apiextensionsv1beta1types.CustomResourceDefinitionInterface, required *apiextensionsv1beta1.CustomResourceDefinition) error
EnsureCRD checks does CRD already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and spec, and if they're not as expected updates the CRD.
func EnsureClusterRole ¶
func EnsureClusterRole(clusterRoleInterface rbacv1types.ClusterRoleInterface, required *rbacv1.ClusterRole) error
EnsureClusterRole checks does RBAC ClusterRole already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and rules, and if they're not as expected updates the ClusterRole.
func EnsureClusterRoleBinding ¶
func EnsureClusterRoleBinding(clusterRoleBindingInterface rbacv1types.ClusterRoleBindingInterface, required *rbacv1.ClusterRoleBinding) error
EnsureClusterRoleBinding checks does RBAC ClusterRoleBinding already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, role references, and subjects, and if they're not as expected updates the ClusterRoleBinding.
func EnsureConfigMap ¶
func EnsureConfigMap(configMapInterface corev1types.ConfigMapInterface, required *corev1.ConfigMap) error
EnsureConfigMap checks does ConfigMap already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and data, and if they're not as expected updates the ConfigMap.
func EnsureDaemonSet ¶
func EnsureDaemonSet(daemonSetInterface appsv1types.DaemonSetInterface, required *appsv1.DaemonSet) error
EnsureDaemonSet checks does DaemonSet already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and spec, and if they're not as expected updates the DaemonSet.
func EnsureDeployment ¶
func EnsureDeployment(deploymentInterface appsv1types.DeploymentInterface, required *appsv1.Deployment) error
EnsureDeployment checks does Deployment already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and spec, and if they're not as expected updates the Deployment.
func EnsureMutatingWebhookConfiguration ¶
func EnsureMutatingWebhookConfiguration(mutatingWebhookConfigurationInterface admissionregistrationv1beta1types.MutatingWebhookConfigurationInterface, required *admissionregistrationv1beta1.MutatingWebhookConfiguration) error
EnsureMutatingWebhookConfiguration checks does MutatingWebhookConfiguration already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and spec, and if they're not as expected updates the MutatingWebhookConfiguration.
func EnsureNamespace ¶
func EnsureNamespace(namespaceInterface corev1types.NamespaceInterface, required *corev1.Namespace) error
EnsureNamespace checks does Namespace already exists and creates it if it doesn't. If it already exists, the function compares labels and annotations, and if they're not as expected updates the Namespace.
func EnsureRole ¶
func EnsureRole(roleInterface rbacv1types.RoleInterface, required *rbacv1.Role) error
EnsureRole checks does RBAC Role already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and rules, and if they're not as expected updates the Role.
func EnsureRoleBinding ¶
func EnsureRoleBinding(roleBindingInterface rbacv1types.RoleBindingInterface, required *rbacv1.RoleBinding) error
EnsureRoleBinding checks does RBAC RoleBinding already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, role references, and subjects, and if they're not as expected updates the RoleBinding.
func EnsureSecret ¶
func EnsureSecret(secretInterface corev1types.SecretInterface, required *corev1.Secret) error
EnsureSecret checks does Secret already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and data, and if they're not as expected updates the Secret.
func EnsureService ¶
func EnsureService(serviceInterface corev1types.ServiceInterface, required *corev1.Service) error
EnsureService checks does Service already exists and creates it if it doesn't. If it already exists, the function compares labels, annotations, and spec, and if they're not as expected updates the Service.
func EnsureServiceAccount ¶
func EnsureServiceAccount(serviceAccountInterface corev1types.ServiceAccountInterface, required *corev1.ServiceAccount) error
EnsureServiceAccount checks does ServiceAccount already exists and creates it if it doesn't. If it already exists, the function compares labels and annotations, and if they're not as expected updates the ServiceAccount.
func KubernetesToYAML ¶
KubernetesToYAML properly encodes a list of resources as YAML. Straight up encoding as YAML leaves us with a non-standard data structure. Going through JSON eliminates the extra fields and keys and results in what you would expect to see. This function takes a slice of items to support creating a multi-document YAML string (separated with "---" between each item).
Types ¶
This section is empty.