Documentation
¶
Overview ¶
Package conversion provides types and functions to convert older API versions of dependency descriptors (v1alpha1, v1alpha3) to the current v1 format.
Index ¶
Constants ¶
const APIVersionV1 = "kp.kpack.io/v1"
const APIVersionV1Alpha1 = "kp.kpack.io/v1alpha1"
const APIVersionV1Alpha3 = "kp.kpack.io/v1alpha3"
APIVersionV1Alpha3 is the API version string for v1alpha3 descriptors
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterBuilder ¶
type ClusterBuilder struct {
Name string `yaml:"name" json:"name"`
ClusterStack string `yaml:"clusterStack" json:"clusterStack"`
ClusterStore string `yaml:"clusterStore" json:"clusterStore"`
Order []v1alpha2.BuilderOrderEntry `yaml:"order" json:"order"`
}
ClusterBuilder represents a ClusterBuilder in the descriptor (v1alpha3+)
type ClusterBuilderV1Alpha1 ¶
type ClusterBuilderV1Alpha1 struct {
Name string `yaml:"name"`
Stack string `yaml:"stack"`
Store string `yaml:"store"`
Order []corev1alpha1.OrderEntry `yaml:"order"`
}
type ClusterBuildpack ¶
type ClusterBuildpack struct {
Name string `yaml:"name" json:"name"`
Image string `yaml:"image" json:"image"`
}
ClusterBuildpack represents a ClusterBuildpack in the v1 descriptor
type ClusterLifecycle ¶
type ClusterLifecycle struct {
Name string `yaml:"name" json:"name"`
Image string `yaml:"image" json:"image"`
}
ClusterLifecycle represents a ClusterLifecycle in the v1 descriptor
type ClusterStack ¶
type ClusterStack struct {
Name string `yaml:"name" json:"name"`
BuildImage Source `yaml:"buildImage" json:"buildImage"`
RunImage Source `yaml:"runImage" json:"runImage"`
}
ClusterStack represents a ClusterStack in the descriptor
type ClusterStore ¶
type ClusterStore struct {
Name string `yaml:"name" json:"name"`
Sources []Source `yaml:"sources" json:"sources"`
}
ClusterStore represents a ClusterStore in the descriptor
type DependencyDescriptor ¶
type DependencyDescriptor struct {
APIVersion string `yaml:"apiVersion" json:"apiVersion"`
Kind string `yaml:"kind" json:"kind"`
DefaultClusterLifecycle string `yaml:"defaultClusterLifecycle,omitempty" json:"defaultClusterLifecycle,omitempty"`
DefaultClusterBuildpack string `yaml:"defaultClusterBuildpack,omitempty" json:"defaultClusterBuildpack,omitempty"`
DefaultClusterStack string `yaml:"defaultClusterStack,omitempty" json:"defaultClusterStack,omitempty"`
DefaultClusterBuilder string `yaml:"defaultClusterBuilder,omitempty" json:"defaultClusterBuilder,omitempty"`
ClusterLifecycles []ClusterLifecycle `yaml:"clusterLifecycles,omitempty" json:"clusterLifecycles,omitempty"`
ClusterBuildpacks []ClusterBuildpack `yaml:"clusterBuildpacks,omitempty" json:"clusterBuildpacks,omitempty"`
ClusterStores []ClusterStore `yaml:"clusterStores,omitempty" json:"clusterStores,omitempty"`
ClusterStacks []ClusterStack `yaml:"clusterStacks,omitempty" json:"clusterStacks,omitempty"`
ClusterBuilders []ClusterBuilder `yaml:"clusterBuilders,omitempty" json:"clusterBuilders,omitempty"`
}
DependencyDescriptor represents the target v1 format that all conversions produce
type DependencyDescriptorV1Alpha1 ¶
type DependencyDescriptorV1Alpha1 struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
DefaultStack string `yaml:"defaultStack"`
DefaultClusterBuilder string `yaml:"defaultClusterBuilder"`
Stores []ClusterStore `yaml:"stores"`
Stacks []ClusterStack `yaml:"stacks"`
ClusterBuilders []ClusterBuilderV1Alpha1 `yaml:"clusterBuilders"`
}
DependencyDescriptorV1Alpha1 represents the v1alpha1 format of the dependency descriptor
func (DependencyDescriptorV1Alpha1) ToV1 ¶
func (d1 DependencyDescriptorV1Alpha1) ToV1() DependencyDescriptor
ToV1 converts a v1alpha1 descriptor to the v1 format
type DependencyDescriptorV1Alpha3 ¶
type DependencyDescriptorV1Alpha3 struct {
APIVersion string `yaml:"apiVersion"`
Kind string `yaml:"kind"`
DefaultClusterStack string `yaml:"defaultClusterStack"`
DefaultClusterBuilder string `yaml:"defaultClusterBuilder"`
Lifecycle Lifecycle `yaml:"lifecycle"`
ClusterStores []ClusterStore `yaml:"clusterStores"`
ClusterStacks []ClusterStack `yaml:"clusterStacks"`
ClusterBuilders []ClusterBuilder `yaml:"clusterBuilders"`
}
DependencyDescriptorV1Alpha3 represents the v1alpha3 format of the dependency descriptor
func (DependencyDescriptorV1Alpha3) ToV1 ¶
func (d DependencyDescriptorV1Alpha3) ToV1() DependencyDescriptor
ToV1 converts a v1alpha3 descriptor to the v1 format