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

feat(chart): Set GOMAXPROCS and GOMEMLIMIT environment variables #8989

Merged
merged 1 commit into from
May 22, 2024

Conversation

jnoordsij
Copy link
Contributor

@jnoordsij jnoordsij commented Apr 30, 2024

Set GOMAXPROCS and GOMEMLIMIT environment variables based on container resources.

The resourceFieldRef is a very specific Kubernetes directive that is created specifically for passing resource-related values, which rounds up the CPU value to the nearest whole number (e.g. 250m to 1) and passes the memory as a numeric value; so 64Mi would result in the environment variable being set to 67108864. This by design makes it completely compatible with Go's API.

An example is documented within Kubernetes documentation itself: https://kubernetes.io/docs/tasks/inject-data-application/environment-variable-expose-pod-information/#use-container-fields-as-values-for-environment-variables.

Inspired by traefik/traefik-helm-chart#1029, this should reduce potential CPU throttling and OOMKills on containers.

This also replaces a reference to .Values.web.containers.env in the metrics-scraper deployment, which I assumed to be an unintented faulty value.

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Apr 30, 2024
@k8s-ci-robot k8s-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Apr 30, 2024
@floreks floreks changed the title [helm] Set GOMAXPROCS and GOMEMLIMIT environment variables feat(helm): Set GOMAXPROCS and GOMEMLIMIT environment variables May 22, 2024
@floreks floreks changed the title feat(helm): Set GOMAXPROCS and GOMEMLIMIT environment variables feat(chart): Set GOMAXPROCS and GOMEMLIMIT environment variables May 22, 2024
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: floreks, jnoordsij

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label May 22, 2024
@floreks floreks added the kind/feature Categorizes issue or PR as related to a new feature. label May 22, 2024
@floreks floreks self-assigned this May 22, 2024
Copy link

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 37.19%. Comparing base (a49364c) to head (a908b50).
Report is 40 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #8989      +/-   ##
==========================================
- Coverage   37.20%   37.19%   -0.01%     
==========================================
  Files         255      255              
  Lines       11156    11156              
  Branches      157      158       +1     
==========================================
- Hits         4151     4150       -1     
- Misses       6755     6756       +1     
  Partials      250      250              

@floreks floreks merged commit 0b35416 into kubernetes:master May 22, 2024
17 of 22 checks passed
@jnoordsij jnoordsij deleted the set-gomemlimit-gomaxprocs branch May 22, 2024 16:02
kireque pushed a commit to kireque/home-ops that referenced this pull request Jun 6, 2024
This PR contains the following updates:

| Package | Update | Change |
|---|---|---|
| [kubernetes-dashboard](https://github.com/kubernetes/dashboard) |
minor | `7.4.0` -> `7.5.0` |

---

### Release Notes

<details>
<summary>kubernetes/dashboard (kubernetes-dashboard)</summary>

###
[`v7.5.0`](https://github.com/kubernetes/dashboard/releases/tag/kubernetes-dashboard-7.5.0)

[Compare
Source](https://github.com/kubernetes/dashboard/compare/kubernetes-dashboard-7.4.0...kubernetes-dashboard-7.5.0)

#### What's Changed

- chore(deps): bump github.com/golangci/golangci-lint from 1.58.0 to
1.58.1 in /modules/common/tools by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9021
- chore(deps-dev): bump
[@&#8203;graphql-mesh/transform-replace-field](https://github.com/graphql-mesh/transform-replace-field)
from 0.98.3 to 0.98.4 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9027
- chore(deps-dev): bump semver from 7.6.1 to 7.6.2 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9028
- chore(deps-dev): bump
[@&#8203;typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin)
from 7.8.0 to 7.9.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9034
- chore(deps): bump ace-builds from 1.33.1 to 1.33.2 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9035
- chore(deps): bump codecov/codecov-action from 4.3.1 to 4.4.0 by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9037
- chore(deps-dev): bump sass from 1.77.0 to 1.77.2 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9055
- chore(deps-dev): bump cypress from 13.8.1 to 13.9.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9026
- chore(deps-dev): bump
[@&#8203;graphql-mesh/openapi](https://github.com/graphql-mesh/openapi)
from 0.100.5 to 0.100.8 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9033
- chore(deps-dev): bump
[@&#8203;types/node](https://github.com/types/node) from 20.12.10 to
20.12.12 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9036
- chore(deps-dev): bump
[@&#8203;graphql-mesh/cli](https://github.com/graphql-mesh/cli) from
0.90.3 to 0.90.5 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9025
- chore(deps-dev): bump
[@&#8203;graphql-mesh/runtime](https://github.com/graphql-mesh/runtime)
from 0.99.3 to 0.99.5 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9023
- feat(chart): Set `GOMAXPROCS` and `GOMEMLIMIT` environment variables
by [@&#8203;jnoordsij](https://github.com/jnoordsij) in
[kubernetes/dashboard#8989
- chore(deps): bump core-js from 3.37.0 to 3.37.1 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9058
- chore(deps): bump github.com/golangci/golangci-lint from 1.58.1 to
1.58.2 in /modules/common/tools by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9060
- chore(deps): bump codecov/codecov-action from 4.4.0 to 4.4.1 by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9065
- chore(deps-dev): bump
[@&#8203;graphql-mesh/cli](https://github.com/graphql-mesh/cli) from
0.90.5 to 0.90.7 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9072
- chore(deps): bump ngx-cookie-service from 17.1.0 to 18.0.0 in
/modules/web by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9073
- chore(deps-dev): bump ts-jest from 29.1.2 to 29.1.3 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9061
- chore(deps-dev): bump lint-staged from 15.2.2 to 15.2.4 in
/modules/web by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9068
- chore(deps-dev): bump
[@&#8203;typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin)
from 7.9.0 to 7.10.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9064
- chore(deps-dev): bump cypress from 13.9.0 to 13.10.0 in /modules/web
by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9069
- chore(deps-dev): bump jest-preset-angular from 14.0.4 to 14.1.0 in
/modules/web by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9062
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)
from 7.8.0 to 7.10.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9063
- chore(deps): bump ace-builds from 1.33.2 to 1.34.1 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9075
- chore(deps-dev): bump
[@&#8203;babel/register](https://github.com/babel/register) from
7.23.7 to 7.24.6 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9085
- chore(deps-dev): bump stylelint from 16.5.0 to 16.6.0 in /modules/web
by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9086
- chore(deps): bump ace-builds from 1.34.1 to 1.34.2 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9088
- chore(deps): bump github.com/golangci/golangci-lint from 1.58.2 to
1.59.0 in /modules/common/tools by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9089
- chore(deps): bump docker/login-action from 3.1.0 to 3.2.0 by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9092
- chore(deps-dev): bump
[@&#8203;graphql-mesh/transform-replace-field](https://github.com/graphql-mesh/transform-replace-field)
from 0.98.4 to 0.98.6 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9096
- chore(deps-dev): bump
[@&#8203;babel/core](https://github.com/babel/core) from 7.24.5 to
7.24.6 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9081
- chore(deps-dev): bump ng-extract-i18n-merge from 2.11.2 to 2.12.0 in
/modules/web by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9087
- chore(deps-dev): bump
[@&#8203;graphql-mesh/openapi](https://github.com/graphql-mesh/openapi)
from 0.100.8 to 0.100.10 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9095
- chore(deps-dev): bump
[@&#8203;graphql-mesh/cli](https://github.com/graphql-mesh/cli) from
0.90.7 to 0.90.9 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9094
- chore(deps-dev): bump
[@&#8203;graphql-mesh/runtime](https://github.com/graphql-mesh/runtime)
from 0.99.5 to 0.99.7 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9093
- chore(deps-dev): bump
[@&#8203;babel/preset-env](https://github.com/babel/preset-env) from
7.24.5 to 7.24.6 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9084
- chore(deps-dev): bump stylelint from 16.6.0 to 16.6.1 in /modules/web
by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9097
- chore(deps-dev): bump
[@&#8203;typescript-eslint/parser](https://github.com/typescript-eslint/parser)
from 7.10.0 to 7.11.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9098
- chore(deps-dev): bump tar from 7.1.0 to 7.2.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9104
- chore(deps-dev): bump lint-staged from 15.2.4 to 15.2.5 in
/modules/web by [@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9099
- chore(deps-dev): bump
[@&#8203;typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/eslint-plugin)
from 7.10.0 to 7.11.0 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9100
- chore(deps-dev): bump ts-jest from 29.1.3 to 29.1.4 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9101
- chore(deps-dev): bump sass from 1.77.2 to 1.77.4 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9106
- chore(deps-dev): bump
[@&#8203;types/node](https://github.com/types/node) from 20.12.12 to
20.12.13 in /modules/web by
[@&#8203;dependabot](https://github.com/dependabot) in
[kubernetes/dashboard#9105
- docs: Remove base-url by [@&#8203;psibi](https://github.com/psibi)
in
[kubernetes/dashboard#9056

##### API/UI

- feat: add support for delete propagation policy by
[@&#8203;floreks](https://github.com/floreks) in
[kubernetes/dashboard#9113

##### Chart

- feat(chart): bump chart to 7.5.0 by
[@&#8203;floreks](https://github.com/floreks) in
[kubernetes/dashboard#9117

#### New Contributors

- [@&#8203;psibi](https://github.com/psibi) made their first
contribution in
[kubernetes/dashboard#9056

**Full Changelog**:
kubernetes/dashboard@kubernetes-dashboard-7.4.0...kubernetes-dashboard-7.5.0

#### Installation

```sh
helm repo add kubernetes-dashboard https://kubernetes.github.io/dashboard/
helm upgrade --install kubernetes-dashboard kubernetes-dashboard/kubernetes-dashboard --create-namespace --namespace kubernetes-dashboard
```

#### Compatibility

| Kubernetes version | 1.27 | 1.28 | 1.29 |
|--------------------|-----|-----|-----|
| Compatibility            | ?   |   ?   |   ✓    |

-   `✓` Fully supported version range.
- `?` Due to breaking changes between Kubernetes API versions, some
features might not work correctly in the Dashboard.

#### Images

    docker.io/kubernetesui/dashboard-api:1.7.0
    docker.io/kubernetesui/dashboard-auth:1.1.3
    docker.io/kubernetesui/dashboard-metrics-scraper:1.1.1
    docker.io/kubernetesui/dashboard-web:1.4.0

</details>

---

### Configuration

📅 **Schedule**: Branch creation - At any time (no schedule defined),
Automerge - At any time (no schedule defined).

🚦 **Automerge**: Disabled by config. Please merge this manually once you
are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Renovate
Bot](https://github.com/renovatebot/renovate).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4zODguMSIsInVwZGF0ZWRJblZlciI6IjM3LjM4OC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6WyJyZW5vdmF0ZS9oZWxtIiwidHlwZS9taW5vciJdfQ==-->

Co-authored-by: kireque-bot[bot] <143391978+kireque-bot[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. kind/feature Categorizes issue or PR as related to a new feature. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants