Documentation ¶
Index ¶
- Variables
- func Apply(ctx context.Context, c client.Client, obj *unstructured.Unstructured, ...) (patched *unstructured.Unstructured, err error)
- func GetUnstructured(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error)
- func IsGVKEqual(a, b schema.GroupVersionKind) bool
- func ListTemplatesByType(ctx context.Context, c client.Client, tmplTypes []string) ([]cosmov1alpha1.Template, error)
- func LooseDeepEqual(xObj, yObj Comparable, opts ...DeepEqualOption) bool
- func PodStatusReason(pod corev1.Pod) string
- func RemoveDynamicFields(obj Comparable)
- type Comparable
- type DeepEqualOption
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DeploymentGVK = schema.GroupVersionKind{ Group: appsv1.GroupName, Version: "v1", Kind: "Deployment", } ServiceGVK = schema.GroupVersionKind{ Group: corev1.GroupName, Version: "v1", Kind: "Service", } IngressGVK = schema.GroupVersionKind{ Group: netv1.GroupName, Version: "v1", Kind: "Ingress", } )
Functions ¶
func Apply ¶
func Apply(ctx context.Context, c client.Client, obj *unstructured.Unstructured, fieldManager string, dryrun, force bool) (patched *unstructured.Unstructured, err error)
func GetUnstructured ¶
func GetUnstructured(ctx context.Context, c client.Client, gvk schema.GroupVersionKind, name, namespace string) (*unstructured.Unstructured, error)
func IsGVKEqual ¶
func IsGVKEqual(a, b schema.GroupVersionKind) bool
func ListTemplatesByType ¶
func LooseDeepEqual ¶
func LooseDeepEqual(xObj, yObj Comparable, opts ...DeepEqualOption) bool
LooseDeepEqual deep equal objects without dynamic values
func PodStatusReason ¶
func RemoveDynamicFields ¶
func RemoveDynamicFields(obj Comparable)
Types ¶
type Comparable ¶
type Comparable interface { runtime.Object SetGroupVersionKind(gvk schema.GroupVersionKind) GetManagedFields() []metav1.ManagedFieldsEntry SetManagedFields(managedFields []metav1.ManagedFieldsEntry) SetResourceVersion(resourceVersion string) }
type DeepEqualOption ¶
type DeepEqualOption interface {
Apply(x, y Comparable)
}
func WithFixGVK ¶
func WithFixGVK(scheme *runtime.Scheme) DeepEqualOption
func WithPrintDiff ¶
func WithPrintDiff(w io.Writer) DeepEqualOption
Click to show internal directories.
Click to hide internal directories.