app

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GeneratePassword

func GeneratePassword(length int) []byte

Types

type Application

type Application struct {
	Client    kubernetes.Interface
	Config    *ApplicationConfig
	Resources []KubernetesResource
}

func NewApplication

func NewApplication(client kubernetes.Interface, config *ApplicationConfig, resources []KubernetesResource) *Application

func (*Application) Deploy

func (a *Application) Deploy() error

type ApplicationConfig

type ApplicationConfig struct {
	Name      string
	Labels    map[string]string
	Namespace string

	Pvc        PvcConfig
	Deployment DeploymentConfig
	Svc        SvcConfig
	Secret     SecretConfig
}

type DeploymentConfig

type DeploymentConfig struct {
	Replicas            int32
	Image               string
	ContainerPort       int32
	SelectorMatchLabels map[string]string
	Resources           corev1.ResourceRequirements

	EnvVars      []corev1.EnvVar
	Volumes      []corev1.Volume
	VolumeMounts []corev1.VolumeMount
}

type KubernetesResource

type KubernetesResource int
const (
	Deployment KubernetesResource = iota
	Service
	ConfigMap
	Secret
	PVC
)

type PvcConfig

type PvcConfig struct {
	AccessMode corev1.PersistentVolumeAccessMode
	Size       string
}

type SecretConfig

type SecretConfig struct {
	SecretName string
	SecretType corev1.SecretType
	SecretData map[string][]byte
}

type SvcConfig

type SvcConfig struct {
	Port             int32
	DisableClusterIP bool
}

Jump to

Keyboard shortcuts

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