k8s

package
v0.0.14 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateServiceObject

func CreateServiceObject(params ServiceParams) (*v1.Service, error)

CreateServiceObject creates a new v1.Service object with the provided parameters

Types

type K8SClient

type K8SClient struct {
	// contains filtered or unexported fields
}

func (*K8SClient) DeployImage

func (self *K8SClient) DeployImage(ctx context.Context, crdName, image string, additionalEnv map[string]string, securityContext *corev1.SecurityContext, healthCheck *v1.HealthCheckSpec, variableMounts []v1.VariableMountSpec) (*unstructured.Unstructured, *v1.Service, error)

DeployImage creates (or replaces) the service resource in the target namespace for deployment after a successful build job.

type ServiceParams

type ServiceParams struct {
	// Basic service information
	Name        string
	DisplayName string
	Description string
	Namespace   string

	// Service type configuration
	Type             schema.ServiceType
	Builder          schema.ServiceBuilder
	Provider         string
	Framework        string
	DeploymentRef    string
	ServiceRef       string
	TeamRef          string
	ProjectRef       string
	EnvironmentRef   string
	KubernetesSecret string
	EnvVars          []corev1.EnvVar

	// Git configuration
	GitRepoURL           string
	GitRef               string
	GithubInstallationID *int64

	// Deployment configuration
	Image            string
	Hosts            []v1.HostSpec
	Ports            []v1.PortSpec
	Public           *bool
	Replicas         *int32
	ImagePullSecrets []string
	RunCommand       string

	// Volume
	Volumes []v1.VolumeSpec

	// Database
	DatabaseType          string
	DatabaseUSDVersionRef string
	DatabaseConfig        *v1.DatabaseConfigSpec
	BackupConfig          *v1.S3ConfigSpec

	// Security
	SecurityContext *corev1.SecurityContext

	// Health check
	HealthCheck *v1.HealthCheckSpec

	// Variable mounts
	VariableMounts []v1.VariableMountSpec

	// Init containers
	InitContainers []v1.InitContainerSpec

	// Resources
	Resources *v1.ResourceSpec
}

ServiceParams contains all parameters needed to create a v1.Service object

Jump to

Keyboard shortcuts

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