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
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