nativeconverters

package
v0.8.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 17, 2020 License: Apache-2.0 Imports: 9 Imported by: 0

README

Native Converters

This package is meant to convert the latest supported version of the API to the supported version of the Ververica Platform targeted by the Operator.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInvalidDeploymentState = errors.New("state must be one of: CANCELLED, RUNNING, TRANSITIONING, SUSPENDED, FINISHED, FAILED")
View Source
var ErrorInvalidNamespaceLifecyclePhase = errors.New("origin must be one of: LIFECYCLE_PHASE_ACTIVE, LIFECYCLE_PHASE_TERMINATING, UNRECOGNIZED, LIFECYCLE_PHASE_INVALID")

Functions

func DeploymentFromNative

func DeploymentFromNative(vpDeployment v1beta2.VpDeployment) (appmanagerapi.Deployment, error)

DeploymentFromNative converts a native K8s VpDeployment to the Ververica Platform's representation

func DeploymentMetadataFromNative

func DeploymentMetadataFromNative(vpMetadata v1beta2.VpMetadata) (appmanagerapi.DeploymentMetadata, error)

DeploymentMetadataFromNative converts a native K8s VpDeployment to the Ververica Platform's representation

func DeploymentMetadataToNative

func DeploymentMetadataToNative(deploymentMetadata appmanagerapi.DeploymentMetadata) (v1beta2.VpMetadata, error)

DeploymentMetadataToNative converts a Ververica Platform deployment into its native K8s representation

func DeploymentRunningStatusFromNative added in v0.7.1

func DeploymentRunningStatusFromNative(vpStatus *v1beta2.VpDeploymentRunningStatus) (*appmanagerapi.DeploymentStatusRunning, error)

DeploymentRunningStatusFromNative converts a native K8s VpDeployment to the Ververica Platform's representation

func DeploymentRunningStatusToNative added in v0.7.1

func DeploymentRunningStatusToNative(status *appmanagerapi.DeploymentStatusRunning) (*v1beta2.VpDeploymentRunningStatus, error)

DeploymentRunningStatusToNative converts a

func DeploymentSpecFromNative

func DeploymentSpecFromNative(vpDeploymentSpec v1beta2.VpDeploymentSpec) (appmanagerapi.DeploymentSpec, error)

DeploymentSpecFromNative converts a native K8s VpDeployment to the Ververica Platform's representation

func DeploymentSpecToNative

func DeploymentSpecToNative(deploymentSpec appmanagerapi.DeploymentSpec) (v1beta2.VpDeploymentSpec, error)

DeploymentSpecToNative converts a Ververica Platform deployment into its native K8s representation

func DeploymentStateFromNative

func DeploymentStateFromNative(vpState v1beta2.VpDeploymentState) (string, error)

DeploymentStateFromNative converts a native K8s VpDeployment to the Ververica Platform's representation

func DeploymentStateToNative

func DeploymentStateToNative(state string) (v1beta2.VpDeploymentState, error)

DeploymentStateToNative converts a Ververica Platform deployment into its native K8s representation

func DeploymentStatusFromNative added in v0.7.1

func DeploymentStatusFromNative(vpStatus *v1beta2.VpDeploymentStatus) (status *appmanagerapi.DeploymentStatus, err error)

DeploymentStatusFromNative converts a native K8s VpDeployment.Status to the Ververica Platform's representation

func DeploymentStatusToNative added in v0.7.1

func DeploymentStatusToNative(status *appmanagerapi.DeploymentStatus) (vpStatus *v1beta2.VpDeploymentStatus, err error)

DeploymentStatusToNative converts to a native K8s VpDeployment.Status from the Ververica Platform's representation

func NamespaceLifecyclePhaseFromNative

func NamespaceLifecyclePhaseFromNative(vpPhase v1beta1.NamespaceLifecyclePhase) (string, error)

func NamespaceLifecyclePhaseToNative

func NamespaceLifecyclePhaseToNative(phase string) (v1beta1.NamespaceLifecyclePhase, error)

func NamespaceRoleBindingsFromNative

func NamespaceRoleBindingsFromNative(nativeBindings []v1beta1.NamespaceRoleBinding) []platformapi.RoleBinding

func NamespaceRoleBindingsToNative

func NamespaceRoleBindingsToNative(bindings []platformapi.RoleBinding) []v1beta1.NamespaceRoleBinding

func ResourcesFromNative

func ResourcesFromNative(vpResources map[string]v1beta2.VpResourceSpec) (map[string]appmanagerapi.ResourceSpec, error)

ResourcesFromNative maps native K8s resources to Ververica Platform API ones

func ResourcesToNative

func ResourcesToNative(resources map[string]appmanagerapi.ResourceSpec) (map[string]v1beta2.VpResourceSpec, error)

ResourcesToNative maps Ververica Platform API resources to native K8s ones

func SavepointOriginFromNative

func SavepointOriginFromNative(vpSavepointOrigin v1beta1.SavepointOrigin) (string, error)

func SavepointOriginToNative

func SavepointOriginToNative(savepointOrigin string) (v1beta1.SavepointOrigin, error)

func SavepointStateFromNative

func SavepointStateFromNative(state v1beta1.SavepointState) (string, error)

func SavepointStateToNative

func SavepointStateToNative(state string) (v1beta1.SavepointState, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL