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

fix: 🐛 add divisor: '1' to GOMAXPROCS and GOMEMLIMIT #1085

Merged
merged 3 commits into from
Jun 6, 2024
Merged

fix: 🐛 add divisor: '1' to GOMAXPROCS and GOMEMLIMIT #1085

merged 3 commits into from
Jun 6, 2024

Conversation

hawkesn
Copy link
Contributor

@hawkesn hawkesn commented Jun 5, 2024

What does this PR do?

Aims to fix: #1065

Motivation

Prevents ArgoCD from constantly being out of sync

More

  • Yes, I updated the tests accordingly
  • Yes, I ran make test and all the tests passed

Happy Path Test Results

### Chart [ traefik ] ./traefik

 PASS  Resources contains metadata      traefik/tests/common-metadata_test.yaml
 PASS  Main Container configuration     traefik/tests/container-config_test.yaml
 PASS  DaemonSet configuration  traefik/tests/daemonset-config_test.yaml
 PASS  Dashboard IngressRoute configuration     traefik/tests/dashboard-ingressroute_test.yaml
 PASS  default install  traefik/tests/default-install_test.yaml
 PASS  Deployment configuration traefik/tests/deployment-config_test.yaml
 PASS  Deployment configuration traefik/tests/deployment-hub-config_test.yaml
 PASS  Traefik configuration    traefik/tests/extra-config_test.yaml
 PASS  Gateway configuration    traefik/tests/gateway-config_test.yaml
 PASS  GatewayClass configuration       traefik/tests/gatewayclass-config_test.yaml
 PASS  healthcheck IngressRoute configuration   traefik/tests/healthcheck-ingressroute_test.yaml
 PASS  HPA configuration        traefik/tests/hpa-config_test.yaml
 PASS  Traefik Hub admission controller configuration   traefik/tests/hub-admission-controler_test.yaml
 PASS  API Portal configuration with Traefik Hub enabled        traefik/tests/hub-apiportal_test.yaml
 PASS  IngressClass configuration       traefik/tests/ingressclass-config_test.yaml
 PASS  Traefik Metrics configuration    traefik/tests/metrics-config_test.yaml
 PASS  NOTES.txt output traefik/tests/notes_test.yaml
 PASS  Pod configuration        traefik/tests/pod-config_test.yaml
 PASS  PodDisruptionBudget configuration        traefik/tests/poddisruptionbudget-config_test.yaml
 PASS  PodSecurityPolicy configuration  traefik/tests/podsecuritypolicy-config_test.yaml
 PASS  Traefik configuration    traefik/tests/ports-config_test.yaml
 PASS  PrometheusRules configuration    traefik/tests/prometheusrules-config_test.yaml
 PASS  File provider    traefik/tests/provider-file_test.yaml
 PASS  Persistent volume claim configuration    traefik/tests/pvc-config_test.yaml
 PASS  RBAC configuration       traefik/tests/rbac-config_test.yaml
 PASS  Requirements     traefik/tests/requirements-config_test.yaml
 PASS  Custom Service configuration     traefik/tests/service-config-custom_test.yaml
 PASS  Service configuration (split TCP/UDP services)   traefik/tests/service-config-multiple_test.yaml
 PASS  Service configuration    traefik/tests/service-config_test.yaml
 PASS  Metrics Service configuration    traefik/tests/service-metrics-config_test.yaml
 PASS  ServiceMonitor configuration     traefik/tests/servicemonitor-config_test.yaml
 PASS  TlsOption configuration  traefik/tests/tlsoption_test.yaml
 PASS  TlsStore configuration   traefik/tests/tlsstore_test.yaml
 PASS  Traefik Tracing configuration    traefik/tests/tracing-config_test.yaml
2024/06/06 14:07:37 warning: cannot overwrite table with non table for traefik.experimental.plugins (map[])
 PASS  Traefik configuration    traefik/tests/traefik-config_test.yaml

Charts:      1 passed, 1 total
Test Suites: 35 passed, 35 total
Tests:       377 passed, 377 total
Snapshot:    0 passed, 0 total
Time:        34.594235475s
Tests:       379 passed, 379 total
Snapshot:    0 passed, 0 total
Time:        34.915607641s

Unhappy Path Test Results (setting the test value to be 2, when it should be 1)

### Chart [ traefik ] ./traefik

 PASS  Resources contains metadata      traefik/tests/common-metadata_test.yaml
 PASS  Main Container configuration     traefik/tests/container-config_test.yaml
 PASS  DaemonSet configuration  traefik/tests/daemonset-config_test.yaml
 PASS  Dashboard IngressRoute configuration     traefik/tests/dashboard-ingressroute_test.yaml
 PASS  default install  traefik/tests/default-install_test.yaml
 PASS  Deployment configuration traefik/tests/deployment-config_test.yaml
 PASS  Deployment configuration traefik/tests/deployment-hub-config_test.yaml
 PASS  Traefik configuration    traefik/tests/extra-config_test.yaml
 PASS  Gateway configuration    traefik/tests/gateway-config_test.yaml
 PASS  GatewayClass configuration       traefik/tests/gatewayclass-config_test.yaml
 PASS  healthcheck IngressRoute configuration   traefik/tests/healthcheck-ingressroute_test.yaml
 PASS  HPA configuration        traefik/tests/hpa-config_test.yaml
 PASS  Traefik Hub admission controller configuration   traefik/tests/hub-admission-controler_test.yaml
 PASS  API Portal configuration with Traefik Hub enabled        traefik/tests/hub-apiportal_test.yaml
 PASS  IngressClass configuration       traefik/tests/ingressclass-config_test.yaml
 PASS  Traefik Metrics configuration    traefik/tests/metrics-config_test.yaml
 PASS  NOTES.txt output traefik/tests/notes_test.yaml
 FAIL  Pod configuration        traefik/tests/pod-config_test.yaml
        - should have set GOMAXPROCS with cpu limit

                - asserts[2] `equal` fail
                        Template:       traefik/templates/deployment.yaml
                        DocumentIndex:  0
                        Path:   spec.template.spec.containers[0].env[0].valueFrom.resourceFieldRef.divisor
                        Expected to equal:
                                "2"
                        Actual:
                                "1"
                        Diff:
                                --- Expected
                                +++ Actual
                                @@ -1,2 +1,2 @@
                                -"2"
                                +"1"

 PASS  PodDisruptionBudget configuration        traefik/tests/poddisruptionbudget-config_test.yaml
 PASS  PodSecurityPolicy configuration  traefik/tests/podsecuritypolicy-config_test.yaml
 PASS  Traefik configuration    traefik/tests/ports-config_test.yaml
 PASS  PrometheusRules configuration    traefik/tests/prometheusrules-config_test.yaml
 PASS  File provider    traefik/tests/provider-file_test.yaml
 PASS  Persistent volume claim configuration    traefik/tests/pvc-config_test.yaml
 PASS  RBAC configuration       traefik/tests/rbac-config_test.yaml
 PASS  Requirements     traefik/tests/requirements-config_test.yaml
 PASS  Custom Service configuration     traefik/tests/service-config-custom_test.yaml
 PASS  Service configuration (split TCP/UDP services)   traefik/tests/service-config-multiple_test.yaml
 PASS  Service configuration    traefik/tests/service-config_test.yaml
 PASS  Metrics Service configuration    traefik/tests/service-metrics-config_test.yaml
 PASS  ServiceMonitor configuration     traefik/tests/servicemonitor-config_test.yaml
 PASS  TlsOption configuration  traefik/tests/tlsoption_test.yaml
 PASS  TlsStore configuration   traefik/tests/tlsstore_test.yaml
 PASS  Traefik Tracing configuration    traefik/tests/tracing-config_test.yaml
2024/06/06 14:09:18 warning: cannot overwrite table with non table for traefik.experimental.plugins (map[])
 PASS  Traefik configuration    traefik/tests/traefik-config_test.yaml

Charts:      1 failed, 0 passed, 1 total
Test Suites: 1 failed, 34 passed, 35 total
Tests:       1 failed, 376 passed, 377 total
Snapshot:    0 passed, 0 total
Time:        34.265691266s

Unhappy Path fails successfully 👍

Copy link
Contributor

@darkweaver87 darkweaver87 left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Contributor

@mloiseleur mloiseleur left a comment

Choose a reason for hiding this comment

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

Thanks for taking the time to open this PR 👍 !
Since this value is expected, test needs to be updated, too.

@hawkesn
Copy link
Contributor Author

hawkesn commented Jun 6, 2024

Thanks for taking the time to open this PR 👍 ! Since this value is expected, test needs to be updated, too.

Thanks @mloiseleur! added tests and included happy path and unhappy path testing results in the PR description 👍

@traefiker traefiker merged commit 9ccbee2 into traefik:master Jun 6, 2024
1 check passed
madic-creates pushed a commit to madic-creates/k3s-git-ops that referenced this pull request Oct 25, 2024
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [traefik](https://traefik.io/) ([source](https://github.com/traefik/traefik-helm-chart)) | HelmChart | major | `27.0.2` -> `29.0.1` | `30.0.1` (+1) |

---

### Release Notes

<details>
<summary>traefik/traefik-helm-chart (traefik)</summary>

### [`v29.0.1`](https://github.com/traefik/traefik-helm-chart/releases/tag/v29.0.1)

[Compare Source](traefik/traefik-helm-chart@v29.0.0...v29.0.1)

##### [29.0.1](traefik/traefik-helm-chart@v29.0.0...v29.0.1) (2024-07-09)

##### Features

-   ✨ publish chart on OCI registry ([deaddf5](traefik/traefik-helm-chart@deaddf5))

##### Bug Fixes

-   RBACs for hub and disabled namespaced RBACs ([0827106](traefik/traefik-helm-chart@0827106))
-   semverCompare failing on some legitimate tags ([143b96f](traefik/traefik-helm-chart@143b96f))

### [`v29.0.0`](https://github.com/traefik/traefik-helm-chart/releases/tag/v29.0.0)

[Compare Source](traefik/traefik-helm-chart@v28.3.0...v29.0.0)

##### Upgrade Notes

This is a major breaking upgrade. [Migration guide](https://doc.traefik.io/traefik/v3.1/migration/v3/#v30-to-v31) from v3.0 to v3.1rc has been applied on this chart.

This release supports both Traefik Proxy v3.0.x and v3.1rc.

It comes with those ⚠️ breaking changes ⚠️ :

-   Far better support on Gateway API v1.1: Gateway, GatewayClass, CRDs & RBAC ([#&#8203;1107](traefik/traefik-helm-chart#1107))
-   Many changes on CRDs & RBAC ([#&#8203;1072](traefik/traefik-helm-chart#1072) & [#&#8203;1108](traefik/traefik-helm-chart#1108))
-   Refactor on Prometheus Operator support. Values has changed ([#&#8203;1114](traefik/traefik-helm-chart#1114))
-   Dashboard `IngressRoute` is now disabled by default ([#&#8203;1111](traefik/traefik-helm-chart#1111))

CRDs needs to be upgraded: `kubectl apply --server-side --force-conflicts -k https://github.com/traefik/traefik-helm-chart/traefik/crds/`

##### Features

-   ✨ migrate to endpointslices rbac ([0449b0b](traefik/traefik-helm-chart@0449b0b))
-   ✨ update CRDs & RBAC for Traefik Proxy ([228c4e4](traefik/traefik-helm-chart@228c4e4))
-   allow to set hostAliases for traefik pod ([42e5745](traefik/traefik-helm-chart@42e5745))
-   **dashboard:** dashboard `IngressRoute` should be disabled by default ([d9b856a](traefik/traefik-helm-chart@d9b856a))
-   **providers:** add nativeLBByDefault support ([e75a85c](traefik/traefik-helm-chart@e75a85c))
-   **providers:** improve kubernetesGateway and Gateway API support ([2eb640a](traefik/traefik-helm-chart@2eb640a))
-   **workflow:** add oci push ([aa3022a](traefik/traefik-helm-chart@aa3022a))

##### Bug Fixes

-   **dashboard:** Only set ingressClass annotation when kubernetesCRD provider is listening for it ([f142f6c](traefik/traefik-helm-chart@f142f6c))
-   **rbac:** nodes API permissions for Traefik v3.1+ ([647439d](traefik/traefik-helm-chart@647439d))
-   allow multiples values in the `secretResourceNames` slice ([24978e8](traefik/traefik-helm-chart@24978e8))
-   🐛 improve error message on additional service without ports ([d4cab24](traefik/traefik-helm-chart@d4cab24))
-   prometheus operator settings ([7d3a90d](traefik/traefik-helm-chart@7d3a90d))

##### Documentation

-   fix typos and broken link ([e43afd4](traefik/traefik-helm-chart@e43afd4))

#### New Contributors

-   [@&#8203;justinrush](https://github.com/justinrush) made their first contribution in traefik/traefik-helm-chart#1093
-   [@&#8203;x0ddf](https://github.com/x0ddf) made their first contribution in traefik/traefik-helm-chart#1094
-   [@&#8203;traefiker](https://github.com/traefiker) made their first contribution in traefik/traefik-helm-chart#1101
-   [@&#8203;mmetc](https://github.com/mmetc) made their first contribution in traefik/traefik-helm-chart#1102

### [`v28.3.0`](https://github.com/traefik/traefik-helm-chart/releases/tag/v28.3.0)

[Compare Source](traefik/traefik-helm-chart@v28.2.0...v28.3.0)

##### Features

-   allow setting permanent on redirectTo ([1b454e9](traefik/traefik-helm-chart@1b454e9))

##### Bug Fixes

-   **Security:** 🐛 🔒️ mount service account token on pod level (\[[`db4f43f`](https://github.com/traefik/traefik-helm-chart/commit/db4f43f)]\(https://github.com/traefik/traefik-helm-chart/commit/
-   **Traefik Hub:** remove namespace in mutating webhook ([f8f2da2](traefik/traefik-helm-chart@f8f2da2))
-   **Traefik Hub:** remove obsolete CRD ([4fcec62](traefik/traefik-helm-chart@4fcec62))
-   🐛 namespaced rbac when kubernetesIngress provider is disabled ([3bb41f7](traefik/traefik-helm-chart@3bb41f7))
    [`db4f43f`](traefik/traefik-helm-chart@db4f43f)))
-   🐛  add divisor: '1' to GOMAXPROCS and GOMEMLIMIT ([9ccbee2](traefik/traefik-helm-chart@9ccbee2))

#### New Contributors

-   [@&#8203;hawkesn](https://github.com/hawkesn) made their first contribution in traefik/traefik-helm-chart#1085
-   [@&#8203;berlincount](https://github.com/berlincount) made their first contribution in traefik/traefik-helm-chart#1082

**Full Changelog**: traefik/traefik-helm-chart@v28.2.0...v28.3.0

### [`v28.2.0`](https://github.com/traefik/traefik-helm-chart/releases/tag/v28.2.0)

[Compare Source](traefik/traefik-helm-chart@v28.1.0...v28.2.0)

:warning: This release align to Kubernetes default (*Always*) for `podSecurityContext.fsGroupChangePolicy`. It was *OnRootMismatch* in previous release of this chart. It can easily be set (back) to *OnRootMismatch* if needed, see [EXAMPLES](https://github.com/traefik/traefik-helm-chart/blob/master/EXAMPLES.md#use-traefik-native-lets-encrypt-integration-without-cert-manager).

##### Features

-   ✨ simplify values and provide more examples ([4eb71eb](traefik/traefik-helm-chart@4eb71eb))
-   add deletecollection right on secrets ([fb69807](traefik/traefik-helm-chart@fb69807))
-   update traefik docker tag to v3.0.1 by [@&#8203;renovate](https://github.com/renovate) in traefik/traefik-helm-chart#1075

##### Bug Fixes

-   **IngressClass:** provides annotation on IngressRoutes when it's enabled ([f5de0c3](traefik/traefik-helm-chart@f5de0c3))

#### New Contributors

-   [@&#8203;jspdown](https://github.com/jspdown) made their first contribution in traefik/traefik-helm-chart#1077

**Full Changelog**: traefik/traefik-helm-chart@v28.1.0...v28.2.0

### [`v28.1.0`](https://github.com/traefik/traefik-helm-chart/releases/tag/v28.1.0)

[Compare Source](traefik/traefik-helm-chart@v28.0.0...v28.1.0)

##### Features

-   **Traefik Hub:** add initial support for API Gateway ([dc5c68d](traefik/traefik-helm-chart@dc5c68d))
-   **Traefik Hub:** use Traefik Proxy otlp config ([a910db4](traefik/traefik-helm-chart@a910db4))

##### Bug Fixes

-   **Traefik Hub:** refine support ([60d210d](traefik/traefik-helm-chart@60d210d))
-   **Traefik Hub:** do not deploy mutating webhook when enabling only API Gateway ([cb2a98d](traefik/traefik-helm-chart@cb2a98d))

##### Documentation

-   **example:** Update Digital Ocean PROXY Protocol ([9850319](traefik/traefik-helm-chart@9850319))
-   📚️ improve UPGRADING section ([54ec665](traefik/traefik-helm-chart@54ec665))

### [`v28.0.0`](https://github.com/traefik/traefik-helm-chart/releases/tag/v28.0.0)

[Compare Source](traefik/traefik-helm-chart@v27.0.2...v28.0.0)

##### ⚠ BREAKING CHANGES

-   💥 initial support of Traefik Proxy v3
-   See [Migration guide from v2 to v3](https://doc.traefik.io/traefik/v3.0/migration/v2-to-v3/) and upgrading section of this chart on CRDs.

##### Features

-   **podtemplate:** set GOMEMLIMIT, GOMAXPROCS when limits are defined ([e4f2aa8](traefik/traefik-helm-chart@e4f2aa8))
-   💥 initial support of Traefik Proxy v3 ([536059d](traefik/traefik-helm-chart@536059d))
-   ✨ add support of `experimental-v3.0` unstable version ([579984c](traefik/traefik-helm-chart@579984c))
-   ✨ fail gracefully when required port number is not set ([f8be5e1](traefik/traefik-helm-chart@f8be5e1))
-   **ports:** add transport options ([47e0f28](traefik/traefik-helm-chart@47e0f28))
-   ability to override liveness and readiness probe paths ([ea95df0](traefik/traefik-helm-chart@ea95df0))

##### Bug Fixes

-   🐛 logs filters on status codes ([c204014](traefik/traefik-helm-chart@c204014))
-   🐛 only expose http3 port on service when TCP variant is exposed ([2d6243d](traefik/traefik-helm-chart@2d6243d))

##### Styles

-   🎨 consistent capitalization on `--entryPoints` CLI flag ([b1f6f96](traefik/traefik-helm-chart@b1f6f96))

##### Documentation

-   📚️ improve EXAMPLES on acme resolver ([2252aba](traefik/traefik-helm-chart@2252aba))

#### New Contributors

-   [@&#8203;matkam](https://github.com/matkam) made their first contribution in traefik/traefik-helm-chart#1041

</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:eyJjcmVhdGVkSW5WZXIiOiIzNy40MjcuMCIsInVwZGF0ZWRJblZlciI6IjM3LjQ0MC43IiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

Reviewed-on: https://code.geekbundle.org/madic/git-ops-dev/pulls/168
Co-authored-by: renovate Bot <renovate@geekbundle.org>
Co-committed-by: renovate Bot <renovate@geekbundle.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Traefik perpetually out of sync in Argo CD due to missing divisor spec for GOMEMLIMIT and GOMAXPROCS
4 participants