forked from LaconicNetwork/kompose
* fix: support host port and protocol in functional tests * feat: add kompose client with options Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * test: add options unit tests Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * feat: add partial convert options Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * feat: finish convert process Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * test: finish unit tests of the kompose client Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * remove unecessary changes Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * feat: add generate network policies to client Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> * update go mod Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com> --------- Signed-off-by: AhmedGrati <ahmedgrati1999@gmail.com>
70 lines
1.4 KiB
Go
70 lines
1.4 KiB
Go
package client
|
|
|
|
type ConvertBuild string
|
|
|
|
const (
|
|
LOCAL ConvertBuild = "local"
|
|
BUILD_CONFIG ConvertBuild = "build-config"
|
|
NONE ConvertBuild = "none"
|
|
)
|
|
|
|
type KubernetesController string
|
|
|
|
const (
|
|
DEPLOYMENT KubernetesController = "deployment"
|
|
DAEMONSET KubernetesController = "daemonSet"
|
|
REPLICATION_CONTROLLER KubernetesController = "replicationController"
|
|
)
|
|
|
|
type ServiceGroupMode string
|
|
|
|
const (
|
|
LABEL ServiceGroupMode = "label"
|
|
VOLUME ServiceGroupMode = "volume"
|
|
)
|
|
|
|
type VolumeType string
|
|
|
|
const (
|
|
PVC = "persistentVolumeClaim"
|
|
EMPTYDIR = "emptyDir"
|
|
HOSTPATH = "hostPath"
|
|
CONFIGMAP = "configMap"
|
|
)
|
|
|
|
type ConvertOptions struct {
|
|
Build *string
|
|
PushImage bool
|
|
PushImageRegistry string
|
|
GenerateJson bool
|
|
ToStdout bool
|
|
OutFile string
|
|
Replicas *int
|
|
VolumeType *string
|
|
PvcRequestSize string
|
|
WithKomposeAnnotations *bool
|
|
InputFiles []string
|
|
Provider
|
|
GenerateNetworkPolicies bool
|
|
}
|
|
|
|
type Provider interface{}
|
|
|
|
type Kubernetes struct {
|
|
Provider
|
|
Chart bool
|
|
Controller *string
|
|
MultiContainerMode bool
|
|
ServiceGroupMode *string
|
|
ServiceGroupName string
|
|
SecretsAsFiles bool
|
|
}
|
|
|
|
type Openshift struct {
|
|
Provider
|
|
DeploymentConfig bool
|
|
InsecureRepository bool
|
|
BuildRepo string
|
|
BuildBranch string
|
|
}
|