Documentation
¶
Index ¶
- func ApplyCRSpec(ctx context.Context, restConfig *rest.Config, object *GenericObject, ...) error
- func ApplyOwnership(manifest string, controllerRollout *v1alpha1.NumaflowControllerRollout) ([]byte, error)
- func CreateCR(ctx context.Context, restConfig *rest.Config, object *GenericObject, ...) error
- func GetNumaplaneInstanceLabel(un *unstructured.Unstructured, key string) (string, error)
- func GetResource(ctx context.Context, restConfig *rest.Config, object *GenericObject, ...) (*unstructured.Unstructured, error)
- func GetSecret(ctx context.Context, client k8sClient.Client, namespace, secretName string) (*corev1.Secret, error)
- func IsValidKubernetesManifestFile(fileName string) bool
- func IsValidKubernetesNamespace(name string) bool
- func NewKubectl() kube.Kubectl
- func ObjectToUnstructured(object *GenericObject) (*unstructured.Unstructured, error)
- func SetAnnotation(obj metav1.Object, key, value string)
- func SetNumaplaneInstanceLabel(target *unstructured.Unstructured, key, val string) error
- func StartConfigMapWatcher(ctx context.Context, config *rest.Config) error
- type GenericObject
- type GenericStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyCRSpec ¶
func ApplyCRSpec(ctx context.Context, restConfig *rest.Config, object *GenericObject, pluralName string, shouldUpdateCR bool) error
ApplyCRSpec either creates or updates an object identified by the RawExtension, using the new definition, first checking to see if there's a difference in Spec before applying TODO: use CreateCR and UpdateCR instead
func ApplyOwnership ¶
func ApplyOwnership(manifest string, controllerRollout *v1alpha1.NumaflowControllerRollout) ([]byte, error)
func GetNumaplaneInstanceLabel ¶
func GetNumaplaneInstanceLabel(un *unstructured.Unstructured, key string) (string, error)
GetNumaplaneInstanceLabel returns the application instance name from label
func GetResource ¶
func GetResource( ctx context.Context, restConfig *rest.Config, object *GenericObject, pluralName string, ) (*unstructured.Unstructured, error)
func GetSecret ¶
func GetSecret(ctx context.Context, client k8sClient.Client, namespace, secretName string) (*corev1.Secret, error)
GetSecret gets secret using the kubernetes client
func NewKubectl ¶
func ObjectToUnstructured ¶
func ObjectToUnstructured(object *GenericObject) (*unstructured.Unstructured, error)
func SetAnnotation ¶
func SetNumaplaneInstanceLabel ¶
func SetNumaplaneInstanceLabel(target *unstructured.Unstructured, key, val string) error
SetNumaplaneInstanceLabel sets the recommended app.kubernetes.io/instance label against an unstructured object
Types ¶
type GenericObject ¶
type GenericObject struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec runtime.RawExtension `json:"spec"` Status runtime.RawExtension `json:"status,omitempty"` }
func GetCR ¶
func GetCR(ctx context.Context, restConfig *rest.Config, object *GenericObject, pluralName string) (*GenericObject, error)
look up a Resource
func UnstructuredToObject ¶
func UnstructuredToObject(u *unstructured.Unstructured) (*GenericObject, error)
type GenericStatus ¶
type GenericStatus struct { Phase string `json:"phase,omitempty"` Conditions []metav1.Condition `json:"conditions,omitempty"` }
func ParseStatus ¶
func ParseStatus(obj *GenericObject) (GenericStatus, error)
Click to show internal directories.
Click to hide internal directories.