-
Notifications
You must be signed in to change notification settings - Fork 4.4k
feat(eks-v2-alpha): make objectName optional in KubernetesObjectValue
#34549
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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The pull request linter fails with the following errors:
❌ Features must contain a change to a README file.
❌ Features must contain a change to an integration test file and the resulting snapshot.
If you believe this pull request should receive an exemption, please comment and provide a justification. A comment requesting an exemption should contain the text Exemption Request. Additionally, if clarification is needed, add Clarification Request to a comment.
✅ A exemption request has been requested. Please wait for a maintainer's review.
|
Exemption Request Unit tests exist |
It still needs an integ test because building an invalid command would cause deployment to fail, which the integ test catches but the unit test does not. |
| ClusterName: props.cluster.clusterName, | ||
| ObjectType: props.objectType, | ||
| ObjectName: props.objectName, | ||
| ObjectName: props.objectName ?? '--all-namespaces=false', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We shouldn't "hack" the parameter by passing a flag or an empty string in place of ObjectName, instead we should handle the case of ObjectName not being provided in the custom resource at:
| output = wait_for_output(['get', '-n', object_namespace, object_type, object_name, "-o=jsonpath='{{{0}}}'".format(json_path)], int(timeout_seconds)) |
objectName optional in KubernetesObjectValueobjectName optional in KubernetesObjectValue
|
we should make this pr a |
AWS CodeBuild CI Report
Powered by github-codebuild-logs, available on the AWS Serverless Application Repository |
objectName optional in KubernetesObjectValueobjectName optional in KubernetesObjectValue
Issue # (if applicable)
Closes #34148
Reason for this change
Currently,
objectNameis required so we can't retrieve some values from cluster withoutobjectNamelikekubectl get pod -o jsonpath={.apiVersion}.aws-cdk/packages/aws-cdk-lib/aws-eks/lib/k8s-object-value.ts
Lines 22 to 25 in 9ffa244
Description of changes
Describe any new or updated permissions being added
When
objectNameis not provided, pass the default--all-namespaces=falseargument which has no effect.Description of how you validated changes
Pass unit tests
Checklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license