-
Notifications
You must be signed in to change notification settings - Fork 25
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
Allow configurable resource requests and limits received by helm chart. #196
Merged
Conversation
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
…lm chart for init containers.
musa-asad
commented
Jul 17, 2024
lisguo
requested changes
Jul 17, 2024
…om upstream or helm chart, and added unit tests.
sky333999
reviewed
Jul 24, 2024
lisguo
reviewed
Jul 24, 2024
musa-asad
changed the title
Allow configurable resource limits received by helm chart.
Allow configurable resource requests and limits received by helm chart.
Jul 24, 2024
musa-asad
commented
Jul 25, 2024
lisguo
previously approved these changes
Jul 25, 2024
lisguo
previously approved these changes
Jul 25, 2024
lisguo
approved these changes
Jul 25, 2024
Paramadon
approved these changes
Jul 25, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes:
Receive the new
auto-instrumentation-config
command argument and apply those values to resources for init containers to have resource limits.Testing:
helm-charts/charts/amazon-cloudwatch-observability/templates/operator-deployment.yaml
to include the new image stored in ECR.kubectl apply -f helm-charts/charts/amazon-cloudwatch-observability/crds
to make sure the CRDs are up to date.helm upgrade --install amazon-cloudwatch-observability helm-charts/charts/amazon-cloudwatch-observability --values helm-charts/charts/amazon-cloudwatch-observability/values.yaml --set clusterName=cloudwatchagent-operator --set region=us-west-2 --set manager.autoInstrumentationImage.java.resources.limits.cpu=200m --set manager.autoInstrumentationImage.java.resources.limits.memory=512Mi --set manager.autoInstrumentationImage.java.resources.requests.cpu=200m --set manager.autoInstrumentationImage.java.resources.requests.memory=51Mi
using the updated helm chart with the local changes.We can confirm this works since when we run
kubectl edit deployment amazon-cloudwatch-observability-controller-manager
, we can see the following:kubectl apply -f amazon-cloudwatch-agent-operator/integration-tests/java/sample-deployment-java.yaml
to deploy a sample application, which is already in the operator repo for testing.kubectl get pods
to see the name of the sample app.kubectl describe pod <sample-app-pod>
to see if the limits are what we configured.The limits are correctly set.
Test cases:
helm upgrade --install amazon-cloudwatch-observability helm-charts/charts/amazon-cloudwatch-observability --values helm-charts/charts/amazon-cloudwatch-observability/values.yaml --set clusterName=cloudwatchagent-operator --set region=us-west-2 --set manager.autoInstrumentationImage.java.resources.limits.cpu=200m --set manager.autoInstrumentationImage.java.resources.limits.memory="" --set manager.autoInstrumentationImage.java.resources.requests.cpu=200m --set manager.autoInstrumentationImage.java.resources.requests.memory=51Mi
helm upgrade --install amazon-cloudwatch-observability helm-charts/charts/amazon-cloudwatch-observability --values helm-charts/charts/amazon-cloudwatch-observability/values.yaml --set clusterName=cloudwatchagent-operator --set region=us-west-2 --set manager.autoInstrumentationImage.java.resources.limits.cpu=test --set manager.autoInstrumentationImage.java.resources.limits.memory=512Mi --set manager.autoInstrumentationImage.java.resources.requests.cpu=200m --set manager.autoInstrumentationImage.java.resources.requests.memory=51Mi
Removed
{
to break the argument.By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.