configgen

package
v0.1.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyYAML added in v0.1.3

func ApplyYAML(clientset *kubernetes.Clientset, namespace string, yamlContent string, config *rest.Config) error

func CollectEnvVars added in v0.1.3

func CollectEnvVars(reader *bufio.Reader) map[string]string

func EnsureNamespace added in v0.1.3

func EnsureNamespace(clientset *kubernetes.Clientset, namespace string) error

func GenerateDeploymentYAML

func GenerateDeploymentYAML(config DeploymentConfig) (string, error)

GenerateDeploymentYAML uses the DeploymentConfig to generate a Kubernetes Deployment configuration in YAML format

func GeneratePodYAML

func GeneratePodYAML(config PodConfig) (string, error)

GeneratePodYAML uses the PodConfig to generate a Kubernetes Pod configuration in YAML format

func HandleDeploymentOrSave added in v0.1.3

func HandleDeploymentOrSave(clientset *kubernetes.Clientset, namespace string, yamlContent string, config *rest.Config, reader *bufio.Reader)

func RunGenerate added in v0.1.3

func RunGenerate(cmd *cobra.Command, args []string)

Types

type DeploymentConfig

type DeploymentConfig struct {
	DeploymentName string
	Namespace      string
	Replicas       string
	ContainerName  string
	ImageName      string
	Port           int32
	EnvVars        map[string]string
}

DeploymentConfig holds the configuration details for a Kubernetes Deployment

type PodConfig

type PodConfig struct {
	AppName   string
	Namespace string
	ImageName string
	Port      int32
	EnvVars   map[string]string
}

PodConfig holds the configuration details for a Kubernetes pod

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL