Documentation ¶
Index ¶
- Constants
- func Render(data interface{}, tpl string) (*unstructured.Unstructured, error)
- type ContainerModel
- type ContainerModelImpl
- func (c ContainerModelImpl) AddArgs(args ...string) ContainerModel
- func (c ContainerModelImpl) AddCommand(commands ...string) ContainerModel
- func (c ContainerModelImpl) AddEnvironment(name, value string) ContainerModel
- func (c ContainerModelImpl) AddResourceLimits(cpuLimit int64, memoryLimit int64, cpuRequest int64, memoryRequest int64) ContainerModel
- func (c ContainerModelImpl) AddResourceLimits2(cpuLimit string, memoryLimit string, cpuRequest string, memoryRequest string) ContainerModel
- func (c ContainerModelImpl) AddVolumeMounts(name, mountPath, subPath string) ContainerModel
- func (c ContainerModelImpl) GetName() string
- func (c ContainerModelImpl) Set(name, image string)
- func (c ContainerModelImpl) SetImagePullPolicy(policy ImagePullPolicy) ContainerModel
- type ContainerModels
- type CoordinateModel
- type CoordinateModelImpl
- type CoordinateModels
- type Environments
- type ImagePullPolicy
- type Output
- type Protocol
- type ServiceModel
- type ServiceModelImpl
- type ServiceModels
- type ServiceType
- type TemplateModel
- type TemplateModelImpl
- func (d TemplateModelImpl) AddContainer(name, image string) ContainerModel
- func (d TemplateModelImpl) AddCoordinate(group string) CoordinateModel
- func (d TemplateModelImpl) AddImagePullSecrets(names ...string)
- func (d TemplateModelImpl) AddMetadata(namespace, name, uuid string) TemplateModel
- func (d TemplateModelImpl) AddService(name string, serviceType ServiceType) ServiceModel
- func (d TemplateModelImpl) AddVolumeClaimTemplate(metadataName, storageClass string, size int64)
- func (d TemplateModelImpl) AddVolumes(name string) VolumeModel
- type VolumeClaimTemplateModel
- type VolumeClaimTemplateModelImpl
- type VolumeClaimTemplateModels
- type VolumeModel
- type VolumeModelImpl
- type VolumeModels
- type VolumeMounts
Constants ¶
View Source
const ( StoneTpl = `` /* 4124-byte string literal not displayed */ DeploymentTpl = `` /* 2394-byte string literal not displayed */ ServiceTpl = `` /* 481-byte string literal not displayed */ )
View Source
const ( TCP Protocol = "tcp" UDP Protocol = "udp" IfNotPresent ImagePullPolicy = "IfNotPresent" Always ImagePullPolicy = "Always" ClusterIP ServiceType = "ClusterIP" NodePort ServiceType = "NodePort" )
Variables ¶
This section is empty.
Functions ¶
func Render ¶
func Render(data interface{}, tpl string) (*unstructured.Unstructured, error)
Types ¶
type ContainerModel ¶
type ContainerModel interface { AddCommand(commands ...string) ContainerModel AddArgs(args ...string) ContainerModel AddEnvironment(name, value string) ContainerModel AddResourceLimits(cpuLimit int64, memoryLimit int64, cpuRequest int64, memoryRequest int64) ContainerModel AddResourceLimits2(cpuLimit, memoryLimit, cpuRequest, memoryRequest string) ContainerModel AddVolumeMounts(name, mountPath, subPath string) ContainerModel SetImagePullPolicy(policy ImagePullPolicy) ContainerModel Set(name, image string) GetName() string }
type ContainerModelImpl ¶
type ContainerModelImpl map[string]interface{}
func NewContainerModelImpl ¶
func NewContainerModelImpl() ContainerModelImpl
func (ContainerModelImpl) AddArgs ¶
func (c ContainerModelImpl) AddArgs(args ...string) ContainerModel
func (ContainerModelImpl) AddCommand ¶
func (c ContainerModelImpl) AddCommand(commands ...string) ContainerModel
func (ContainerModelImpl) AddEnvironment ¶
func (c ContainerModelImpl) AddEnvironment(name, value string) ContainerModel
func (ContainerModelImpl) AddResourceLimits ¶
func (c ContainerModelImpl) AddResourceLimits(cpuLimit int64, memoryLimit int64, cpuRequest int64, memoryRequest int64) ContainerModel
func (ContainerModelImpl) AddResourceLimits2 ¶
func (c ContainerModelImpl) AddResourceLimits2(cpuLimit string, memoryLimit string, cpuRequest string, memoryRequest string) ContainerModel
func (ContainerModelImpl) AddVolumeMounts ¶
func (c ContainerModelImpl) AddVolumeMounts(name, mountPath, subPath string) ContainerModel
func (ContainerModelImpl) GetName ¶
func (c ContainerModelImpl) GetName() string
func (ContainerModelImpl) Set ¶
func (c ContainerModelImpl) Set(name, image string)
func (ContainerModelImpl) SetImagePullPolicy ¶
func (c ContainerModelImpl) SetImagePullPolicy(policy ImagePullPolicy) ContainerModel
type ContainerModels ¶
type ContainerModels []ContainerModel
func (ContainerModels) Get ¶
func (cs ContainerModels) Get(name string) ContainerModel
func (ContainerModels) Index ¶
func (cs ContainerModels) Index(c ContainerModel) int
func (*ContainerModels) Set ¶
func (cs *ContainerModels) Set(c ContainerModel)
type CoordinateModel ¶
type CoordinateModel interface { AddReplicas(n int) CoordinateModel AddZoneSet(zone, rack, host string) CoordinateModel GetName() string Set(name string) }
func NewCoordinateModel ¶
func NewCoordinateModel() CoordinateModel
type CoordinateModelImpl ¶
type CoordinateModelImpl map[string]interface{}
func (CoordinateModelImpl) AddReplicas ¶
func (c CoordinateModelImpl) AddReplicas(n int) CoordinateModel
func (CoordinateModelImpl) AddZoneSet ¶
func (c CoordinateModelImpl) AddZoneSet(zone, rack, host string) CoordinateModel
func (CoordinateModelImpl) GetName ¶
func (c CoordinateModelImpl) GetName() string
func (CoordinateModelImpl) Set ¶
func (c CoordinateModelImpl) Set(name string)
type CoordinateModels ¶
type CoordinateModels []CoordinateModel
func (CoordinateModels) Get ¶
func (s CoordinateModels) Get(name string) CoordinateModel
func (CoordinateModels) Index ¶
func (s CoordinateModels) Index(c CoordinateModel) int
func (*CoordinateModels) Set ¶
func (s *CoordinateModels) Set(c CoordinateModel)
type Environments ¶
func (*Environments) Set ¶
func (e *Environments) Set(name, value string)
type ImagePullPolicy ¶
type ImagePullPolicy = string
type ServiceModel ¶
type ServiceModel interface { AddServiceSpec2(protocol Protocol, port, targetPort string) AddServiceSpec(protocol Protocol, port int, targetPort int) AddServiceType(serviceType ServiceType) GetName() string }
func NewServiceModel ¶
func NewServiceModel() ServiceModel
type ServiceModelImpl ¶
func (ServiceModelImpl) AddServiceSpec ¶
func (s ServiceModelImpl) AddServiceSpec(protocol Protocol, port int, targetPort int)
func (ServiceModelImpl) AddServiceSpec2 ¶
func (s ServiceModelImpl) AddServiceSpec2(protocol Protocol, port, targetPort string)
func (ServiceModelImpl) AddServiceType ¶
func (s ServiceModelImpl) AddServiceType(serviceType ServiceType)
func (ServiceModelImpl) GetName ¶
func (s ServiceModelImpl) GetName() string
type ServiceModels ¶
type ServiceModels []ServiceModel
func (ServiceModels) Get ¶
func (s ServiceModels) Get(name string) ServiceModel
func (ServiceModels) Index ¶
func (s ServiceModels) Index(name string) int
func (*ServiceModels) Set ¶
func (s *ServiceModels) Set(name string, c ServiceModel)
type ServiceType ¶
type ServiceType = string
type TemplateModel ¶
type TemplateModel interface { AddMetadata(namespace, name, uuid string) TemplateModel AddContainer(name, image string) ContainerModel AddVolumes(name string) VolumeModel AddService(name string, serviceType ServiceType) ServiceModel AddCoordinate(group string) CoordinateModel AddImagePullSecrets(names ...string) AddVolumeClaimTemplate(metadataName, storageClass string, size int64) }
func NewTemplateModel ¶
func NewTemplateModel() TemplateModel
type TemplateModelImpl ¶
type TemplateModelImpl map[string]interface{}
func (TemplateModelImpl) AddContainer ¶
func (d TemplateModelImpl) AddContainer(name, image string) ContainerModel
func (TemplateModelImpl) AddCoordinate ¶
func (d TemplateModelImpl) AddCoordinate(group string) CoordinateModel
func (TemplateModelImpl) AddImagePullSecrets ¶
func (d TemplateModelImpl) AddImagePullSecrets(names ...string)
func (TemplateModelImpl) AddMetadata ¶
func (d TemplateModelImpl) AddMetadata(namespace, name, uuid string) TemplateModel
func (TemplateModelImpl) AddService ¶
func (d TemplateModelImpl) AddService(name string, serviceType ServiceType) ServiceModel
func (TemplateModelImpl) AddVolumeClaimTemplate ¶
func (d TemplateModelImpl) AddVolumeClaimTemplate(metadataName, storageClass string, size int64)
func (TemplateModelImpl) AddVolumes ¶
func (d TemplateModelImpl) AddVolumes(name string) VolumeModel
type VolumeClaimTemplateModel ¶
type VolumeClaimTemplateModel interface { AddVolumeClaimTemplate(metadataName, storageClass string, size int64) GetName() string }
func NewVolumeClaimTemplateModel ¶
func NewVolumeClaimTemplateModel() VolumeClaimTemplateModel
type VolumeClaimTemplateModelImpl ¶
func (VolumeClaimTemplateModelImpl) AddVolumeClaimTemplate ¶
func (v VolumeClaimTemplateModelImpl) AddVolumeClaimTemplate(metadataName, storageClass string, size int64)
func (VolumeClaimTemplateModelImpl) GetName ¶
func (v VolumeClaimTemplateModelImpl) GetName() string
type VolumeClaimTemplateModels ¶
type VolumeClaimTemplateModels []VolumeClaimTemplateModel
func (VolumeClaimTemplateModels) Get ¶
func (s VolumeClaimTemplateModels) Get(name string) VolumeClaimTemplateModel
func (VolumeClaimTemplateModels) Index ¶
func (s VolumeClaimTemplateModels) Index(c VolumeClaimTemplateModel) int
func (*VolumeClaimTemplateModels) Set ¶
func (s *VolumeClaimTemplateModels) Set(c VolumeClaimTemplateModel)
type VolumeModel ¶
type VolumeModel interface { AddConfigMap(itemName, itemKey, itemPath string) AddSecret(itemName, itemKey, itemPath string) SetName(string) VolumeModel GetName() string }
func NewVolumeModel ¶
func NewVolumeModel() VolumeModel
type VolumeModelImpl ¶
type VolumeModelImpl map[string]interface{}
func (VolumeModelImpl) AddConfigMap ¶
func (v VolumeModelImpl) AddConfigMap(itemName, itemKey, itemPath string)
func (VolumeModelImpl) AddSecret ¶
func (v VolumeModelImpl) AddSecret(itemName, itemKey, itemPath string)
func (VolumeModelImpl) GetName ¶
func (v VolumeModelImpl) GetName() string
func (VolumeModelImpl) SetName ¶
func (v VolumeModelImpl) SetName(name string) VolumeModel
type VolumeModels ¶
type VolumeModels []VolumeModel
func (VolumeModels) Get ¶
func (v VolumeModels) Get(name string) VolumeModel
func (VolumeModels) Index ¶
func (v VolumeModels) Index(c VolumeModel) int
func (*VolumeModels) Set ¶
func (v *VolumeModels) Set(c VolumeModel)
type VolumeMounts ¶
func (*VolumeMounts) Set ¶
func (e *VolumeMounts) Set(name, mountPath, subPath string)
Click to show internal directories.
Click to hide internal directories.