pke

package
v0.0.0-...-e7c744b Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2023 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RoleMaster               Role   = "master"
	RoleWorker               Role   = "worker"
	RolePipelineSystem       Role   = "pipeline-system"
	TaintKeyMaster           string = "node-role.kubernetes.io/master"
	NodeLabelKeyMasterWorker string = "node-role.kubernetes.io/master-worker"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AmazonProviderConfig

type AmazonProviderConfig struct {
	AutoScalingGroup struct {
		Name                    string  `json:"name" yaml:"name" binding:"required"`
		Image                   string  `json:"image" yaml:"image" binding:"required"`
		Zones                   Zones   `json:"zones" yaml:"zones" binding:"required"`
		InstanceType            string  `json:"instanceType" yaml:"instanceType" binding:"required"`
		LaunchConfigurationName string  `json:"launchConfigurationName" yaml:"launchConfigurationName" binding:"required"`
		LaunchTemplate          string  `json:"launchTemplate" yaml:"launchTemplate"`
		VPCID                   string  `json:"vpcID" yaml:"vpcID" binding:"required"`
		SecurityGroupID         string  `json:"securityGroupID" yaml:"securityGroupID" binding:"required"`
		Subnets                 Subnets `json:"subnets" yaml:"subnets" binding:"required"`
		Tags                    Tags    `json:"tags" yaml:"tags" binding:"required"`
		Size                    struct {
			Desired int `json:"desired" yaml:"desired"`
			Min     int `json:"min" yaml:"min" binding:"required"`
			Max     int `json:"max" yaml:"max" binding:"required"`
		} `json:"size" yaml:"size" binding:"required"`
	} `json:"autoScalingGroup" yaml:"autoScalingGroup" binding:"required"`
}

TODO add required field to LaunchTemplate if applicable

type CRI

type CRI struct {
	Runtime       Runtime                `json:"runtime" yaml:"runtime" binding:"required"`
	RuntimeConfig map[string]interface{} `json:"runtimeConfig" yaml:"runtimeConfig"`
}

TODO add required field to RuntimeConfig if applicable

type CreateClusterPKE

type CreateClusterPKE struct {
	Network    Network    `json:"network,omitempty" yaml:"network,omitempty" binding:"required"`
	NodePools  NodePools  `json:"nodepools,omitempty" yaml:"nodepools,omitempty" binding:"required"`
	Kubernetes Kubernetes `json:"kubernetes,omitempty" yaml:"kubernetes,omitempty" binding:"required"`
	KubeADM    KubeADM    `json:"kubeadm,omitempty" yaml:"kubeadm,omitempty"`
	CRI        CRI        `json:"cri,omitempty" yaml:"cri,omitempty" binding:"required"`
}

CreateClusterPKE describes Pipeline's EC2/BanzaiCloud fields of a CreateCluster request

func (*CreateClusterPKE) AddDefaults

func (pke *CreateClusterPKE) AddDefaults() error

AddDefaults puts default values to optional field(s)

func (*CreateClusterPKE) Validate

func (pke *CreateClusterPKE) Validate() error

type ExtraArg

type ExtraArg string

type ExtraArgs

type ExtraArgs []ExtraArg

type Host

type Host struct {
	Name             string `json:"name" yaml:"name" binding:"required"`
	PrivateIP        string `json:"privateIP" yaml:"privateIP" binding:"required"`
	NetworkInterface string `json:"networkInterface" yaml:"networkInterface" binding:"required"`
	Roles            Roles  `json:"roles" yaml:"roles" binding:"required"`
	Labels           Labels `json:"labels" yaml:"labels" binding:"required"`
	Taints           Taints `json:"taints" yaml:"taints" binding:"required"`
}

type Hosts

type Hosts []Host

type KubeADM

type KubeADM struct {
	ExtraArgs ExtraArgs `json:"extraArgs" yaml:"extraArgs"`
}

//TODO add required field to ExtraArgs if applicable

type Kubernetes

type Kubernetes struct {
	Version string `json:"version" yaml:"version" binding:"required"`
	RBAC    RBAC   `json:"rbac" yaml:"rbac" binding:"required"`
	OIDC    OIDC   `json:"oidc" yaml:"oidc"`
}

type Labels

type Labels map[string]string

type Network

type Network struct {
	ServiceCIDR      string                 `json:"serviceCIDR" yaml:"serviceCIDR"`
	PodCIDR          string                 `json:"podCIDR" yaml:"podCIDR"`
	Provider         NetworkProvider        `json:"provider" yaml:"provider"`
	APIServerAddress string                 `json:"apiServerAddress" yaml:"apiServerAddress"`
	ProviderConfig   map[string]interface{} `json:"cloudProviderConfig" yaml:"cloudProviderConfig"`
}

type NetworkProvider

type NetworkProvider string
const (
	NPCalico NetworkProvider = "calico"
	NPCilium NetworkProvider = "cilium"
)

type NodePool

type NodePool struct {
	Name           string                 `json:"name" yaml:"name" binding:"required"`
	Roles          Roles                  `json:"roles" yaml:"roles" binding:"required"`
	Hosts          Hosts                  `json:"hosts" yaml:"hosts"`
	Provider       NodePoolProvider       `json:"provider" yaml:"provider" binding:"required"`
	ProviderConfig map[string]interface{} `json:"providerConfig" yaml:"providerConfig" binding:"required"`
	Labels         map[string]string      `json:"labels,omitempty" yaml:"labels,omitempty"`
	Autoscaling    bool                   `json:"autoscaling" yaml:"autoscaling"`
}

type NodePoolProvider

type NodePoolProvider string
const (
	NPPAmazon NodePoolProvider = "amazon"
)

type NodePools

type NodePools []NodePool

type OIDC

type OIDC struct {
	Enabled bool `json:"enabled" yaml:"enabled" binding:"required"`
}

type RBAC

type RBAC struct {
	Enabled bool `json:"enabled" yaml:"enabled" binding:"required"`
}

type Role

type Role string

type Roles

type Roles []Role

type Runtime

type Runtime string
const (
	CRIDocker     Runtime = "docker"
	CRIContainerd Runtime = "containerd"
)

type Subnet

type Subnet string

type Subnets

type Subnets []Subnet

type Tags

type Tags map[string]string

type Taint

type Taint string

type Taints

type Taints []Taint

type UpdateClusterPKE

type UpdateClusterPKE struct {
	NodePools UpdateNodePools `json:"nodepools,omitempty" yaml:"nodepools,omitempty" binding:"required"`
}

UpdateClusterPKE describes Pipeline's EC2/BanzaiCloud fields of a UpdateCluster request

func (*UpdateClusterPKE) Validate

func (a *UpdateClusterPKE) Validate() error

type UpdateNodePool

type UpdateNodePool struct {
	InstanceType string            `json:"instanceType" yaml:"instanceType"`
	SpotPrice    string            `json:"spotPrice" yaml:"spotPrice"`
	Autoscaling  bool              `json:"autoscaling" yaml:"autoscaling"`
	MinCount     int               `json:"minCount" yaml:"minCount"`
	MaxCount     int               `json:"maxCount" yaml:"maxCount"`
	Count        int               `json:"count" yaml:"count"`
	Subnets      Subnets           `json:"subnets,omitempty" yaml:"subnets,omitempty"`
	Labels       map[string]string `json:"labels,omitempty" yaml:"labels,omitempty"`
}

type UpdateNodePools

type UpdateNodePools map[string]UpdateNodePool

type Zone

type Zone string

type Zones

type Zones []Zone

Jump to

Keyboard shortcuts

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