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

[prometheus-postgres-exporter] Allow override of container name #4803

Merged
merged 4 commits into from
Aug 22, 2024

Conversation

not7cd
Copy link
Contributor

@not7cd not7cd commented Aug 20, 2024

What this PR does / why we need it

When using this chart as dependency, you may want to use alias.
This alias may use camelCase as this is a common convention in values.yaml.
This will result in an error as expected name must conform to RFC 1123.

Example
# Chart.yaml
dependencies:
- name: prometheus-postgres-exporter
  alias: postgresExporter
  repository: "https://prometheus-community.github.io/helm-charts"
  version: 5.3.0
  condition: postgresExporter.enabled
# values.yaml
postgresExporter:
  enabled: true
  nameOverride: "prometheus-postgres-exporter"
  image: ...

Results in

# deployment.yaml
metadata:
  name: release-name-prometheus-postgres-exporter
  labels:
    chart: postgresExporter-5.3.0
    app: prometheus-postgres-exporter
spec:
  template:
    spec:
      containers:
        - name: postgresExporter

Which issue this PR fixes

None, this could be converted to an issue, but the fix seemed obvious.

Special notes for your reviewer

Checklist

  • DCO signed
  • Title of the PR starts with chart name (e.g. [prometheus-couchdb-exporter])

When using this chart as dependency, you may want to use alias.
This alias may use camelCase as this is a common convention in values.yaml. 
This will result in an error as expected name must conform to RFC 1123.

Signed-off-by: Norbert Szulc <[email protected]>
@zanhsieh zanhsieh merged commit a07199c into prometheus-community:main Aug 22, 2024
4 checks passed
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.

2 participants