-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
jsonnet: run pyrra only on amd64 nodes with configured resource requests #1720
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.
Nice work!
We can also work on arm images for Pyrra, if that's something people want.
@@ -22,6 +22,11 @@ | |||
namespace:: error 'must provide namespace', | |||
version:: error 'must provide version', | |||
image: error 'must provide image', | |||
resources: { | |||
// TODO(paulfantom): configure limits when we have more operational data |
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.
Pyrra has a built in cache for graphs. This can, by default, be up to 512MiB. We can make this configurable in Pyrra and set this, plus some extra, as it's limit.
resources: { | ||
// TODO(paulfantom): configure limits when we have more operational data | ||
// limits: { cpu: '100m', memory: '100Mi' }, | ||
requests: { cpu: '4m', memory: '100Mi' }, |
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.
This might get the API throttled just a bit too much. Currently, we convert the time series into another format.
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.
Since the most important part of this PR is to allow easy customization of those resources and not figure out the best possible values, I've removed cpu resource requirements and left only memory ones. We can change this later on.
Signed-off-by: Paweł Krupa (paulfantom) <[email protected]>
@@ -72,10 +76,10 @@ | |||
image: pyrra._config.image, | |||
args: [ | |||
'api', | |||
'--api-url=http://%s.%s.svc.cluster.local:9444' % [pyrra.kubernetesService.metadata.name, pyrra.kubernetesService.metadata.namespace], | |||
'--prometheus-url=http://prometheus-k8s.%s.svc.cluster.local:9090' % pyrra._config.namespace, | |||
'--api-url=http://%s.%s.svc:9444' % [pyrra.kubernetesService.metadata.name, pyrra.kubernetesService.metadata.namespace], |
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.
I've removed cluster.local
as not all clusters use this DNS suffix.
nodeSelector: { 'kubernetes.io/os': 'linux' }, | ||
nodeSelector: { | ||
'kubernetes.io/os': 'linux', | ||
'kubernetes.io/arch': 'amd64', |
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.
This can be removed when pyrra publishes arm64 images (WIP: pyrra-dev/pyrra#249)
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.
This lgtm. When can we get this merged? @metalmatze
Description
Describe the big picture of your changes here to communicate to the maintainers why we should accept this pull request.
If it fixes a bug or resolves a feature request, be sure to link to that issue.
Solving #1718
Type of change
What type of changes does your code introduce to the kube-prometheus? Put an
x
in the box that apply.CHANGE
(fix or feature that would cause existing functionality to not work as expected)FEATURE
(non-breaking change which adds functionality)BUGFIX
(non-breaking change which fixes an issue)ENHANCEMENT
(non-breaking change which improves existing functionality)NONE
(if none of the other choices apply. Example, tooling, build system, CI, docs, etc.)Changelog entry
Please put a one-line changelog entry below. Later this will be copied to the changelog file.