builder

package
v0.16.6-rc4 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AkashManagedLabelName         = "akash.network"
	AkashManifestServiceLabelName = "akash.network/manifest-service"
	AkashNetworkStorageClasses    = "akash.network/storageclasses"

	AkashLeaseOwnerLabelName    = "akash.network/lease.id.owner"
	AkashLeaseDSeqLabelName     = "akash.network/lease.id.dseq"
	AkashLeaseGSeqLabelName     = "akash.network/lease.id.gseq"
	AkashLeaseOSeqLabelName     = "akash.network/lease.id.oseq"
	AkashLeaseProviderLabelName = "akash.network/lease.id.provider"
)
View Source
const SettingsKey = ContextKey("kube-client-settings")
View Source
const SuffixForNodePortServiceName = "-np"

Variables

View Source
var ErrSettingsValidation = errors.New("settings validation")

Functions

func AppendLeaseLabels

func AppendLeaseLabels(lid mtypes.LeaseID, labels map[string]string) map[string]string

func LidNS

func LidNS(lid mtypes.LeaseID) string

LidNS generates a unique sha256 sum for identifying a provider's object name.

func ValidateSettings

func ValidateSettings(settings Settings) error

Types

type ContextKey

type ContextKey string

type Deployment

type Deployment interface {
	Create() (*appsv1.Deployment, error)
	Update(obj *appsv1.Deployment) (*appsv1.Deployment, error)
	// contains filtered or unexported methods
}

func NewDeployment

func NewDeployment(log log.Logger, settings Settings, lid mtypes.LeaseID, group *manitypes.Group, service *manitypes.Service) Deployment

type Manifest

type Manifest interface {
	Create() (*crd.Manifest, error)
	Update(obj *crd.Manifest) (*crd.Manifest, error)
	Name() string
	// contains filtered or unexported methods
}

func BuildManifest

func BuildManifest(log log.Logger, settings Settings, ns string, lid mtypes.LeaseID, group *manitypes.Group) Manifest

type NS

type NS interface {
	Create() (*corev1.Namespace, error)
	Update(obj *corev1.Namespace) (*corev1.Namespace, error)
	// contains filtered or unexported methods
}

func BuildNS

func BuildNS(settings Settings, lid mtypes.LeaseID, group *manitypes.Group) NS

type NetPol

type NetPol interface {
	Create() ([]*netv1.NetworkPolicy, error)
	Update(obj *netv1.NetworkPolicy) (*netv1.NetworkPolicy, error)
	// contains filtered or unexported methods
}

func BuildNetPol

func BuildNetPol(settings Settings, lid mtypes.LeaseID, group *manitypes.Group) NetPol

type PspRestricted

type PspRestricted interface {
	Name() string
	Create() (*v1beta1.PodSecurityPolicy, error)
	Update(obj *v1beta1.PodSecurityPolicy) (*v1beta1.PodSecurityPolicy, error)
	// contains filtered or unexported methods
}

func BuildPSP

func BuildPSP(settings Settings, lid mtypes.LeaseID, group *manitypes.Group) PspRestricted

type Service

type Service interface {
	Create() (*corev1.Service, error)
	Update(obj *corev1.Service) (*corev1.Service, error)
	Any() bool
	// contains filtered or unexported methods
}

func BuildService

func BuildService(log log.Logger, settings Settings, lid mtypes.LeaseID, group *manitypes.Group, mservice *manitypes.Service, requireNodePort bool) Service

type Settings

type Settings struct {
	// gcp:    NodePort
	// others: ClusterIP
	DeploymentServiceType corev1.ServiceType

	// gcp:    false
	// others: true
	DeploymentIngressStaticHosts bool
	// Ingress domain to map deployments to
	DeploymentIngressDomain string

	// Return load balancer host in lease status command ?
	// gcp:    true
	// others: optional
	DeploymentIngressExposeLBHosts bool

	// Global hostname for arbitrary ports
	ClusterPublicHostname string

	// NetworkPoliciesEnabled determines if NetworkPolicies should be installed.
	NetworkPoliciesEnabled bool

	CPUCommitLevel     float64
	MemoryCommitLevel  float64
	StorageCommitLevel float64

	DeploymentRuntimeClass string

	// Name of the image pull secret to use in pod spec
	DockerImagePullSecretsName string
}

Settings configures k8s object generation such that it is customized to the cluster environment that is being used. For instance, GCP requires a different service type than minikube.

func NewDefaultSettings

func NewDefaultSettings() Settings

type StatefulSet

type StatefulSet interface {
	Create() (*appsv1.StatefulSet, error)
	Update(obj *appsv1.StatefulSet) (*appsv1.StatefulSet, error)
	// contains filtered or unexported methods
}

func BuildStatefulSet

func BuildStatefulSet(log log.Logger, settings Settings, lid mtypes.LeaseID, group *manitypes.Group, service *manitypes.Service) StatefulSet

Jump to

Keyboard shortcuts

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