Documentation ¶
Index ¶
- Variables
- func MagicEnvVar(k, v string) *corev1.EnvVar
- func NewJobGenerator(generator *Generator) (modules.Generator, error)
- func NewJobGeneratorFunc(generator *Generator) modules.NewGeneratorFunc
- func NewWorkloadGeneratorFunc(g *Generator) modules.NewGeneratorFunc
- func NewWorkloadServiceGenerator(request *Generator) (modules.Generator, error)
- func NewWorkloadServiceGeneratorFunc(workloadGenerator *Generator) modules.NewGeneratorFunc
- type Generator
- type MagicEnvParser
- type ServiceGenerator
Constants ¶
This section is empty.
Variables ¶
View Source
var ( SecretEnvParser = NewSecretEnvParser() RawEnvParser = NewRawEnvParser() )
View Source
var ( ErrEmptySelectors = errors.New("selectors must not be empty") ErrInvalidPort = errors.New("port must be between 1 and 65535") ErrInvalidTargetPort = errors.New("targetPort must be between 1 and 65535 if exist") ErrInvalidProtocol = errors.New("protocol must be TCP or UDP") ErrDuplicatePortProtocol = errors.New("port-protocol pair must not be duplicate") )
Functions ¶
func MagicEnvVar ¶
MagicEnvVar generates a specialized EnvVar based on the key and value of environment.
Examples:
MagicEnvVar("secret_key", "secret://my_secret/my_key") MagicEnvVar("key", "value")
func NewJobGeneratorFunc ¶
func NewJobGeneratorFunc(generator *Generator) modules.NewGeneratorFunc
func NewWorkloadGeneratorFunc ¶
func NewWorkloadGeneratorFunc(g *Generator) modules.NewGeneratorFunc
func NewWorkloadServiceGenerator ¶
NewWorkloadServiceGenerator returns a new ServiceGenerator instance.
func NewWorkloadServiceGeneratorFunc ¶
func NewWorkloadServiceGeneratorFunc(workloadGenerator *Generator) modules.NewGeneratorFunc
NewWorkloadServiceGeneratorFunc returns a new NewGeneratorFunc that returns a ServiceGenerator instance.
Types ¶
type Generator ¶ added in v0.11.0
type Generator struct { // Project represents the Project name Project string // Stack represents the Stack name Stack string // App represents the application name App string // Namespace represents the K8s Namespace Namespace string // Workload represents the Workload configuration Workload *internalv1.Workload // PlatformConfigs represents the module platform configurations PlatformConfigs map[string]v1.GenericConfig // SecretStoreSpec contains configuration to describe target secret store. SecretStoreSpec *v1.SecretStoreSpec }
type MagicEnvParser ¶
MagicEnvParser is an interface for environment variable parsers.
func NewRawEnvParser ¶
func NewRawEnvParser() MagicEnvParser
NewRawEnvParser creates a new instance of RawEnvParser.
func NewSecretEnvParser ¶
func NewSecretEnvParser() MagicEnvParser
NewSecretEnvParser creates a new instance of SecretEnvParser.
type ServiceGenerator ¶ added in v0.11.0
type ServiceGenerator struct { Project string Stack string App string Namespace string Service *internalv1.Service Config apiv1.GenericConfig }
ServiceGenerator is a struct for generating Service Workload resources.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.