Documentation ¶
Index ¶
- func EnsureCRD(...) error
- func EnsureClusterRole(clusterRolesClient rbacv1types.ClusterRoleInterface, ...) error
- func EnsureClusterRoleBinding(clusterRoleBindingsClient rbacv1types.ClusterRoleBindingInterface, ...) error
- func EnsureConfigMap(configMapsClient corev1types.ConfigMapInterface, required *corev1.ConfigMap) error
- func EnsureDaemonSet(daemonSetsClient appsv1types.DaemonSetInterface, required *appsv1.DaemonSet) error
- func EnsureDeployment(deploymentsClient appsv1types.DeploymentInterface, required *appsv1.Deployment) error
- func EnsureMutatingWebhookConfiguration(...) error
- func EnsureNamespace(namespacesClient corev1types.NamespaceInterface, required *corev1.Namespace) error
- func EnsurePodSecurityPolicy(podSecurityPolicyClient policyv1beta1types.PodSecurityPolicyInterface, ...) error
- func EnsureRole(rolesClient rbacv1types.RoleInterface, required *rbacv1.Role) error
- func EnsureRoleBinding(roleBindingsClient rbacv1types.RoleBindingInterface, ...) error
- func EnsureSecret(secretsClient corev1types.SecretInterface, required *corev1.Secret) error
- func EnsureService(servicesClient corev1types.ServiceInterface, required *corev1.Service) error
- func EnsureServiceAccount(serviceAccountsClient 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(customResourceDefinitionsClient 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(clusterRolesClient 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(clusterRoleBindingsClient 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(configMapsClient 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(daemonSetsClient 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(deploymentsClient 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(mutatingWebhookConfigurationsClient 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(namespacesClient 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 EnsurePodSecurityPolicy ¶ added in v0.3.0
func EnsurePodSecurityPolicy(podSecurityPolicyClient policyv1beta1types.PodSecurityPolicyInterface, required *policyv1beta1.PodSecurityPolicy) error
EnsurePodSecurityPolicy checks does PodSecurityPolicy 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 PodSecurityPolicy.
func EnsureRole ¶
func EnsureRole(rolesClient 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(roleBindingsClient 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(secretsClient 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(servicesClient 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(serviceAccountsClient 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.