Documentation ¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the compute v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/apis/aws/compute +k8s:defaulter-gen=TypeMeta +groupName=compute.aws.crossplane.io
Package v1alpha1 contains API Schema definitions for the compute v1alpha1 API group +k8s:openapi-gen=true +k8s:deepcopy-gen=package,register +k8s:conversion-gen=github.com/crossplaneio/crossplane/pkg/aws/apis/aws/compute +k8s:defaulter-gen=TypeMeta +groupName=compute.aws.crossplane.io
Index ¶
- Constants
- Variables
- func GetRegionAMI(region EKSRegion) (string, error)
- type EKSCluster
- func (e *EKSCluster) ConnectionSecret() *corev1.Secret
- func (e *EKSCluster) ConnectionSecretName() string
- func (in *EKSCluster) DeepCopy() *EKSCluster
- func (in *EKSCluster) DeepCopyInto(out *EKSCluster)
- func (in *EKSCluster) DeepCopyObject() runtime.Object
- func (e *EKSCluster) IsAvailable() bool
- func (e *EKSCluster) IsBound() bool
- func (e *EKSCluster) ObjectReference() *corev1.ObjectReference
- func (e *EKSCluster) OwnerReference() metav1.OwnerReference
- func (e *EKSCluster) SetBound(bound bool)
- func (e *EKSCluster) SetConnectionSecretReference(secret *corev1.Secret)
- func (e *EKSCluster) SetState(s string)
- func (e *EKSCluster) State() string
- type EKSClusterList
- type EKSClusterSpec
- type EKSClusterStatus
- type EKSRegion
- type MapRole
- type MapUser
- type WorkerNodesSpec
Constants ¶
const ( Group = "compute.aws.crossplane.io" Version = "v1alpha1" APIVersion = Group + "/" + Version EKSClusterKind = "ekscluster" EKSClusterKindAPIVersion = EKSClusterKind + "." + APIVersion )
Kubernetes Group, Version, and Kind metadata.
const ( // The resource is inaccessible while it is being created. ClusterStatusCreating = "CREATING" ClusterStatusActive = "ACTIVE" )
Cluster statuses.
Variables ¶
var ( // SchemeGroupVersion is group version used to register these objects SchemeGroupVersion = schema.GroupVersion{Group: Group, Version: Version} // SchemeBuilder is used to add go types to the GroupVersionKind scheme SchemeBuilder = &scheme.Builder{GroupVersion: SchemeGroupVersion} )
Functions ¶
func GetRegionAMI ¶
GetRegionAMI returns the default ami id for a given EKS region
Types ¶
type EKSCluster ¶
type EKSCluster struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec EKSClusterSpec `json:"spec,omitempty"` Status EKSClusterStatus `json:"status,omitempty"` }
EKSCluster is the Schema for the resources API +k8s:openapi-gen=true +groupName=compute.aws +kubebuilder:printcolumn:name="STATUS",type="string",JSONPath=".status.bindingPhase" +kubebuilder:printcolumn:name="STATE",type="string",JSONPath=".status.state" +kubebuilder:printcolumn:name="CLUSTER-NAME",type="string",JSONPath=".status.clusterName" +kubebuilder:printcolumn:name="ENDPOINT",type="string",JSONPath=".status.endpoint" +kubebuilder:printcolumn:name="CLUSTER-CLASS",type="string",JSONPath=".spec.classRef.name" +kubebuilder:printcolumn:name="LOCATION",type="string",JSONPath=".spec.location" +kubebuilder:printcolumn:name="RECLAIM-POLICY",type="string",JSONPath=".spec.reclaimPolicy" +kubebuilder:printcolumn:name="AGE",type="date",JSONPath=".metadata.creationTimestamp"
func (*EKSCluster) ConnectionSecret ¶
func (e *EKSCluster) ConnectionSecret() *corev1.Secret
ConnectionSecret with this cluster owner reference
func (*EKSCluster) ConnectionSecretName ¶
func (e *EKSCluster) ConnectionSecretName() string
ConnectionSecretName returns the name of the connection secret
func (*EKSCluster) DeepCopy ¶
func (in *EKSCluster) DeepCopy() *EKSCluster
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSCluster.
func (*EKSCluster) DeepCopyInto ¶
func (in *EKSCluster) DeepCopyInto(out *EKSCluster)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EKSCluster) DeepCopyObject ¶
func (in *EKSCluster) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*EKSCluster) IsAvailable ¶
func (e *EKSCluster) IsAvailable() bool
IsAvailable for usage/binding
func (*EKSCluster) IsBound ¶
func (e *EKSCluster) IsBound() bool
IsBound returns true if this cluster is bound to a resource claim.
func (*EKSCluster) ObjectReference ¶
func (e *EKSCluster) ObjectReference() *corev1.ObjectReference
ObjectReference to this EKSCluster
func (*EKSCluster) OwnerReference ¶
func (e *EKSCluster) OwnerReference() metav1.OwnerReference
OwnerReference to use this resource as an owner
func (*EKSCluster) SetBound ¶
func (e *EKSCluster) SetBound(bound bool)
SetBound specifies whether this cluster is bound to a resource claim.
func (*EKSCluster) SetConnectionSecretReference ¶
func (e *EKSCluster) SetConnectionSecretReference(secret *corev1.Secret)
SetConnectionSecretReference sets a local object reference to this secret in Status.ConnectionSecretRef
func (*EKSCluster) SetState ¶
func (e *EKSCluster) SetState(s string)
SetState sets status state field
func (*EKSCluster) State ¶
func (e *EKSCluster) State() string
State returns rds resource state value saved in the status (could be empty)
type EKSClusterList ¶
type EKSClusterList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []EKSCluster `json:"items"` }
EKSClusterList contains a list of EKSCluster items
func (*EKSClusterList) DeepCopy ¶
func (in *EKSClusterList) DeepCopy() *EKSClusterList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSClusterList.
func (*EKSClusterList) DeepCopyInto ¶
func (in *EKSClusterList) DeepCopyInto(out *EKSClusterList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*EKSClusterList) DeepCopyObject ¶
func (in *EKSClusterList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type EKSClusterSpec ¶
type EKSClusterSpec struct { // Region for EKS Cluster // +kubebuilder:validation:Enum=us-west-2,us-east-1,eu-west-1 Region EKSRegion `json:"region"` // RoleARN --role-arn // The Amazon Resource Name (ARN) of the IAM role that provides permis- // sions for Amazon EKS to make calls to other AWS API operations on // your behalf. For more information, see Amazon EKS Service IAM Role // in the * Amazon EKS User Guide * . // TODO: we could simplify this to roleName. RoleARN string `json:"roleARN"` // ResourcesVPCConfig --resources-vpc-config (structure) // The VPC subnets and security groups used by the cluster control // plane. Amazon EKS VPC resources have specific requirements to work // properly with Kubernetes. For more information, see Cluster VPC Con- // siderations and Cluster Security Group Considerations in the Amazon // EKS User Guide . You must specify at least two subnets. You may // specify up to 5 security groups, but we recommend that you use a // dedicated security group for your cluster control plane. // // VpcID of EKS cluster VpcID string `json:"vpcId"` // SubnetIds // Syntax: // subnetIds=string,string, SubnetIds []string `json:"subnetIds"` // SecurityGroupIds // Syntax: // securityGroupIds=string,string, SecurityGroupIds []string `json:"securityGroupIds"` // ClientRequestToken // --client-request-token (string) // Unique, case-sensitive identifier you provide to ensure the idempo- // tency of the request. ClientRequestToken string `json:"clientRequestToken,omitempty"` // ClusterVersion --kubernetes-version (string) // The desired Kubernetes version for your cluster. If you do not spec- // ify a value here, the latest version available in Amazon EKS is // used. ClusterVersion string `json:"clusterVersion,omitempty"` // CLIInput --cli-input-json (string) Performs service operation based on the JSON // string provided. The JSON string follows the format provided by --gen- // erate-cli-skeleton. If other arguments are provided on the command // line, the CLI values will override the JSON-provided values. It is not // possible to pass arbitrary binary values using a JSON-provided value as // the string will be taken literally. CLIInput string `json:"cliInput,omitempty"` // GenerateCLISkeleton --generate-cli-skeleton (string) Prints a JSON skeleton to standard // output without sending an API request. If provided with no value or the // value input, prints a sample input JSON that can be used as an argument // for --cli-input-json. If provided with the value output, it validates // the command inputs and returns a sample output JSON for that command. GenerateCLISkeleton string `json:"generateCLISkeleton,omitempty"` // WorkerNodes configuration for cloudformation WorkerNodes WorkerNodesSpec `json:"workerNodes"` // ConnectionSecretNameOverride set this override the generated name of Status.ConnectionSecretRef.Name ConnectionSecretNameOverride string `json:"connectionSecretNameOverride,omitempty"` // MapRoles - each item maps an aws role to kubernetes groups // Default role that allows nodes access to communicate with master is autogenerated when a node pool comes online. // Additional map roles configuration are documented in the link below // https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/master/README.md // //# map arn:aws:iam::000000000000:role/KubernetesAdmin to cluster admin // - rolearn: arn:aws:iam::000000000000:role/KubernetesAdmin // username: kubernetes-admin // groups: // - system:masters MapRoles []MapRole `json:"mapRoles,omitempty"` // MapUsers - each item maps an aws users to kubernetes groups // Additional map users configuration options are documented in the link below // https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/master/README.md // //# map user IAM user Alice in 000000000000 to user "alice" in group "system:masters" //- userarn: arn:aws:iam::000000000000:user/Alice // username: alice // groups: // - system:masters MapUsers []MapUser `json:"mapUsers,omitempty"` // Kubernetes object references ClaimRef *corev1.ObjectReference `json:"claimRef,omitempty"` ClassRef *corev1.ObjectReference `json:"classRef,omitempty"` ProviderRef corev1.LocalObjectReference `json:"providerRef"` // ReclaimPolicy identifies how to handle the cloud resource after the deletion of this type ReclaimPolicy corev1alpha1.ReclaimPolicy `json:"reclaimPolicy,omitempty"` }
EKSClusterSpec specifies the configuration for an EKS cluster.
func NewEKSClusterSpec ¶
func NewEKSClusterSpec(properties map[string]string) *EKSClusterSpec
NewEKSClusterSpec from properties map
func (*EKSClusterSpec) DeepCopy ¶
func (in *EKSClusterSpec) DeepCopy() *EKSClusterSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSClusterSpec.
func (*EKSClusterSpec) DeepCopyInto ¶
func (in *EKSClusterSpec) DeepCopyInto(out *EKSClusterSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EKSClusterStatus ¶
type EKSClusterStatus struct { corev1alpha1.ConditionedStatus corev1alpha1.BindingStatusPhase // State of the cluster (see status constants above) State string `json:"state,omitempty"` // ClusterName identifier ClusterName string `json:"resourceName,omitempty"` // Endpoint for cluster Endpoint string `json:"endpoint,omitempty"` // CloudFormationStackID Stack-id CloudFormationStackID string `json:"cloudformationStackId,omitempty"` ConnectionSecretRef corev1.LocalObjectReference `json:"connectionSecretRef,omitempty"` }
EKSClusterStatus schema of the status of eks cluster
func (*EKSClusterStatus) DeepCopy ¶
func (in *EKSClusterStatus) DeepCopy() *EKSClusterStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new EKSClusterStatus.
func (*EKSClusterStatus) DeepCopyInto ¶
func (in *EKSClusterStatus) DeepCopyInto(out *EKSClusterStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type EKSRegion ¶
type EKSRegion string
EKSRegion represents an EKS enabled AWS region.
const ( // EKSRegionUSWest2 - us-west-2 (Oregon) region for eks cluster EKSRegionUSWest2 EKSRegion = "us-west-2" // EKSRegionUSEast1 - us-east-1 (N. Virginia) region for eks cluster EKSRegionUSEast1 EKSRegion = "us-east-1" // EKSRegionUSEast2 - us-east-2 (Ohio) region for eks worker only EKSRegionUSEast2 EKSRegion = "us-east-2" // EKSRegionEUWest1 - eu-west-1 (Ireland) region for eks cluster EKSRegionEUWest1 EKSRegion = "eu-west-1" )
EKS regions.
type MapRole ¶
type MapRole struct { RoleARN string `json:"rolearn"` Username string `json:"username"` Groups []string `json:"groups"` }
MapRole maps an aws role to kubernetes groups see: https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/master/README.md
func (*MapRole) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MapRole.
func (*MapRole) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MapUser ¶ added in v0.2.0
type MapUser struct { UserARN string `json:"userarn"` Username string `json:"username"` Groups []string `json:"groups"` }
MapUser maps an aws user to kubernetes groups see: https://docs.aws.amazon.com/eks/latest/userguide/add-user-role.html https://github.com/kubernetes-sigs/aws-iam-authenticator/blob/master/README.md
func (*MapUser) DeepCopy ¶ added in v0.2.0
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new MapUser.
func (*MapUser) DeepCopyInto ¶ added in v0.2.0
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WorkerNodesSpec ¶
type WorkerNodesSpec struct { // KeyName The EC2 Key Pair to allow SSH access to the instances KeyName string `json:"keyName"` // NodeImageId The EC2 Key Pair to allow SSH access to the instances // defaults to region standard AMI NodeImageID string `json:"nodeImageId,omitempty"` // NodeInstanceType EC2 instance type for the node instances // +kubebuilder:validation:Enum=t2.small,t2.medium,t2.large,t2.xlarge,t2.2xlarge,t3.nano,t3.micro,t3.small,t3.medium,t3.large,t3.xlarge,t3.2xlarge,m3.medium,m3.large,m3.xlarge,m3.2xlarge,m4.large,m4.xlarge,m4.2xlarge,m4.4xlarge,m4.10xlarge,m5.large,m5.xlarge,m5.2xlarge,m5.4xlarge,m5.12xlarge,m5.24xlarge,c4.large,c4.xlarge,c4.2xlarge,c4.4xlarge,c4.8xlarge,c5.large,c5.xlarge,c5.2xlarge,c5.4xlarge,c5.9xlarge,c5.18xlarge,i3.large,i3.xlarge,i3.2xlarge,i3.4xlarge,i3.8xlarge,i3.16xlarge,r3.xlarge,r3.2xlarge,r3.4xlarge,r3.8xlarge,r4.large,r4.xlarge,r4.2xlarge,r4.4xlarge,r4.8xlarge,r4.16xlarge,x1.16xlarge,x1.32xlarge,p2.xlarge,p2.8xlarge,p2.16xlarge,p3.2xlarge,p3.8xlarge,p3.16xlarge,r5.large,r5.xlarge,r5.2xlarge,r5.4xlarge,r5.12xlarge,r5.24xlarge,r5d.large,r5d.xlarge,r5d.2xlarge,r5d.4xlarge,r5d.12xlarge,r5d.24xlarge,z1d.large,z1d.xlarge,z1d.2xlarge,z1d.3xlarge,z1d.6xlarge,z1d.12xlarge NodeInstanceType string `json:"nodeInstanceType"` // NodeAutoScalingGroupMinSize Minimum size of Node Group ASG. // default 1 NodeAutoScalingGroupMinSize *int `json:"nodeAutoScalingGroupMinSize,omitempty"` // NodeAutoScalingGroupMaxSize Maximum size of Node Group ASG. // Default: 3 NodeAutoScalingGroupMaxSize *int `json:"nodeAutoScalingGroupMaxSize,omitempty"` // NodeVolumeSize Node volume size in GB // Default: 20 NodeVolumeSize *int `json:"nodeVolumeSize,omitempty"` // BootstrapArguments Arguments to pass to the bootstrap script. See files/bootstrap.sh in https://github.com/awslabs/amazon-eks-ami // Default: "" BootstrapArguments string `json:"bootstrapArguments,omitempty"` // NodeGroupName Unique identifier for the Node Group. NodeGroupName string `json:"nodeGroupName,omitempty"` // ClusterControlPlaneSecurityGroup The security group of the cluster control plane. ClusterControlPlaneSecurityGroup string `json:"clusterControlPlaneSecurityGroup,omitempty"` }
WorkerNodesSpec - Worker node spec used to define cloudformation template that provisions workers for cluster
func (*WorkerNodesSpec) DeepCopy ¶
func (in *WorkerNodesSpec) DeepCopy() *WorkerNodesSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WorkerNodesSpec.
func (*WorkerNodesSpec) DeepCopyInto ¶
func (in *WorkerNodesSpec) DeepCopyInto(out *WorkerNodesSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.