Skip to content

Commit

Permalink
chore(eks): update failing snapshots (#30829)
Browse files Browse the repository at this point in the history
update `framework-integ/test/aws-eks/test/integ.eks-helm-asset.ts` that might fail in some cases:

1. set `aws.region` for the helm charts to ensure successful helm deployment
2. make sure each helm charts assertion use different chart source to avoid conflict
3. update the snapshots

### Issue # (if applicable)

Closes #<issue number here>.

### Reason for this change



### Description of changes



### Description of how you validated changes



### Checklist
- [x] My code adheres to the [CONTRIBUTING GUIDE](https://github.com/aws/aws-cdk/blob/main/CONTRIBUTING.md) and [DESIGN GUIDELINES](https://github.com/aws/aws-cdk/blob/main/docs/DESIGN_GUIDELINES.md)

----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
  • Loading branch information
pahud committed Jul 24, 2024
1 parent 597228c commit 7b2a653
Show file tree
Hide file tree
Showing 11 changed files with 81 additions and 23 deletions.

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -1092,6 +1092,18 @@
"Release": "s3-chart",
"Chart": "s3-chart",
"Version": "v0.1.0",
"Values": {
"Fn::Join": [
"",
[
"{\"aws\":{\"region\":\"",
{
"Ref": "AWS::Region"
},
"\"}}"
]
]
},
"Namespace": "ack-system",
"Repository": "oci://public.ecr.aws/aws-controllers-k8s/s3-chart",
"CreateNamespace": true
Expand Down Expand Up @@ -1123,6 +1135,18 @@
"Release": "lambda-chart-release",
"Chart": "lambda-chart",
"Version": "v0.1.4",
"Values": {
"Fn::Join": [
"",
[
"{\"aws\":{\"region\":\"",
{
"Ref": "AWS::Region"
},
"\"}}"
]
]
},
"Namespace": "ack-system",
"Repository": "oci://public.ecr.aws/aws-controllers-k8s/lambda-chart",
"CreateNamespace": true
Expand Down Expand Up @@ -1153,7 +1177,19 @@
},
"Release": "rds-chart-release",
"Chart": "rds-chart",
"Version": "v1.1.2",
"Version": "1.4.1",
"Values": {
"Fn::Join": [
"",
[
"{\"aws\":{\"region\":\"",
{
"Ref": "AWS::Region"
},
"\"}}"
]
]
},
"Namespace": "ack-system",
"Repository": "oci://public.ecr.aws/aws-controllers-k8s/rds-chart",
"CreateNamespace": true,
Expand Down Expand Up @@ -1183,11 +1219,23 @@
"Arn"
]
},
"Release": "rds-chart-release",
"Chart": "rds-chart",
"Version": "v1.1.2",
"Release": "ec2-chart-release",
"Chart": "ec2-chart",
"Version": "1.2.13",
"Values": {
"Fn::Join": [
"",
[
"{\"aws\":{\"region\":\"",
{
"Ref": "AWS::Region"
},
"\"}}"
]
]
},
"Namespace": "ack-system",
"Repository": "oci://public.ecr.aws/aws-controllers-k8s/rds-chart",
"Repository": "oci://public.ecr.aws/aws-controllers-k8s/ec2-chart",
"CreateNamespace": true,
"SkipCrds": true,
"Atomic": true
Expand Down Expand Up @@ -1298,7 +1346,7 @@
{
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"/e23ed13a7821108db50050a225f7b03107502f583d2faa3a1f82a71756081a75.json"
"/103a1c2a2539a9843f062d1d618f1fbd8483ea496405f34f6aca5ae90f507af8.json"
]
]
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"S3Bucket": {
"Fn::Sub": "cdk-hnb659fds-assets-${AWS::AccountId}-${AWS::Region}"
},
"S3Key": "abc70c90ded969d12235ca11768293cb20557cff54518518480c0d9fb344a098.zip"
"S3Key": "58216e9cbe7ed5d0c2b7c7d47e173e8f81c25ea6457f5446c34c22be7e6f7f51.zip"
},
"Description": "onEvent handler for EKS kubectl resource provider",
"Environment": {
Expand Down

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

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

Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,15 @@ class EksClusterStack extends Stack {
chartAsset: chartAsset,
});

// https://gallery.ecr.aws/aws-controllers-k8s/s3-chart
this.cluster.addHelmChart('test-oci-chart', {
chart: 's3-chart',
release: 's3-chart',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/s3-chart',
version: 'v0.1.0',
namespace: 'ack-system',
createNamespace: true,
values: { aws: { region: this.region } },
});

// there is no opinionated way of testing charts from private ECR, so there is description of manual steps needed to reproduce:
Expand All @@ -68,38 +70,45 @@ class EksClusterStack extends Stack {
// 5. Change `repository` in above test to oci://YOUR_ACCOUNT_ID.dkr.ecr.YOUR_REGION.amazonaws.com/helm-charts-test
// 6. Run integration tests as usual

// https://gallery.ecr.aws/aws-controllers-k8s/lambda-chart
this.cluster.addHelmChart('test-oci-chart-different-release-name', {
chart: 'lambda-chart',
release: 'lambda-chart-release',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/lambda-chart',
version: 'v0.1.4',
namespace: 'ack-system',
createNamespace: true,
values: { aws: { region: this.region } },
});

// testing the disable mechanism of the installation of CRDs
// https://gallery.ecr.aws/aws-controllers-k8s/rds-chart
this.cluster.addHelmChart('test-skip-crd-installation', {
chart: 'rds-chart',
release: 'rds-chart-release',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/rds-chart',
version: 'v1.1.2',
version: '1.4.1',
namespace: 'ack-system',
createNamespace: true,
skipCrds: true,
values: { aws: { region: this.region } },
});

//testing installation with atomic flag set to true
// testing installation with atomic flag set to true
// https://gallery.ecr.aws/aws-controllers-k8s/sns-chart
this.cluster.addHelmChart('test-atomic-installation', {
chart: 'rds-chart',
release: 'rds-chart-release',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/rds-chart',
version: 'v1.1.2',
chart: 'ec2-chart',
release: 'ec2-chart-release',
repository: 'oci://public.ecr.aws/aws-controllers-k8s/ec2-chart',
version: '1.2.13',
namespace: 'ack-system',
createNamespace: true,
skipCrds: true,
atomic: true,
values: { aws: { region: this.region } },
});

// https://github.com/orgs/grafana-operator/packages/container/package/helm-charts%2Fgrafana-operator
this.cluster.addHelmChart('test-non-ecr-oci-chart', {
chart: 'grafana-operator',
release: 'grafana-operator-release',
Expand Down

0 comments on commit 7b2a653

Please sign in to comment.