convert

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LastAppliedAnnotationKey = "kubectl.kubernetes.io/last-applied-configuration"
	GeneratedByAnnotationKey = "openshift.io/generated-by"
	DeploymentConfigPodLabel = "deploymentconfig"
	DeploymentPodLabel       = "deployment"
)

Variables

View Source
var (
	OwnerReferenceWarning = &Warning{
		Name:        "OwnerReference",
		Path:        "metadata.ownerReferences",
		Description: "DeploymentConfigs with OwnerReferences set are managed by another process.",
	}
	UnsupportedFeatureTestWarning = &Warning{
		Name:        "UnsupportedFeature - Test",
		Path:        "spec.test",
		Description: "The test feature is not supported on Deployments.",
	}
	UnsupportedFeatureCustomWarning = &Warning{
		Name:        "UnsupportedFeature - Custom Strategy",
		Path:        "spec.strategy.type",
		Description: "The custom deployment strategy is not supported on Deployments.",
	}
	UnsupportedFeatureHooksWarning = &Warning{
		Name:        "UnsupportedFeature - Lifecycle Hooks",
		Path:        "spec.strategy.*Params.['pre','mid','post']",
		Description: "The LifeCycleHooks are not supported on Deployments.",
	}
	UnsupportedFeatureRollingIntervalSecondsWarning = &Warning{
		Name:        "UnsupportedFeature - Rolling IntervalSeconds ",
		Path:        "spec.strategy.RollingParams.IntervalSeconds",
		Description: "The IntervalSeconds setting is not supported on Deployments.",
	}
	UnsupportedFeatureRollingUpdatePeriodSecondsWarning = &Warning{
		Name:        "UnsupportedFeature - Rolling UpdatePeriodSeconds ",
		Path:        "spec.strategy.RollingParams.UpdatePeriodSeconds",
		Description: "The UpdatePeriodSeconds setting is not supported on Deployments.",
	}
	ChangedLabelWarning = &Warning{
		Name:        "Selector Labels Changed",
		Path:        "spec.selector",
		Description: "The Selector label 'deploymentconfig' will be changed to 'deployment'.",
	}
)

Functions

func LoadDC

func LoadDC(path string) (*ocappsv1.DeploymentConfig, error)

func ToDeploy

func ToDeploy(orig *ocappsv1.DeploymentConfig) (*appsv1.Deployment, error)

func ToOuput

func ToOuput(d *appsv1.Deployment, filetype string) ([]byte, error)

Types

type Warning

type Warning struct {
	Name        string
	Path        string
	Description string
}

func CheckFeatures

func CheckFeatures(orig *ocappsv1.DeploymentConfig) []*Warning

func (*Warning) Print added in v1.0.2

func (w *Warning) Print(level uint8)

Jump to

Keyboard shortcuts

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