Help us shape the future of Go! Take the 2026 Go Developer Survey

resources

package
v0.87.0 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectSidecars

func InjectSidecars(podSpec *corev1.PodSpec, sidecars []*deploy.SidecarSpec)

InjectSidecars adds resolved sidecar containers into a pod template spec.

func NewConfigMap

func NewConfigMap(opts ConfigMapOpts) *corev1.ConfigMap

NewConfigMap builds a Kubernetes ConfigMap.

func NewDeployment

func NewDeployment(opts DeploymentOpts) *appsv1.Deployment

NewDeployment builds a Kubernetes Deployment from the given options.

func NewNamespace

func NewNamespace(name string, labels map[string]string) *corev1.Namespace

NewNamespace builds a Kubernetes Namespace.

func NewPVC

func NewPVC(opts PVCOpts) *corev1.PersistentVolumeClaim

NewPVC builds a Kubernetes PersistentVolumeClaim.

func NewSecret

func NewSecret(opts SecretOpts) *corev1.Secret

NewSecret builds a Kubernetes Secret.

func NewService

func NewService(opts ServiceOpts) *corev1.Service

NewService builds a Kubernetes Service.

Types

type ConfigMapOpts

type ConfigMapOpts struct {
	Name       string
	Namespace  string
	Labels     map[string]string
	Data       map[string]string
	BinaryData map[string][]byte
}

ConfigMapOpts configures ConfigMap generation.

type DeploymentOpts

type DeploymentOpts struct {
	Name            string
	Namespace       string
	Image           string
	Replicas        int32
	Labels          map[string]string
	Annotations     map[string]string
	Env             []corev1.EnvVar
	Ports           []int32
	CPURequest      string
	MemoryRequest   string
	CPULimit        string
	MemoryLimit     string
	ConfigMapName   string
	ConfigMountPath string
	SecretName      string
	Command         []string
	Args            []string

	ImagePullPolicy    corev1.PullPolicy
	Strategy           appsv1.DeploymentStrategyType
	ServiceAccountName string
	HealthPath         string
	RunAsUser          *int64
	RunAsNonRoot       *bool
	FSGroup            *int64
}

DeploymentOpts configures Deployment generation.

type PVCOpts

type PVCOpts struct {
	Name             string
	Namespace        string
	Labels           map[string]string
	StorageSize      string
	StorageClassName string
	AccessModes      []corev1.PersistentVolumeAccessMode
}

PVCOpts configures PersistentVolumeClaim generation.

type SecretOpts

type SecretOpts struct {
	Name       string
	Namespace  string
	Labels     map[string]string
	Type       corev1.SecretType
	StringData map[string]string
	Data       map[string][]byte
}

SecretOpts configures Secret generation.

type ServiceOpts

type ServiceOpts struct {
	Name        string
	Namespace   string
	Labels      map[string]string
	Annotations map[string]string
	Ports       []ServicePort
	Type        corev1.ServiceType
}

ServiceOpts configures Service generation.

type ServicePort

type ServicePort struct {
	Name       string
	Port       int32
	TargetPort int32
	Protocol   corev1.Protocol
}

ServicePort maps a service port to a target port.

Jump to

Keyboard shortcuts

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