Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: close gaps in EKS Best Practices #53

Merged
merged 6 commits into from
Jan 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 28 additions & 1 deletion api/v1alpha1/awsadapterconfig_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,13 @@ type AWSAdapterConfigSpec struct {
Region *string `json:"region"`
}

// AccountData contains the AWS Account details
type AccountData struct {
ID *string `json:"id,omitempty"`
InspectorEnabledEC2 *bool `json:"inspectorEnabledEC2,omitempty"`
InspectorEnabledECR *bool `json:"inspectorEnabledECR,omitempty"`
}

// EKSCluster contains the EKS cluster's details
type EKSCluster struct {
ID *string `json:"id,omitempty"`
Expand All @@ -53,6 +60,13 @@ type EKSCluster struct {
Tags map[string]string `json:"tags,omitempty"`
}

// ECRRepository contains container repository details
type ECRRepository struct {
RepositoryName *string `json:"repositoryName,omitempty"`
RepositoryUri *string `json:"repositoryUri,omitempty"`
ImageTagMutable *bool `json:"imageTagMutable,omitempty"`
}

// EKSEncryptionConfig contains encryption configuration of the EKS cluster
type EKSEncryptionConfig struct {
KeyARN *string `json:"keyARN,omitempty"`
Expand All @@ -63,6 +77,7 @@ type EKSEncryptionConfig struct {
type EKSCompute struct {
NodeGroups []*EKSNodeGroup `json:"nodeGroups,omitempty"`
FargateProfiles []string `json:"fargateProfiles,omitempty"`
Reservations []*Reservation `json:"reservations,omitempty"`
}

// EKSNodeGroup contains info of the EKS cluster's node group
Expand Down Expand Up @@ -95,6 +110,15 @@ type EKSNodeGroupUpdateConfig struct {
MaxUnavailablePercentage *int32 `json:"maxUnavailablePercentage,omitempty"`
}

type Reservation struct {
Instances []*Instance `json:"instances,omitempty"`
}

type Instance struct {
HttpPutResponseHopLimit *int32 `json:"httpPutResponseHopLimit,omitempty"`
PublicDnsName *string `json:"publicDnsName,omitempty"`
}

// EKSNodeGroupResources contains info of ASG and remote access SG for node group
type EKSNodeGroupResources struct {
AutoScalingGroups []string `json:"autoScalingGroups,omitempty"`
Expand Down Expand Up @@ -144,6 +168,7 @@ type EKSVpcConfig struct {
SecurityGroupIDs []string `json:"securityGroupIDs,omitempty"`
SubnetIDs []string `json:"subnetIDs,omitempty"`
VpcID *string `json:"vpcID,omitempty"`
FlowLogsEnabled *bool `json:"flowLogsEnabled,omitempty"`
}

// EKSNetworking contains networking configuration of the EKS cluster
Expand Down Expand Up @@ -182,10 +207,12 @@ type AWSAdapterConfigStatus struct {
LastUpdatedTimestamp *metav1.Time `json:"lastUpdatedTimestamp,omitempty"`
// Information on when the adapter last tried to fetch the EKS cluster details
LastPollInfo LastPollInfo `json:"lastPollInfo"`
AccountData *AccountData `json:"accountData,omitempty"`
// EKS cluster details fetched from AWS
// For details of individual fields, refer to AWS SDK docs:
// https://pkg.go.dev/github.com/aws/aws-sdk-go-v2/service/[email protected]/types#Cluster
EKSCluster *EKSCluster `json:"eksCluster,omitempty"`
EKSCluster *EKSCluster `json:"eksCluster,omitempty"`
ECRRepositories []*ECRRepository `json:"ecrRepositories,omitempty"`
}

//+kubebuilder:object:root=true
Expand Down
143 changes: 143 additions & 0 deletions api/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading