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

Correctly set the resources of mysqldExporter #642

Merged
merged 2 commits into from
Dec 2, 2024
Merged

Conversation

frouioui
Copy link
Member

@frouioui frouioui commented Dec 2, 2024

This PR fixes the issue mentioned in #311 (comment), which was missed during the development and review of #494.

Fixes #311

We were merging the custom resources with the default resource setting, which led to empty field in the custom resource being filled by the default resources, even if we wanted these fields to be empty.

Here is what we get with the change introduced by the PR:

            mysqldExporter:
              resources:
                limits:
                  memory: 125Mi
                requests:
                  cpu: 100m
                  memory: 50Mi
$ kubectl describe ...
  mysqld-exporter:
    Container ID:  
    Image:         prom/mysqld-exporter:v0.11.0
    Image ID:      
    Port:          9104/TCP
    Host Port:     0/TCP
    Command:
      /bin/mysqld_exporter
    Args:
      --config.my-cnf=/vt/vtdataroot/vt_2469782763/my.cnf
      --collect.info_schema.tables.databases=sys,_vt
    State:          Waiting
      Reason:       PodInitializing
    Ready:          False
    Restart Count:  0
    Limits:
      memory:  125Mi
    Requests:
      cpu:     100m
      memory:  50Mi

@frouioui frouioui merged commit bfa0b3e into main Dec 2, 2024
12 checks passed
@frouioui frouioui deleted the fix-mysqld-limits branch December 2, 2024 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Allow setting mysqld-exporter resources
3 participants