k8s

package
v0.0.0-...-f9fcf5b Latest Latest
Warning

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

Go to latest
Published: Oct 4, 2024 License: MIT Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	ID        string
	ProjectID string
	Domain    string
}

type Client

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

func NewClient

func NewClient(namespace string) (*Client, error)

func NewLocalClient

func NewLocalClient(namespace string) (*Client, error)

func (*Client) CreateCertificate

func (c *Client) CreateCertificate(ctx context.Context, obj Certificate) error

func (*Client) CreateConfigMap

func (c *Client) CreateConfigMap(ctx context.Context, obj ConfigMap) error

func (*Client) CreateCronJob

func (c *Client) CreateCronJob(ctx context.Context, obj CronJob) error

func (*Client) CreateDeployment

func (c *Client) CreateDeployment(ctx context.Context, obj Deployment) error

func (*Client) CreateHorizontalPodAutoscaler

func (c *Client) CreateHorizontalPodAutoscaler(ctx context.Context, obj HorizontalPodAutoscaler) error

func (*Client) CreateIngress

func (c *Client) CreateIngress(ctx context.Context, x Ingress) error

func (*Client) CreatePersistentVolumeClaim

func (c *Client) CreatePersistentVolumeClaim(ctx context.Context, obj PersistentVolumeClaim) error

func (*Client) CreatePersistentVolumeClaimForReplicaSet

func (c *Client) CreatePersistentVolumeClaimForReplicaSet(ctx context.Context, obj PersistentVolumeClaimForReplicaSet) error

func (*Client) CreateRedirectIngress

func (c *Client) CreateRedirectIngress(ctx context.Context, x RedirectIngress) error

func (*Client) CreateReplicaSet

func (c *Client) CreateReplicaSet(ctx context.Context, obj ReplicaSet) error

func (*Client) CreateSecret

func (c *Client) CreateSecret(ctx context.Context, obj Secret) error

func (*Client) CreateSecretDockerConfigJSON

func (c *Client) CreateSecretDockerConfigJSON(ctx context.Context, obj SecretDockerConfigJSON) error

func (*Client) CreateService

func (c *Client) CreateService(ctx context.Context, obj Service) error

func (*Client) CreateServiceAccount

func (c *Client) CreateServiceAccount(ctx context.Context, obj ServiceAccount) error

func (*Client) CreateServiceForReplicaSet

func (c *Client) CreateServiceForReplicaSet(ctx context.Context, obj ServiceForReplicaSet) error

func (*Client) DeleteCertificate

func (c *Client) DeleteCertificate(ctx context.Context, id string) error

func (*Client) DeleteConfigMap

func (c *Client) DeleteConfigMap(ctx context.Context, id string) error

func (*Client) DeleteCronJob

func (c *Client) DeleteCronJob(ctx context.Context, id string) error

func (*Client) DeleteDeployment

func (c *Client) DeleteDeployment(ctx context.Context, name string) error

func (*Client) DeleteHorizontalPodAutoscaler

func (c *Client) DeleteHorizontalPodAutoscaler(ctx context.Context, id string) error

func (*Client) DeleteIngress

func (c *Client) DeleteIngress(ctx context.Context, id string) error

func (*Client) DeletePersistentVolumeClaim

func (c *Client) DeletePersistentVolumeClaim(ctx context.Context, id string) error

func (*Client) DeleteReplicaSet

func (c *Client) DeleteReplicaSet(ctx context.Context, idWithRevision string) error

func (*Client) DeleteSecret

func (c *Client) DeleteSecret(ctx context.Context, id string) error

func (*Client) DeleteService

func (c *Client) DeleteService(ctx context.Context, id string) error

func (*Client) DeleteServiceAccount

func (c *Client) DeleteServiceAccount(ctx context.Context, id string) error

func (*Client) GetDeployment

func (c *Client) GetDeployment(ctx context.Context, name string) (*appsv1.Deployment, error)

func (*Client) GetDeploymentsForProject

func (c *Client) GetDeploymentsForProject(ctx context.Context, projectID string) ([]appsv1.Deployment, error)

func (*Client) GetNodePort

func (c *Client) GetNodePort(ctx context.Context, id string) (int, error)

func (*Client) GetReplicaSet

func (c *Client) GetReplicaSet(ctx context.Context, id string) (*appsv1.ReplicaSet, error)

func (*Client) GetReplicaSetPodIP

func (c *Client) GetReplicaSetPodIP(ctx context.Context, id string, revision int64) (string, error)

func (*Client) WaitReplicaSetReady

func (c *Client) WaitReplicaSetReady(ctx context.Context, id string, revision int64) error

type ConfigMap

type ConfigMap struct {
	ID        string
	ProjectID string
	Data      map[string]string // key => data
}

type CronJob

type CronJob struct {
	ID            string
	ProjectID     string
	Name          string
	Revision      int64
	Image         string
	Env           Env
	Command       []string
	Args          []string
	SA            string
	Schedule      string
	RequestCPU    string
	RequestMemory string
	LimitCPU      string
	LimitMemory   string
	PullSecret    string
	Disk          Disk
	RuntimeClass  string
	Pool          PoolConfig
	BindConfigMap map[string]string // key => file path
	Sidecars      []*api.SidecarConfig
}

type Deployment

type Deployment struct {
	ID            string
	ProjectID     string
	Name          string
	Revision      int64
	Image         string
	Env           Env
	Command       []string
	Args          []string
	SA            string
	Replicas      int
	ExposePort    int
	Annotations   map[string]string // pod's annotations
	RequestCPU    string
	RequestMemory string
	LimitCPU      string
	LimitMemory   string
	PullSecret    string
	Disk          Disk
	RuntimeClass  string
	Pool          PoolConfig
	BindConfigMap map[string]string // key => file path
	H2CP          bool
	Protocol      string
	Sidecars      []*api.SidecarConfig
	ForceSpot     bool
}

type Disk

type Disk struct {
	Name      string
	MountPath string
	SubPath   string
}

type Env

type Env map[string]string

Env type

type HorizontalPodAutoscaler

type HorizontalPodAutoscaler struct {
	ID            string
	ProjectID     string
	MinReplicas   int
	MaxReplicas   int
	TargetPercent int
}

type Ingress

type Ingress struct {
	ID           string
	Service      string
	ProjectID    string
	Domain       string
	Path         string
	Secret       string
	UpstreamHost string
	UpstreamPath string
	Internal     bool
	Config       api.RouteConfig
}

type PersistentVolumeClaim

type PersistentVolumeClaim struct {
	ID           string
	ProjectID    string
	Size         int64
	StorageClass string
}

type PersistentVolumeClaimForReplicaSet

type PersistentVolumeClaimForReplicaSet struct {
	ID           string
	ProjectID    string
	Revision     int64
	Size         int64
	StorageClass string
}

type PoolConfig

type PoolConfig struct {
	Name  string
	Share bool
}

type RedirectIngress

type RedirectIngress struct {
	ID        string
	ProjectID string
	Domain    string
	Path      string
	Target    string
	Secret    string
	Config    api.RouteConfig
}

type ReplicaSet

type ReplicaSet struct {
	ID            string
	ProjectID     string
	Name          string
	Revision      int64
	Image         string
	Env           Env
	Command       []string
	Args          []string
	SA            string
	Replicas      int
	ExposePort    int
	Annotations   map[string]string // pod's annotations
	RequestCPU    string
	RequestMemory string
	LimitCPU      string
	LimitMemory   string
	PullSecret    string
	Disk          Disk
}

type Secret

type Secret struct {
	ID        string
	ProjectID string
	Data      map[string][]byte
	Type      v1.SecretType
}

type SecretDockerConfigJSON

type SecretDockerConfigJSON struct {
	ID        string
	ProjectID string
	JSON      []byte
}

type Service

type Service struct {
	ID         string
	ProjectID  string
	Port       int
	Protocol   string
	ExposeNode bool
	H2CP       bool
}

type ServiceAccount

type ServiceAccount struct {
	ID        string
	ProjectID string
	GSA       string
}

type ServiceForReplicaSet

type ServiceForReplicaSet struct {
	ID         string
	Revision   int64
	ProjectID  string
	Port       int
	ExposeNode bool
}

Jump to

Keyboard shortcuts

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