Skip to content

Commit

Permalink
Merge pull request #889 from bnaydenov/issue_888_fix
Browse files Browse the repository at this point in the history
CloudWatchLogsAddon: setting logRetentionDays param does not work and not set cloudWatchLogs.logRetentionDays when creating CloudWatch Log Groups
  • Loading branch information
shapirov103 authored Dec 13, 2023
2 parents 69d730e + 20a9fdb commit 1dfc828
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion lib/addons/cloudwatch-logs/iam-policy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ export function getCloudWatchLogsPolicyDocument() : Statement[] {
"logs:DescribeLogStreams",
"logs:DescribeLogGroups",
"logs:CreateLogStream",
"logs:CreateLogGroup"
"logs:CreateLogGroup",
"logs:PutRetentionPolicy",
"logs:DeleteRetentionPolicy"
],
"Resource": "*"
}
Expand Down
4 changes: 2 additions & 2 deletions lib/addons/cloudwatch-logs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ function populateValues(clusterInfo: ClusterInfo, helmOptions: CloudWatchLogsAdd
setPath(values, "cloudWatchLogs.logGroupName", `${helmOptions.logGroupPrefix}/workloads`);
setPath(values, "cloudWatchLogs.logGroupTemplate", `${helmOptions.logGroupPrefix}/$kubernetes['namespace_name']`);
setPath(values, "cloudWatchLogs.logStreamTemplate", "$kubernetes['container_name'].$kubernetes['pod_name']");
setPath(values, "cloudWatchLogs.log_key", "log");
setPath(values, "cloudWatchLogs.log_retention_days", helmOptions.logRetentionDays);
setPath(values, "cloudWatchLogs.logKey", "log");
setPath(values, "cloudWatchLogs.logRetentionDays", helmOptions.logRetentionDays);
return values;
}

0 comments on commit 1dfc828

Please sign in to comment.