ekscluster

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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DEFAULT_VPC_CIDR     = "192.168.0.0/16"
	DEFAULT_SUBNET0_CIDR = "192.168.64.0/20"
	DEFAULT_SUBNET1_CIDR = "192.168.80.0/20"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthConfig

type AuthConfig struct {
	MapRoles    []MapRoles `json:"mapRoles,omitempty" yaml:"mapRoles,omitempty"`
	MapUsers    []MapUsers `json:"mapUsers,omitempty" yaml:"mapUsers,omitempty"`
	MapAccounts []string   `json:"mapAccounts,omitempty" yaml:"mapAccounts,omitempty"`
}

func (*AuthConfig) ConvertToString

func (cm *AuthConfig) ConvertToString() (string, error)

type CertificateAuthority

type CertificateAuthority struct {
	Data string `json:"data,omitempty"`
}

CertificateAuthority is a helper struct for AWS kube config JSON parsing

type ClusterIAM

type ClusterIAM struct {
	ClusterRoleID      string `json:"clusterRoleId,omitempty" yaml:"clusterRoleId,omitempty"`
	NodeInstanceRoleID string `json:"nodeInstanceRoleId,omitempty" yaml:"nodeInstanceRoleId,omitempty"`
	// marks if the userid associated with the clusters aws secret has to be used in kubeconfig (bypasses user creation)
	DefaultUser bool `json:"defaultUser,omitempty" yaml:"defaultUser,omitempty"`
}

ClusterIAM describes the IAM config for creating an EKS cluster

type ClusterVPC

type ClusterVPC struct {
	VpcId string `json:"vpcId,omitempty" yaml:"vpcId,omitempty"`
	Cidr  string `json:"cidr,omitempty" yaml:"cidr,omitempty"`
}

ClusterVPC describes the VPC for creating an EKS cluster

type CreateAmazonEksObjectStoreBucketProperties

type CreateAmazonEksObjectStoreBucketProperties struct {
	Location string `json:"location" binding:"required"`
}

CreateAmazonEksObjectStoreBucketProperties describes the properties of S3 bucket creation request

type CreateClusterEKS

type CreateClusterEKS struct {
	Version          string               `json:"version,omitempty" yaml:"version,omitempty"`
	EncryptionConfig []EncryptionConfig   `json:"encryptionConfig,omitempty" yaml:"encryptionConfig,omitempty"`
	NodePools        map[string]*NodePool `json:"nodePools,omitempty" yaml:"nodePools,omitempty"`
	Vpc              *ClusterVPC          `json:"vpc,omitempty" yaml:"vpc,omitempty"`
	RouteTableId     string               `json:"routeTableId,omitempty" yaml:"routeTableId,omitempty"`
	// Subnets for EKS master and worker nodes. All worker nodes will be launched in the same subnet
	// (the first subnet in the list - which may not coincide with first subnet in the cluster create request payload as
	// the deserialization may change the order) unless a subnet is specified for the workers that belong to a node pool at node pool level.
	Subnets  []*Subnet  `json:"subnets,omitempty" yaml:"subnets,omitempty"`
	IAM      ClusterIAM `json:"iam,omitempty" yaml:"iam,omitempty"`
	LogTypes []string   `json:"logTypes,omitempty" yaml:"logTypes,omitempty"`

	// List of access point references for the API server; currently, public and private are the only valid values.
	// Default: ["public"]
	APIServerAccessPoints []string          `json:"apiServerAccessPoints,omitempty" yaml:"apiServerAccessPoints,omitempty"`
	Tags                  map[string]string `json:"tags,omitempty" yaml:"tags,omitempty"`
	AuthConfig            *AuthConfig       `json:"authConfig,omitempty" yaml:"authConfig,omitempty"`
}

CreateClusterEKS describes Pipeline's Amazon EKS fields of a CreateCluster request

func (*CreateClusterEKS) AddDefaults

func (eks *CreateClusterEKS) AddDefaults(location string) error

AddDefaults puts default values to optional field(s)

func (*CreateClusterEKS) Validate

func (eks *CreateClusterEKS) Validate() error

Validate validates Amazon EKS cluster create request

type EncryptionConfig

type EncryptionConfig struct {
	Provider  Provider
	Resources []string
}

type MapRoles

type MapRoles struct {
	Groups   []string `json:"groups,omitempty" yaml:"groups,omitempty"`
	RoleARN  string   `json:"rolearn,omitempty" yaml:"rolearn,omitempty"`
	Username string   `json:"username,omitempty" yaml:"username,omitempty"`
}

type MapUsers

type MapUsers struct {
	Groups   []string `json:"groups,omitempty" yaml:"groups,omitempty"`
	UserARN  string   `json:"userarn,omitempty" yaml:"userarn,omitempty"`
	Username string   `json:"username,omitempty" yaml:"username,omitempty"`
}

type NodePool

type NodePool 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"`
	VolumeEncryption *NodePoolVolumeEncryption `json:"volumeEncryption,omitempty" yaml:"volumeEncryption,omitempty"`
	VolumeSize       int                       `json:"volumeSize" yaml:"volumeSize"`
	VolumeType       string                    `json:"volumeType" yaml:"volumeType"`
	Image            string                    `json:"image" yaml:"image"`
	Labels           map[string]string         `json:"labels,omitempty" yaml:"labels,omitempty"`

	// SecurityGroups collects the user provided node security group IDs for the
	// node pool.
	SecurityGroups   []string `json:"securityGroups,omitempty" yaml:"securityGroups,omitempty"`
	UseInstanceStore *bool    `json:"useInstanceStore,omitempty" yaml:"useInstanceStore,omitempty"`

	// Subnet for worker nodes of this node pool. If not specified than worker nodes
	// are launched in the same subnet in one of the subnets from the list of subnets of the EKS cluster
	Subnet *Subnet `json:"subnet,omitempty" yaml:"subnet,omitempty"`
}

NodePool describes Amazon's node fields of a CreateCluster/Update request

func (*NodePool) Validate

func (a *NodePool) Validate(npName string) error

Validate checks Amazon's node fields

func (*NodePool) ValidateForUpdate

func (a *NodePool) ValidateForUpdate(npName string) error

ValidateForUpdate checks Amazon's node fields

type NodePoolVolumeEncryption

type NodePoolVolumeEncryption struct {
	Enabled          bool   `json:"enabled" yaml:"enabled"`
	EncryptionKeyARN string `json:"encryptionKeyARN" yaml:"encryptionKeyARN"`
}

NodePoolVolumeEncryption describes the EKS node pool encryption details.

type Provider

type Provider struct {
	KeyARN string
}

type Subnet

type Subnet struct {
	// Id of existing subnet to use for creating the EKS cluster. If not provided new subnet will be created.
	SubnetId string `json:"subnetId,omitempty" yaml:"subnetId,omitempty"`
	// The CIDR range for the subnet in case new Subnet is created.
	Cidr string `json:"cidr,omitempty" yaml:"cidr,omitempty"`
	// The AZ to create the subnet into.
	AvailabilityZone string `json:"availabilityZone,omitempty" yaml:"availabilityZone,omitempty"`
}

Subnet describes a subnet for EKS cluster

type UpdateClusterAmazonEKS

type UpdateClusterAmazonEKS struct {
	NodePools map[string]*NodePool `json:"nodePools,omitempty"`
}

UpdateClusterAmazonEKS describes Amazon EKS's node fields of an UpdateCluster request

func (*UpdateClusterAmazonEKS) Validate

func (eks *UpdateClusterAmazonEKS) Validate() error

Validate validates the update request (only EKS part). If any of the fields is missing, the method fills with stored data.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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