v1alpha3

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2020 License: Apache-2.0 Imports: 17 Imported by: 6

Documentation

Overview

Package v1alpha3 contains API Schema definitions for the eks controlplane v1alpha3 API group +kubebuilder:object:generate=true +groupName=infrastructure.cluster.x-k8s.io

Index

Constants

View Source
const (
	// EKSControlPlaneReadyCondition condition reports on the successful reconciliation of eks control plane.
	EKSControlPlaneReadyCondition clusterv1.ConditionType = "EKSControlPlaneReady"
	// EKSControlPlaneReconciliationFailedReason used to report failures while reconciling EKS control plane
	EKSControlPlaneReconciliationFailedReason = "EKSControlPlaneReconciliationFailed"
)
View Source
const (
	// IAMControlPlaneRolesReadyCondition condition reports on the successful reconciliation of eks control plane iam roles.
	IAMControlPlaneRolesReadyCondition clusterv1.ConditionType = "IAMControlPlaneRolesReady"
	// IAMControlPlaneRolesReconciliationFailedReason used to report failures while reconciling EKS control plane iam roles
	IAMControlPlaneRolesReconciliationFailedReason = "IAMControlPlaneRolesReconciliationFailed"
)
View Source
const (
	// ManagedControlPlaneFinalizer allows the controller to clean up resources on delete
	ManagedControlPlaneFinalizer = "awsmanagedcontrolplane.infrastructure.cluster.x-k8s.io"
)

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "infrastructure.cluster.x-k8s.io", Version: "v1alpha3"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)
View Source
var (
	// EKSTokenMethodIAMAuthenticator indicates that IAM autenticator will be used to get a token
	EKSTokenMethodIAMAuthenticator = EKSTokenMethod("iam-authenticator")

	// EKSTokenMethodAWSCli indicates that the AWS CLI will be used to get a token
	// Version 1.16.156 or greater is required of the AWS CLI
	EKSTokenMethodAWSCli = EKSTokenMethod("aws-cli")
)
View Source
var (
	// DefaultEKSControlPlaneRole is the name of the default IAM role to use for the EKS control plane
	// if no other role is supplied in the spec and if iam role creation is not enabled. The default
	// can be created using clusterawsadm or created manually
	DefaultEKSControlPlaneRole = fmt.Sprintf("eks-controlplane%s", infrav1.DefaultNameSuffix)
)

Functions

This section is empty.

Types

type AWSManagedCluster

type AWSManagedCluster struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AWSManagedClusterSpec   `json:"spec,omitempty"`
	Status AWSManagedClusterStatus `json:"status,omitempty"`
}

AWSManagedCluster is the Schema for the awsmanagedclusters API

func (*AWSManagedCluster) DeepCopy

func (in *AWSManagedCluster) DeepCopy() *AWSManagedCluster

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedCluster.

func (*AWSManagedCluster) DeepCopyInto

func (in *AWSManagedCluster) DeepCopyInto(out *AWSManagedCluster)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSManagedCluster) DeepCopyObject

func (in *AWSManagedCluster) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AWSManagedClusterList

type AWSManagedClusterList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AWSManagedCluster `json:"items"`
}

AWSManagedClusterList contains a list of AWSManagedCluster

func (*AWSManagedClusterList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedClusterList.

func (*AWSManagedClusterList) DeepCopyInto

func (in *AWSManagedClusterList) DeepCopyInto(out *AWSManagedClusterList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSManagedClusterList) DeepCopyObject

func (in *AWSManagedClusterList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AWSManagedClusterSpec

type AWSManagedClusterSpec struct {
	// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
	// +optional
	ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`
}

AWSManagedClusterSpec defines the desired state of AWSManagedCluster

func (*AWSManagedClusterSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedClusterSpec.

func (*AWSManagedClusterSpec) DeepCopyInto

func (in *AWSManagedClusterSpec) DeepCopyInto(out *AWSManagedClusterSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSManagedClusterStatus

type AWSManagedClusterStatus struct {
	// Ready is when the AWSManagedControlPlane has a API server URL.
	// +optional
	Ready bool `json:"ready,omitempty"`

	// FailureDomains specifies a list fo available availability zones that can be used
	// +optional
	FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
}

AWSManagedClusterStatus defines the observed state of AWSManagedCluster

func (*AWSManagedClusterStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedClusterStatus.

func (*AWSManagedClusterStatus) DeepCopyInto

func (in *AWSManagedClusterStatus) DeepCopyInto(out *AWSManagedClusterStatus)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSManagedControlPlane

type AWSManagedControlPlane struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   AWSManagedControlPlaneSpec   `json:"spec,omitempty"`
	Status AWSManagedControlPlaneStatus `json:"status,omitempty"`
}

AWSManagedControlPlane is the Schema for the awsmanagedcontrolplanes API

func (*AWSManagedControlPlane) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedControlPlane.

func (*AWSManagedControlPlane) DeepCopyInto

func (in *AWSManagedControlPlane) DeepCopyInto(out *AWSManagedControlPlane)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSManagedControlPlane) DeepCopyObject

func (in *AWSManagedControlPlane) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

func (*AWSManagedControlPlane) Default

func (r *AWSManagedControlPlane) Default()

Default will set default values for the AWSManagedControlPlane

func (*AWSManagedControlPlane) GetConditions

func (r *AWSManagedControlPlane) GetConditions() clusterv1.Conditions

GetConditions returns the control planes conditions

func (*AWSManagedControlPlane) SetConditions

func (r *AWSManagedControlPlane) SetConditions(conditions clusterv1.Conditions)

SetConditions sets the status conditions for the AWSManagedControlPlane

func (*AWSManagedControlPlane) SetupWebhookWithManager

func (r *AWSManagedControlPlane) SetupWebhookWithManager(mgr ctrl.Manager) error

SetupWebhookWithManager will setup the webhooks for the AWSManagedControlPlane

func (*AWSManagedControlPlane) ValidateCreate

func (r *AWSManagedControlPlane) ValidateCreate() error

ValidateCreate will do any extra validation when creating a AWSManagedControlPlane

func (*AWSManagedControlPlane) ValidateDelete

func (r *AWSManagedControlPlane) ValidateDelete() error

ValidateDelete allows you to add any extra validation when deleting

func (*AWSManagedControlPlane) ValidateUpdate

func (r *AWSManagedControlPlane) ValidateUpdate(old runtime.Object) error

ValidateUpdate will do any extra validation when updating a AWSManagedControlPlane

type AWSManagedControlPlaneList

type AWSManagedControlPlaneList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []AWSManagedControlPlane `json:"items"`
}

AWSManagedControlPlaneList contains a list of AWSManagedControlPlane

func (*AWSManagedControlPlaneList) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedControlPlaneList.

func (*AWSManagedControlPlaneList) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*AWSManagedControlPlaneList) DeepCopyObject

func (in *AWSManagedControlPlaneList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type AWSManagedControlPlaneSpec

type AWSManagedControlPlaneSpec struct {
	// EKSClusterName allows you to specify the name of the EKS cluster in
	// AWS. If you don't specify a name then a default name will be created
	// based on the namespace and name of the managed control plane.
	// +optional
	EKSClusterName string `json:"eksClusterName,omitempty"`

	// NetworkSpec encapsulates all things related to AWS network.
	NetworkSpec infrav1.NetworkSpec `json:"networkSpec,omitempty"`

	// The AWS Region the cluster lives in.
	Region string `json:"region,omitempty"`

	// SSHKeyName is the name of the ssh key to attach to the bastion host. Valid values are empty string (do not use SSH keys), a valid SSH key name, or omitted (use the default SSH key name)
	// +optional
	SSHKeyName *string `json:"sshKeyName,omitempty"`

	// Version defines the desired Kubernetes version. If no version number
	// is supplied then the latest version of Kubernetes that EKS supports
	// will be used.
	// +kubebuilder:validation:MinLength:=2
	// +kubebuilder:validation:Pattern:=^v(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.?$
	// +optional
	Version *string `json:"version,omitempty"`

	// RoleName specifies the name of IAM role that gives EKS
	// permission to make API calls. If the role is pre-existing
	// we will treat it as unmanaged and not delete it on
	// deletion. If the EKSEnableIAM feature flag is true
	// and no name is supplied then a role is created.
	// +kubebuilder:validation:MinLength:=2
	// +optional
	RoleName *string `json:"roleName,omitempty"`

	// RoleAdditionalPolicies allows you to attach additional polices to
	// the control plane role. You must enable the EKSAllowAddRoles
	// feature flag to incorporate these into the created role.
	// +optional
	RoleAdditionalPolicies *[]string `json:"roleAdditionalPolicies,omitempty"`

	// Logging specifies which EKS Cluster logs should be enabled. Entries for
	// each of the enabled logs will be sent to CloudWatch
	// +optional
	Logging *ControlPlaneLoggingSpec `json:"logging,omitempty"`

	// EncryptionConfig specifies the encryption configuration for the cluster
	// +optional
	EncryptionConfig *EncryptionConfig `json:"encryptionConfig,omitempty"`

	// AdditionalTags is an optional set of tags to add to AWS resources managed by the AWS provider, in addition to the
	// ones added by default.
	// +optional
	AdditionalTags infrav1.Tags `json:"additionalTags,omitempty"`

	// Endpoints specifies access to this cluster's control plane endpoints
	// +optional
	EndpointAccess EndpointAccess `json:"endpointAccess,omitempty"`

	// ControlPlaneEndpoint represents the endpoint used to communicate with the control plane.
	// +optional
	ControlPlaneEndpoint clusterv1.APIEndpoint `json:"controlPlaneEndpoint"`

	// ImageLookupFormat is the AMI naming format to look up machine images when
	// a machine does not specify an AMI. When set, this will be used for all
	// cluster machines unless a machine specifies a different ImageLookupOrg.
	// Supports substitutions for {{.BaseOS}} and {{.K8sVersion}} with the base
	// OS and kubernetes version, respectively. The BaseOS will be the value in
	// ImageLookupBaseOS or ubuntu (the default), and the kubernetes version as
	// defined by the packages produced by kubernetes/release without v as a
	// prefix: 1.13.0, 1.12.5-mybuild.1, or 1.17.3. For example, the default
	// image format of capa-ami-{{.BaseOS}}-?{{.K8sVersion}}-* will end up
	// searching for AMIs that match the pattern capa-ami-ubuntu-?1.18.0-* for a
	// Machine that is targeting kubernetes v1.18.0 and the ubuntu base OS. See
	// also: https://golang.org/pkg/text/template/
	// +optional
	ImageLookupFormat string `json:"imageLookupFormat,omitempty"`

	// ImageLookupOrg is the AWS Organization ID to look up machine images when a
	// machine does not specify an AMI. When set, this will be used for all
	// cluster machines unless a machine specifies a different ImageLookupOrg.
	// +optional
	ImageLookupOrg string `json:"imageLookupOrg,omitempty"`

	// ImageLookupBaseOS is the name of the base operating system used to look
	// up machine images when a machine does not specify an AMI. When set, this
	// will be used for all cluster machines unless a machine specifies a
	// different ImageLookupBaseOS.
	ImageLookupBaseOS string `json:"imageLookupBaseOS,omitempty"`

	// Bastion contains options to configure the bastion host.
	// +optional
	Bastion infrav1.Bastion `json:"bastion"`

	// TokenMethod is used to specify the method for obtaining a client token for communicating with EKS
	// iam-authenticator - obtains a client token using iam-authentictor
	// aws-cli - obtains a client token using the AWS CLI
	// Defaults to iam-authenticator
	// +kubebuilder:default=iam-authenticator
	// +kubebuilder:validation:Enum=iam-authenticator;aws-cli
	TokenMethod *EKSTokenMethod `json:"tokenMethod,omitempty"`
}

AWSManagedControlPlaneSpec defines the desired state of AWSManagedControlPlane

func (*AWSManagedControlPlaneSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedControlPlaneSpec.

func (*AWSManagedControlPlaneSpec) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type AWSManagedControlPlaneStatus

type AWSManagedControlPlaneStatus struct {
	// Networks holds details about the AWS networking resources used by the control plane
	// +optional
	Network infrav1.Network `json:"network,omitempty"`
	// FailureDomains specifies a list fo available availability zones that can be used
	// +optional
	FailureDomains clusterv1.FailureDomains `json:"failureDomains,omitempty"`
	// Bastion holds details of the instance that is used as a bastion jump box
	// +optional
	Bastion *infrav1.Instance `json:"bastion,omitempty"`
	// Initialized denotes whether or not the control plane has the
	// uploaded kubernetes config-map.
	// +optional
	Initialized bool `json:"initialized"`
	// Ready denotes that the AWSManagedControlPlane API Server is ready to
	// receive requests and that the VPC infra is ready.
	// +kubebuilder:default=false
	Ready bool `json:"ready"`
	// ErrorMessage indicates that there is a terminal problem reconciling the
	// state, and will be set to a descriptive error message.
	// +optional
	FailureMessage *string `json:"failureMessage,omitempty"`
	// Conditions specifies the cpnditions for the managed control plane
	Conditions clusterv1.Conditions `json:"conditions,omitempty"`
}

AWSManagedControlPlaneStatus defines the observed state of AWSManagedControlPlane

func (*AWSManagedControlPlaneStatus) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new AWSManagedControlPlaneStatus.

func (*AWSManagedControlPlaneStatus) DeepCopyInto

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ControlPlaneLoggingSpec

type ControlPlaneLoggingSpec struct {
	// APIServer indicates if the Kubernetes API Server log (kube-apiserver) shoulkd be enabled
	// +kubebuilder:default=false
	APIServer bool `json:"apiServer"`
	// Audit indicates if the Kubernetes API audit log should be enabled
	// +kubebuilder:default=false
	Audit bool `json:"audit"`
	// Authenticator indicates if the iam authenticator log should be enabled
	// +kubebuilder:default=false
	Authenticator bool `json:"authenticator"`
	//ControllerManager indicates if the controller manager (kube-controller-manager) log should be enabled
	// +kubebuilder:default=false
	ControllerManager bool `json:"controllerManager"`
	// Scheduler indicates if the Kubernetes scheduler (kube-scheduler) log should be enabled
	// +kubebuilder:default=false
	Scheduler bool `json:"scheduler"`
}

ControlPlaneLoggingSpec defines what EKS control plane logs that should be enabled

func (*ControlPlaneLoggingSpec) DeepCopy

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ControlPlaneLoggingSpec.

func (*ControlPlaneLoggingSpec) DeepCopyInto

func (in *ControlPlaneLoggingSpec) DeepCopyInto(out *ControlPlaneLoggingSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ControlPlaneLoggingSpec) IsLogEnabled

func (s *ControlPlaneLoggingSpec) IsLogEnabled(logName string) bool

IsLogEnabled returns true if the log is enabled

type EKSTokenMethod

type EKSTokenMethod string

EKSTokenMethod defines the method for obtaining a client token to use when connecting to EKS.

type EncryptionConfig

type EncryptionConfig struct {
	// Provider specifies the ARN or alias of the CMK (in AWS KMS)
	Provider *string `json:"provider,omitempty"`
	//Resources specifies the resources to be encrypted
	Resources []*string `json:"resources,omitempty"`
}

EncryptionConfig specifies the encryption configuration for the EKS clsuter

func (*EncryptionConfig) DeepCopy

func (in *EncryptionConfig) DeepCopy() *EncryptionConfig

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EncryptionConfig.

func (*EncryptionConfig) DeepCopyInto

func (in *EncryptionConfig) DeepCopyInto(out *EncryptionConfig)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type EndpointAccess

type EndpointAccess struct {
	// Public controls whether control plane endpoints are publicly accessible
	// +optional
	Public *bool `json:"public,omitempty"`
	// PublicCIDRs specifies which blocks can access the public endpoint
	// +optional
	PublicCIDRs []*string `json:"publicCIDRs,omitempty"`
	// Private points VPC-internal control plane access to the private endpoint
	// +optional
	Private *bool `json:"private,omitempty"`
}

EndpointAccess specifies how control plane endpoints are accessible

func (*EndpointAccess) DeepCopy

func (in *EndpointAccess) DeepCopy() *EndpointAccess

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EndpointAccess.

func (*EndpointAccess) DeepCopyInto

func (in *EndpointAccess) DeepCopyInto(out *EndpointAccess)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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