cluster

package
v0.0.0-...-a10d855 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deletion

type Deletion struct {
	ProjectId   string
	ServiceName string
}

func (*Deletion) AuthenticateCluster

func (d *Deletion) AuthenticateCluster() (kubernetes.Clientset, error)

func (*Deletion) DeleteEnvironment

func (d *Deletion) DeleteEnvironment() error

func (*Deletion) DeleteService

func (d *Deletion) DeleteService() error

type Deployment

type Deployment struct {
	ImageName     string
	NamespaceName string
	Extras        Extras
	Ports         []Ports
	Env           map[string]string
	RamLimit      string
}

func (*Deployment) ApplyResources

func (d *Deployment) ApplyResources() error

func (*Deployment) AuthenticateCluster

func (d *Deployment) AuthenticateCluster() (kubernetes.Clientset, error)

func (*Deployment) CheckDeploymentAndService

func (d *Deployment) CheckDeploymentAndService(
	name string,
	namespace string,
	ctx context.Context,
	client kubernetes.Clientset,
) (bool, error)

func (*Deployment) CheckNamespace

func (d *Deployment) CheckNamespace(
	name string,
	ctx context.Context,
	client kubernetes.Clientset,
) (bool, error)

func (*Deployment) CreateDeployment

func (d *Deployment) CreateDeployment() appsv1.Deployment

func (*Deployment) CreateIngress

func (d *Deployment) CreateIngress(port int32) networking.Ingress

func (*Deployment) CreateNamespace

func (d *Deployment) CreateNamespace() corev1.Namespace

func (*Deployment) CreateProjectResources

func (d *Deployment) CreateProjectResources(client kubernetes.Clientset, ctx context.Context) error

func (*Deployment) CreateProjectService

func (d *Deployment) CreateProjectService(client kubernetes.Clientset, ctx context.Context) error

func (*Deployment) CreateResourceQuota

func (d *Deployment) CreateResourceQuota() (corev1.ResourceQuota, error)

func (*Deployment) CreateRole

func (d *Deployment) CreateRole() (rbac.Role, rbac.RoleBinding)

func (*Deployment) CreateService

func (d *Deployment) CreateService() corev1.Service

func (*Deployment) DeployStatus

func (d *Deployment) DeployStatus() appsv1.Deployment

func (*Deployment) UpdateProjectService

func (d *Deployment) UpdateProjectService(client kubernetes.Clientset, ctx context.Context) error

type Extras

type Extras struct {
	ImageName string
}

func (*Extras) Env

func (e *Extras) Env(env map[string]string) []corev1.EnvVar

func (*Extras) Ports

func (e *Extras) Ports(ports []Ports) []corev1.ContainerPort

func (*Extras) ServicePorts

func (e *Extras) ServicePorts(ports []Ports) []corev1.ServicePort

type Ports

type Ports struct {
	ContainerPort int    `json:"container_port"`
	Name          string `json:"name"`
}

Jump to

Keyboard shortcuts

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