Documentation ¶
Index ¶
- func ApplyAPIService(client apiregistrationv1client.APIServicesGetter, recorder events.Recorder, ...) (*apiregistrationv1.APIService, bool, error)
- func ApplyClusterRole(client rbacclientv1.ClusterRolesGetter, recorder events.Recorder, ...) (*rbacv1.ClusterRole, bool, error)
- func ApplyClusterRoleBinding(client rbacclientv1.ClusterRoleBindingsGetter, recorder events.Recorder, ...) (*rbacv1.ClusterRoleBinding, bool, error)
- func ApplyConfigMap(client coreclientv1.ConfigMapsGetter, recorder events.Recorder, ...) (*corev1.ConfigMap, bool, error)
- func ApplyCustomResourceDefinition(client apiextclientv1beta1.CustomResourceDefinitionsGetter, ...) (*apiextv1beta1.CustomResourceDefinition, bool, error)
- func ApplyDaemonSet(client appsclientv1.DaemonSetsGetter, recorder events.Recorder, ...) (*appsv1.DaemonSet, bool, error)
- func ApplyDeployment(client appsclientv1.DeploymentsGetter, recorder events.Recorder, ...) (*appsv1.Deployment, bool, error)
- func ApplyNamespace(client coreclientv1.NamespacesGetter, recorder events.Recorder, ...) (*corev1.Namespace, bool, error)
- func ApplyPod(client coreclientv1.PodsGetter, recorder events.Recorder, required *corev1.Pod) (*corev1.Pod, bool, error)
- func ApplyRole(client rbacclientv1.RolesGetter, recorder events.Recorder, ...) (*rbacv1.Role, bool, error)
- func ApplyRoleBinding(client rbacclientv1.RoleBindingsGetter, recorder events.Recorder, ...) (*rbacv1.RoleBinding, bool, error)
- func ApplySecret(client coreclientv1.SecretsGetter, recorder events.Recorder, ...) (*corev1.Secret, bool, error)
- func ApplyService(client coreclientv1.ServicesGetter, recorder events.Recorder, ...) (*corev1.Service, bool, error)
- func ApplyServiceAccount(client coreclientv1.ServiceAccountsGetter, recorder events.Recorder, ...) (*corev1.ServiceAccount, bool, error)
- func ApplyServiceMonitor(client dynamic.Interface, recorder events.Recorder, serviceMonitorBytes []byte) (bool, error)
- func ApplyStorageClass(client storageclientv1.StorageClassesGetter, recorder events.Recorder, ...) (*storagev1.StorageClass, bool, error)
- func JSONPatch(original, modified runtime.Object) string
- func JSONPatchSecret(original, modified *corev1.Secret) string
- func SyncConfigMap(client coreclientv1.ConfigMapsGetter, recorder events.Recorder, ...) (*corev1.ConfigMap, bool, error)
- func SyncSecret(client coreclientv1.SecretsGetter, recorder events.Recorder, ...) (*corev1.Secret, bool, error)
- type ApplyResult
- type AssetFunc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyAPIService ¶
func ApplyAPIService(client apiregistrationv1client.APIServicesGetter, recorder events.Recorder, required *apiregistrationv1.APIService) (*apiregistrationv1.APIService, bool, error)
ApplyAPIService merges objectmeta and requires apiservice coordinates. It does not touch CA bundles, which should be managed via service CA controller.
func ApplyClusterRole ¶
func ApplyClusterRole(client rbacclientv1.ClusterRolesGetter, recorder events.Recorder, required *rbacv1.ClusterRole) (*rbacv1.ClusterRole, bool, error)
ApplyClusterRole merges objectmeta, requires rules, aggregation rules are not allowed for now.
func ApplyClusterRoleBinding ¶
func ApplyClusterRoleBinding(client rbacclientv1.ClusterRoleBindingsGetter, recorder events.Recorder, required *rbacv1.ClusterRoleBinding) (*rbacv1.ClusterRoleBinding, bool, error)
ApplyClusterRoleBinding merges objectmeta, requires subjects and role refs TODO on non-matching roleref, delete and recreate
func ApplyConfigMap ¶
func ApplyConfigMap(client coreclientv1.ConfigMapsGetter, recorder events.Recorder, required *corev1.ConfigMap) (*corev1.ConfigMap, bool, error)
ApplyConfigMap merges objectmeta, requires data
func ApplyCustomResourceDefinition ¶
func ApplyCustomResourceDefinition(client apiextclientv1beta1.CustomResourceDefinitionsGetter, recorder events.Recorder, required *apiextv1beta1.CustomResourceDefinition) (*apiextv1beta1.CustomResourceDefinition, bool, error)
ApplyCustomResourceDefinition applies the required CustomResourceDefinition to the cluster.
func ApplyDaemonSet ¶
func ApplyDaemonSet(client appsclientv1.DaemonSetsGetter, recorder events.Recorder, required *appsv1.DaemonSet, expectedGeneration int64, forceRollout bool) (*appsv1.DaemonSet, bool, error)
ApplyDaemonSet merges objectmeta and requires matching generation. It returns the final Object, whether any change as made, and an error
func ApplyDeployment ¶
func ApplyDeployment(client appsclientv1.DeploymentsGetter, recorder events.Recorder, required *appsv1.Deployment, expectedGeneration int64, forceRollout bool) (*appsv1.Deployment, bool, error)
ApplyDeployment merges objectmeta and requires matching generation. It returns the final Object, whether any change as made, and an error
func ApplyNamespace ¶
func ApplyNamespace(client coreclientv1.NamespacesGetter, recorder events.Recorder, required *corev1.Namespace) (*corev1.Namespace, bool, error)
ApplyNamespace merges objectmeta, does not worry about anything else
func ApplyPod ¶
func ApplyPod(client coreclientv1.PodsGetter, recorder events.Recorder, required *corev1.Pod) (*corev1.Pod, bool, error)
ApplyPod merges objectmeta, does not worry about anything else
func ApplyRole ¶
func ApplyRole(client rbacclientv1.RolesGetter, recorder events.Recorder, required *rbacv1.Role) (*rbacv1.Role, bool, error)
ApplyRole merges objectmeta, requires rules
func ApplyRoleBinding ¶
func ApplyRoleBinding(client rbacclientv1.RoleBindingsGetter, recorder events.Recorder, required *rbacv1.RoleBinding) (*rbacv1.RoleBinding, bool, error)
ApplyRoleBinding merges objectmeta, requires subjects and role refs TODO on non-matching roleref, delete and recreate
func ApplySecret ¶
func ApplySecret(client coreclientv1.SecretsGetter, recorder events.Recorder, required *corev1.Secret) (*corev1.Secret, bool, error)
ApplySecret merges objectmeta, requires data
func ApplyService ¶
func ApplyService(client coreclientv1.ServicesGetter, recorder events.Recorder, required *corev1.Service) (*corev1.Service, bool, error)
ApplyService merges objectmeta and requires TODO, since this cannot determine whether changes are due to legitimate actors (api server) or illegitimate ones (users), we cannot update TODO I've special cased the selector for now
func ApplyServiceAccount ¶
func ApplyServiceAccount(client coreclientv1.ServiceAccountsGetter, recorder events.Recorder, required *corev1.ServiceAccount) (*corev1.ServiceAccount, bool, error)
ApplyServiceAccount merges objectmeta, does not worry about anything else
func ApplyServiceMonitor ¶
func ApplyServiceMonitor(client dynamic.Interface, recorder events.Recorder, serviceMonitorBytes []byte) (bool, error)
ApplyServiceMonitor applies the Prometheus service monitor.
func ApplyStorageClass ¶
func ApplyStorageClass(client storageclientv1.StorageClassesGetter, recorder events.Recorder, required *storagev1.StorageClass) (*storagev1.StorageClass, bool, error)
ApplyStorageClass merges objectmeta, tries to write everything else
func JSONPatch ¶
JSONPatch generates a JSON patch between original and modified objects and return the JSON as a string. In case of error, the returned string will contain the error messages.
func JSONPatchSecret ¶
JSONPatchSecret generates a JSON patch between original and modified secrets, hiding its data, and return the JSON as a string. In case of error, the returned string will contain the error messages.
func SyncConfigMap ¶
func SyncConfigMap(client coreclientv1.ConfigMapsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, ownerRefs []metav1.OwnerReference) (*corev1.ConfigMap, bool, error)
func SyncSecret ¶
func SyncSecret(client coreclientv1.SecretsGetter, recorder events.Recorder, sourceNamespace, sourceName, targetNamespace, targetName string, ownerRefs []metav1.OwnerReference) (*corev1.Secret, bool, error)
Types ¶
type ApplyResult ¶
func ApplyDirectly ¶
func ApplyDirectly(kubeClient kubernetes.Interface, recorder events.Recorder, manifests AssetFunc, files ...string) []ApplyResult
ApplyDirectly applies the given manifest files to API server.