Documentation ¶
Index ¶
- Constants
- func LivenessProbeToV1Probe(lp config.LivenessProbe) (*v1.Probe, error)
- func PrintList(objects []runtime.Object, opt ConvertOptions, additionalManifests []string, ...) error
- func ReadinessProbeToV1Probe(rp config.ReadinessProbe) (*v1.Probe, error)
- func ToUnstructured(o runtime.Object) (map[string]interface{}, error)
- type ConvertOptions
- type EnvSort
- type K8s
- type Kubernetes
- type ProjectService
- type Volumes
Constants ¶
const ( // Name of the converter Name = "kubernetes" // MultiFileSubDir is default output directory name for kubernetes manifests MultiFileSubDir = "k8s" )
const ( Selector = "service" NetworkLabel = "network" )
Selector used as labels and selector
const DefaultIngressBackendKeyword = "default"
Variables ¶
This section is empty.
Functions ¶
func LivenessProbeToV1Probe ¶ added in v0.5.0
func LivenessProbeToV1Probe(lp config.LivenessProbe) (*v1.Probe, error)
func PrintList ¶
func PrintList(objects []runtime.Object, opt ConvertOptions, additionalManifests []string, rendered map[string][]byte) error
PrintList prints k8s objects @orig: https://github.com/kubernetes/kompose/blob/master/pkg/transformer/kubernetes/k8sutils.go#L153
func ReadinessProbeToV1Probe ¶ added in v0.5.0
func ReadinessProbeToV1Probe(rp config.ReadinessProbe) (*v1.Probe, error)
Types ¶
type ConvertOptions ¶
type ConvertOptions struct { ToStdout bool // Display output to STDOUT CreateChart bool // Create K8s manifests as Chart GenerateJSON bool // Generate outcome as JSON. By defaults YAML gets generated. EmptyVols bool // Treat all referenced volumes as Empty volumes Volumes string // Volumes to be generated ("persistentVolumeClaim"|"emptyDir"|"hostPath"|"configMap") (default "persistentVolumeClaim") InputFiles []string // Compose files to be processed OutFile string // If Directory output will be split into individual files YAMLIndent int // YAML Indentation in resultant K8s manifests }
ConvertOptions holds all options that controls transformation process
type EnvSort ¶
EnvSort struct
func (EnvSort) Len ¶
Len returns the number of elements in the collection. @orig: https://github.com/kubernetes/kompose/blob/master/pkg/transformer/utils.go#L214-L228
type Kubernetes ¶
type Kubernetes struct { Opt ConvertOptions // user provided options from the command line Project *composego.Project // docker compose project Excluded []string // docker compose service names that should be excluded UI kmd.UI }
Kubernetes transformer
func (*Kubernetes) Transform ¶
func (k *Kubernetes) Transform() ([]runtime.Object, error)
Transform converts compose project to set of k8s objects returns object that are already sorted in the way that Services are first @orig: https://github.com/kubernetes/kompose/blob/master/pkg/transformer/kubernetes/kubernetes.go#L1140
type ProjectService ¶
type ProjectService struct { composego.ServiceConfig SvcK8sConfig config.SvcK8sConfig }
ProjectService is a wrapper type around composego.ServiceConfig
func NewProjectService ¶ added in v0.5.0
func NewProjectService(svc composego.ServiceConfig) (ProjectService, error)
func (*ProjectService) LivenessProbe ¶ added in v0.5.0
func (p *ProjectService) LivenessProbe() (*v1.Probe, error)
func (*ProjectService) ReadinessProbe ¶ added in v0.5.0
func (p *ProjectService) ReadinessProbe() (*v1.Probe, error)
type Volumes ¶
type Volumes struct { SvcName string // Service name to which volume is linked MountPath string // Mountpath extracted from docker-compose file VFrom string // denotes service name from which volume is coming VolumeName string // name of volume if provided explicitly Host string // host machine address Container string // Mountpath Mode string // access mode for volume PVCName string // name of PVC PVCSize string // PVC size StorageClass string // PVC storage class SelectorValue string // Value of the label selector }
Volumes holds the container volume struct