Documentation ¶
Index ¶
- func ApplyResource(ctx context.Context, cli client.Client, obj client.Object, ...) error
- func ConvertToTyped(uns []*unstructured.Unstructured) []runtime.Object
- func CorrectNamespaces[T client.Object](cli client.Client, defaultNamespace string, list []T)
- func CorrectNamespacesForRefrences(cli client.Client, defaultns string, list []v1beta1.ManagedResource)
- func EqualMapValues(a, b map[string]interface{}) bool
- func IsCRD(obj client.Object) bool
- func IsSkipedOn(obj client.Object, key string) bool
- func NamespacedScopeOf(cli client.Client, obj runtime.Object) (apimeta.RESTScopeName, error)
- func NamespacedScopeOfGVK(cli client.Client, gvk schema.GroupVersionKind) (apimeta.RESTScopeName, error)
- func ReadObjectsFromFile[T runtime.Object](path string) ([]T, error)
- func SplitYAML(data []byte) ([]*unstructured.Unstructured, error)
- func SplitYAMLFilterd[T runtime.Object](raw io.Reader) ([]T, error)
- type Apply
- type ApplyOptions
- type DiffResult
- type SyncOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyResource ¶
func ConvertToTyped ¶
func ConvertToTyped(uns []*unstructured.Unstructured) []runtime.Object
func CorrectNamespaces ¶
func CorrectNamespacesForRefrences ¶
func CorrectNamespacesForRefrences(cli client.Client, defaultns string, list []v1beta1.ManagedResource)
func EqualMapValues ¶
func NamespacedScopeOf ¶
func NamespacedScopeOfGVK ¶
func NamespacedScopeOfGVK(cli client.Client, gvk schema.GroupVersionKind) (apimeta.RESTScopeName, error)
func SplitYAML ¶
func SplitYAML(data []byte) ([]*unstructured.Unstructured, error)
Types ¶
type Apply ¶
func (*Apply) Sync ¶
func (a *Apply) Sync(ctx context.Context, defaultnamespace string, managed []v1beta1.ManagedResource, resources []*unstructured.Unstructured, options *SyncOptions, ) ([]v1beta1.ManagedResource, error)
func (*Apply) SyncDiff ¶
func (a *Apply) SyncDiff(ctx context.Context, diff DiffResult, options *SyncOptions) ([]v1beta1.ManagedResource, error)
type ApplyOptions ¶
type DiffResult ¶
type DiffResult struct { Creats []*unstructured.Unstructured Applys []*unstructured.Unstructured Removes []*unstructured.Unstructured }
func Diff ¶
func Diff(managed []v1beta1.ManagedResource, resources []*unstructured.Unstructured) DiffResult
func DiffWithDefaultNamespace ¶
func DiffWithDefaultNamespace( cli client.Client, defaultnamespace string, managed []v1beta1.ManagedResource, resources []*unstructured.Unstructured, ) DiffResult
type SyncOptions ¶
func NewDefaultSyncOptions ¶
func NewDefaultSyncOptions() *SyncOptions
Click to show internal directories.
Click to hide internal directories.