@@ -48,49 +48,33 @@ export default class DataPlaneStack {
48
48
irsaRoles : [ "CloudWatchFullAccess" , "AmazonSQSFullAccess" ]
49
49
} ;
50
50
51
- const CloudWatchLogsWritePolicy = new iam . PolicyStatement ( {
52
- actions : [
53
- "logs:CreateLogGroup" ,
54
- "logs:CreateLogStream" ,
55
- "logs:DescribeLogStreams" ,
56
- "logs:PutLogEvents" ,
57
- "logs:GetLogEvents"
58
- ] ,
59
- resources : [ "*" ] ,
60
- } )
61
-
62
- const awsForFluentBitParams : blueprints . AwsForFluentBitAddOnProps = {
63
- iamPolicies : [ CloudWatchLogsWritePolicy ] ,
64
- namespace : "amazon-cloudwatch" ,
65
- values : {
66
- cloudWatchLogs : {
67
- region : cdk . Aws . REGION ,
68
- logRetentionDays : 7
69
- } ,
70
- tolerations : [ {
71
- "operator" : "Exists" ,
72
- "effect" : "NoSchedule"
73
- } ]
74
- } ,
75
- createNamespace : true
76
- }
77
-
78
- const containerInsightsParams : blueprints . ContainerInsightAddonProps = {
79
- values : {
80
- adotCollector : {
81
- daemonSet : {
82
- tolerations : [ {
83
- "operator" : "Exists" ,
84
- "effect" : "NoSchedule"
85
- } ] ,
86
- cwreceivers : {
87
- preferFullPodName : "true" ,
88
- addFullPodNameMetricLabel : "true"
51
+ const cloudWatchInsightsParams : blueprints . CloudWatchInsightsAddOnProps = {
52
+ configurationValues : {
53
+ tolerations : [
54
+ {
55
+ key : "runtime" ,
56
+ operator : "Exists" ,
57
+ effect : "NoSchedule"
58
+ } ,
59
+ {
60
+ key : "nvidia.com/gpu" ,
61
+ operator : "Exists" ,
62
+ effect : "NoSchedule"
63
+ }
64
+ ] ,
65
+ containerLogs : {
66
+ enabled : true ,
67
+ fluentBit : {
68
+ config : {
69
+ service : "[SERVICE]\n Flush 5\n Grace 30\n Log_Level info" ,
70
+ extraFiles : {
71
+ "application-log.conf" : "[INPUT]\n Name tail\n Tag kube.*\n Path /var/log/containers/*.log\n Parser docker\n DB /var/log/flb_kube.db\n Mem_Buf_Limit 5MB\n Skip_Long_Lines On\n Refresh_Interval 10\n\n[FILTER]\n Name kubernetes\n Match kube.*\n Kube_URL https://kubernetes.default.svc:443\n Kube_CA_File /var/run/secrets/kubernetes.io/serviceaccount/ca.crt\n Kube_Token_File /var/run/secrets/kubernetes.io/serviceaccount/token\n Kube_Tag_Prefix kube.var.log.containers.\n Merge_Log On\n Merge_Log_Key log_processed\n K8S-Logging.Parser On\n K8S-Logging.Exclude On\n\n[FILTER]\n Name grep\n Match kube.*\n Exclude $kubernetes['namespace_name'] kube-system\n\n[OUTPUT]\n Name cloudwatch\n Match kube.*\n region ${AWS_REGION}\n log_group_name /aws/containerinsights/${CLUSTER_NAME}/application\n log_stream_prefix ${HOST_NAME}-\n auto_create_group true\n retention_in_days 7"
72
+ }
89
73
}
90
74
}
91
75
}
92
76
}
93
- }
77
+ } ;
94
78
95
79
const SharedComponentAddOnParams : SharedComponentAddOnProps = {
96
80
inputSns : blueprints . getNamedResource ( "inputSNSTopic" ) ,
@@ -116,12 +100,10 @@ export default class DataPlaneStack {
116
100
new blueprints . addons . AwsLoadBalancerControllerAddOn ( ) ,
117
101
new blueprints . addons . KarpenterAddOn ( { interruptionHandling : true } ) ,
118
102
new blueprints . addons . KedaAddOn ( kedaParams ) ,
119
- new blueprints . addons . ContainerInsightsAddOn ( containerInsightsParams ) ,
120
- new blueprints . addons . AwsForFluentBitAddOn ( awsForFluentBitParams ) ,
103
+ new blueprints . addons . CloudWatchInsights ( cloudWatchInsightsParams ) ,
121
104
new s3CSIDriverAddOn ( s3CSIDriverAddOnParams ) ,
122
105
new SharedComponentAddOn ( SharedComponentAddOnParams ) ,
123
106
new EbsThroughputTunerAddOn ( EbsThroughputModifyAddOnParams ) ,
124
- new dcgmExporterAddOn ( { } )
125
107
] ;
126
108
127
109
// Generate SD Runtime Addon for runtime
@@ -160,9 +142,9 @@ const MngProps: blueprints.MngClusterProviderProps = {
160
142
minSize : 2 ,
161
143
maxSize : 2 ,
162
144
desiredSize : 2 ,
163
- version : eks . KubernetesVersion . V1_29 ,
164
- instanceTypes : [ new ec2 . InstanceType ( 'm5 .large' ) ] ,
165
- amiType : eks . NodegroupAmiType . AL2_X86_64 ,
145
+ version : eks . KubernetesVersion . V1_31 ,
146
+ instanceTypes : [ new ec2 . InstanceType ( 'm7g .large' ) ] ,
147
+ amiType : eks . NodegroupAmiType . AL2023_ARM_64_STANDARD ,
166
148
enableSsmPermissions : true ,
167
149
nodeGroupTags : {
168
150
"Name" : cdk . Aws . STACK_NAME + "-ClusterComponents" ,
@@ -172,7 +154,7 @@ const MngProps: blueprints.MngClusterProviderProps = {
172
154
173
155
// Deploy EKS cluster with all add-ons
174
156
const blueprint = blueprints . EksBlueprint . builder ( )
175
- . version ( eks . KubernetesVersion . V1_29 )
157
+ . version ( eks . KubernetesVersion . V1_31 )
176
158
. addOns ( ...addOns )
177
159
. resourceProvider (
178
160
blueprints . GlobalResources . Vpc ,
@@ -185,7 +167,7 @@ const blueprint = blueprints.EksBlueprint.builder()
185
167
. resourceProvider ( "s3GWEndpoint" , new s3GWEndpointProvider ( "s3GWEndpoint" ) )
186
168
. clusterProvider ( new blueprints . MngClusterProvider ( MngProps ) )
187
169
. build ( scope , id + 'Stack' , props ) ;
188
-
170
+ /*
189
171
// Workaround for permission denied when creating cluster
190
172
const handler = blueprint.node.tryFindChild('@aws-cdk--aws-eks.KubectlProvider')!
191
173
.node.tryFindChild('Handler')! as cdk.aws_lambda.Function
@@ -202,7 +184,7 @@ const blueprint = blueprints.EksBlueprint.builder()
202
184
actions: ["lambda:GetFunctionConfiguration"],
203
185
resources: [handler.functionArn]
204
186
}))
205
-
187
+ */
206
188
// Provide static output name for cluster
207
189
const cluster = blueprint . getClusterInfo ( ) . cluster
208
190
const clusterNameCfnOutput = cluster . node . findChild ( 'ClusterName' ) as cdk . CfnOutput ;
0 commit comments