Skip to content
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

Bug 1813221: jsonnet/telemeter: set cpu requests, unset limits #320

Merged
merged 4 commits into from
Mar 26, 2020
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 5 additions & 4 deletions jsonnet/telemeter/client/kubernetes.libsonnet
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,17 @@ local securePort = 8443;
] + matchRules) +
container.withPorts(containerPort.newNamed('http', insecurePort)) +
container.withVolumeMounts([sccabMount, secretMount]) +
container.withEnv([anonymize, from, id, to, httpProxy, httpsProxy, noProxy]);
container.withEnv([anonymize, from, id, to, httpProxy, httpsProxy, noProxy]) +
container.mixin.resources.withRequests({ cpu: '1m' });

local reload =
container.new('reload', $._config.imageRepos.configmapReload + ':' + $._config.versions.configmapReload) +
container.withArgs([
'--webhook-url=http://localhost:%s/-/reload' % insecurePort,
'--volume-dir=' + servingCertsCABundleMountPath,
]) +
container.withVolumeMounts([sccabMount]);
container.withVolumeMounts([sccabMount]) +
container.mixin.resources.withRequests({ cpu: '1m' });

local proxy =
container.new('kube-rbac-proxy', $._config.imageRepos.kubeRbacProxy + ':' + $._config.versions.kubeRbacProxy) +
Expand All @@ -149,8 +151,7 @@ local securePort = 8443;
'--tls-cipher-suites=' + std.join(',', $._config.tlsCipherSuites),
] else []) +
container.withPorts(containerPort.new(securePort) + containerPort.withName('https')) +
container.mixin.resources.withRequests({ cpu: '10m', memory: '20Mi' }) +
container.mixin.resources.withLimits({ cpu: '20m', memory: '40Mi' }) +
container.mixin.resources.withRequests({ cpu: '1m', memory: '20Mi' }) +
container.withVolumeMounts([tlsMount]);


Expand Down
11 changes: 7 additions & 4 deletions manifests/client/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ spec:
ports:
- containerPort: 8080
name: http
resources:
requests:
cpu: 1m
volumeMounts:
- mountPath: /etc/serving-certs-ca-bundle
name: serving-certs-ca-bundle
Expand All @@ -59,6 +62,9 @@ spec:
- --volume-dir=/etc/serving-certs-ca-bundle
image: quay.io/openshift/origin-configmap-reload:v3.11
name: reload
resources:
requests:
cpu: 1m
volumeMounts:
- mountPath: /etc/serving-certs-ca-bundle
name: serving-certs-ca-bundle
Expand All @@ -74,11 +80,8 @@ spec:
- containerPort: 8443
name: https
resources:
limits:
cpu: 20m
memory: 40Mi
requests:
cpu: 10m
cpu: 1m
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this enough?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for kube-rbac-proxy, yes, i measured it on a local e2e prometheus dump

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack, looks like this was set as the request for every container in the pod. Even thought it's just a request, I don't think it's enough for telemeter client

memory: 20Mi
volumeMounts:
- mountPath: /etc/tls/private
Expand Down