appworkload

package
v0.1.0-beta.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package appworkload provides generators for creating standard Kubernetes workloads (Deployments, StatefulSets, DaemonSets) along with their associated resources (Services, Ingresses, PersistentVolumeClaims).

The AppWorkload generator follows the GVK (Group, Version, Kind) pattern:

  • Group: generators.gokure.dev
  • Version: v1alpha1
  • Kind: AppWorkload

Example usage:

apiVersion: generators.gokure.dev/v1alpha1
kind: AppWorkload
metadata:
  name: my-app
  namespace: default
spec:
  workload: Deployment
  replicas: 3
  containers:
    - name: app
      image: nginx:latest
      ports:
        - containerPort: 80
  services:
    - name: my-service
      type: LoadBalancer
      ports:
        - port: 80
          targetPort: 80

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigV1Alpha1

type ConfigV1Alpha1 struct {
	generators.BaseMetadata `yaml:",inline" json:",inline"`

	Workload internal.WorkloadType `yaml:"workload,omitempty" json:"workload,omitempty"`
	Replicas int32                 `yaml:"replicas,omitempty" json:"replicas,omitempty"`
	Labels   map[string]string     `yaml:"labels,omitempty" json:"labels,omitempty"`

	Containers           []internal.ContainerConfig     `yaml:"containers" json:"containers"`
	Volumes              []internal.Volume              `yaml:"volumes,omitempty" json:"volumes,omitempty"`
	VolumeClaimTemplates []internal.VolumeClaimTemplate `yaml:"volumeClaimTemplates,omitempty" json:"volumeClaimTemplates,omitempty"`

	Services []internal.ServiceConfig `yaml:"services,omitempty" json:"services,omitempty"`
	Ingress  *internal.IngressConfig  `yaml:"ingress,omitempty" json:"ingress,omitempty"`
}

ConfigV1Alpha1 describes a single deployable application with GVK support

func (*ConfigV1Alpha1) Generate

func (c *ConfigV1Alpha1) Generate(app *stack.Application) ([]*client.Object, error)

Generate creates Kubernetes objects from the AppWorkloadConfig

func (*ConfigV1Alpha1) GetAPIVersion

func (c *ConfigV1Alpha1) GetAPIVersion() string

GetAPIVersion returns the API version for this config

func (*ConfigV1Alpha1) GetKind

func (c *ConfigV1Alpha1) GetKind() string

GetKind returns the kind for this config

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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