-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: close gaps in EKS Best Practices (#53)
Co-authored-by: Pankaj Khushalani <[email protected]>
- Loading branch information
1 parent
05c0c9f
commit e1c95ec
Showing
8 changed files
with
550 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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"` | ||
|
@@ -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"` | ||
|
@@ -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 | ||
|
@@ -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"` | ||
|
@@ -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 | ||
|
@@ -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 | ||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.