cluster

package
v0.17.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	KeyTargetGroupARNs  = "target_group_arns"
	KeyOIDCProviderURL  = "oidc_provider_url"
	KeyOIDCProviderARN  = "oidc_provider_arn"
	KeySecurityGroupIDs = "security_group_ids"
)
View Source
const (
	TagKeyNodeGroupName     = "tf-eksctl/node-group"
	TagKeyClusterNamePrefix = "tf-eksctl/cluster"
)
View Source
const DefaultAPIVersion = "eksctl.io/v1alpha5"
View Source
const DefaultVersion = "1.16"
View Source
const KeyALBAttachment = "alb_attachment"
View Source
const KeyAPIVersion = "api_version"
View Source
const KeyAWSAuthConfigMap = "aws_auth_configmap"
View Source
const KeyBin = "eksctl_bin"
View Source
const KeyDrainNodeGroups = "drain_node_groups"
View Source
const KeyEksctlVersion = "eksctl_version"
View Source
const KeyIAMIdentityMapping = "iam_identity_mapping"
View Source
const KeyKubeconfigPath = "kubeconfig_path"
View Source
const KeyKubectlBin = "kubectl_bin"
View Source
const KeyKubernetesResourceDeletionBeforeDestroy = "kubernetes_resource_deletion_before_destroy"
View Source
const KeyManifests = "manifests"
View Source
const KeyMetrics = "metrics"
View Source
const KeyName = "name"
View Source
const KeyPodsReadinessCheck = "pods_readiness_check"
View Source
const KeyProfile = "profile"
View Source
const KeyRegion = "region"
View Source
const KeyRevision = "revision"
View Source
const KeySpec = "spec"
View Source
const KeyTags = "tags"
View Source
const KeyVPCID = "vpc_id"
View Source
const KeyVersion = "version"

Variables

View Source
var ValidDeleteK8sResourceKinds = []string{"deployment", "deploy", "pod", "service", "svc", "statefulset", "job"}

Functions

func AWSSessionFromCluster

func AWSSessionFromCluster(cluster *Cluster) *session.Session

func ResourceCluster

func ResourceCluster() *schema.Resource

func StatusToCreateRuleInput

func StatusToCreateRuleInput(listenerARN string, listenerStatus *courier.ListenerStatus) (*elbv2.CreateRuleInput, error)

Types

type ALBRouter

type ALBRouter struct {
	ELBV2 elbv2iface.ELBV2API

	Analyzers []*courier.Analyzer
}

func (*ALBRouter) SwitchTargetGroup

func (m *ALBRouter) SwitchTargetGroup(listenerStatuses ListenerStatuses, opts courier.CanaryOpts) error

type CanaryConfig

type CanaryConfig struct {
	Region      string
	ClusterName string
}

type CheckPodsReadiness

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

type Cluster

type Cluster struct {
	EksctlBin  string
	KubectlBin string
	Name       string
	Region     string
	Profile    string
	APIVersion string
	Version    string
	VPCID      string
	Spec       string
	Output     string
	Manifests  []string

	// EksctlVersion lets the provider to install the eksctl binary for the specified versino using shoal
	EksctlVersion string

	CheckPodsReadinessConfigs []CheckPodsReadiness

	DeleteKubernetesResourcesBeforeDestroy []DeleteKubernetesResource

	PublicSubnetIDs  []string
	PrivateSubnetIDs []string
	ALBAttachments   []courier.ALBAttachment
	TargetGroupARNs  []string
	Metrics          []courier.Metric
	AssumeRoleConfig *sdk.AssumeRoleConfig
}

func ReadCluster

func ReadCluster(d api.Getter) (*Cluster, error)

func (Cluster) GitOpsEnabled

func (c Cluster) GitOpsEnabled() (bool, error)

func (Cluster) IAMWithOIDCEnabled

func (c Cluster) IAMWithOIDCEnabled() (bool, error)

type ClusterName

type ClusterName string

type ClusterSet

type ClusterSet struct {
	ClusterID        string
	ClusterName      ClusterName
	Cluster          *Cluster
	ClusterConfig    []byte
	ListenerStatuses ListenerStatuses
	CanaryOpts       courier.CanaryOpts
}

type ClusterState

type ClusterState struct {
	Name               string             `json:"Name"`
	Identity           Identity           `json:"Identity"`
	RoleArn            string             `json:"RoleArn"`
	ResourcesVpcConfig ResourcesVpcConfig `json:"ResourcesVpcConfig"`
}

func (*ClusterState) GetOIDCProviderARN

func (s *ClusterState) GetOIDCProviderARN() string

func (*ClusterState) GetSecurityGroupIDs

func (s *ClusterState) GetSecurityGroupIDs() []string

type DeleteKubernetesResource

type DeleteKubernetesResource struct {
	Namespace string
	Name      string
	Kind      string
}

type EksctlClusterConfig

type EksctlClusterConfig struct {
	VPC        VPC         `yaml:"vpc"`
	NodeGroups []NodeGroup `yaml:"nodeGroups"`

	// omitempty is required from eksctl-perspective. Otherwise, eksctl fails due to `git.repo.url is required` error
	// on `git: {}` in the generated cluster.yaml.
	Git  map[string]interface{} `yaml:"git,omitempty"`
	Rest map[string]interface{} `yaml:",inline"`
	IAM  IAM                    `yaml:"iam"`
}

type IAM

type IAM struct {
	WithOIDC bool                   `yaml:"withOIDC"`
	Rest     map[string]interface{} `yaml:",inline"`
}

type Identity

type Identity struct {
	Oidc Oidc `json:"Oidc"`
}

type ListenerStatuses

type ListenerStatuses = map[string]courier.ListenerStatus

the key is listener ARN

type LiveClusterInfo

type LiveClusterInfo struct {
	KubernetesVersion string
	Revision          int
}

type Manager

type Manager struct {
	DisableClusterNameSuffix bool
}

func (*Manager) PrepareClusterSet

func (m *Manager) PrepareClusterSet(d api.UniqueResourceGetter, optNewId ...string) (*ClusterSet, error)

type NodeGroup

type NodeGroup struct {
	Name            string                 `yaml:"name"`
	TargetGroupARNS []string               `yaml:"targetGroupARNS"`
	Rest            map[string]interface{} `yaml:",inline"`
}

type Oidc

type Oidc struct {
	Issuer string `json:"Issuer"`
}

type ResourcesVpcConfig

type ResourcesVpcConfig struct {
	ClusterSecurityGroupId string   `json:"ClusterSecurityGroupId"`
	SecurityGroupIds       []string `json:"SecurityGroupIds"`
}

type Subnet

type Subnet struct {
	ID string `yaml:"id"`
}

type Subnets

type Subnets struct {
	Public  map[string]Subnet `yaml:"public"`
	Private map[string]Subnet `yaml:"private"`
}

type VPC

type VPC struct {
	ID      string                 `yaml:"id"`
	Subnets Subnets                `yaml:"subnets"`
	Rest    map[string]interface{} `yaml:",inline"`
}

Jump to

Keyboard shortcuts

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