Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

The custom # config map data format defined incorrectly for opencost #240

Open
bd-spl opened this issue Dec 10, 2024 · 1 comment
Open

Comments

@bd-spl
Copy link

bd-spl commented Dec 10, 2024

The custom # data format defined for #_CONFIGMAP_NAME is incorrectly provided in the configmap template. As debugging of the source code shows, it only reads that data properly if defined directly, like this:

data:
  spotLabel: foo
  spotLabelValue: bar

See aws example for more possible data overrides.

Note that the case for what I was testing these data formats, is merging config overrides from a config map defined in #_CONFIGMAP_NAME. That only worked for the direct data format given above, even without extra volumes mounts that the helm chart normally creates, when .Values.opencost.custom#.enabled=true. Perhaps I am confusing that config option to my special case?

@bd-spl
Copy link
Author

bd-spl commented Dec 10, 2024

Also note that the volume mount created for the custom # config should not be readOnly, as opencost errors out like this:

INF ERROR UPDATING custom-#-model CONFIG: error writing config file for provider config: Failed to write file: open /tmp/custom-config/aws.json: read-only file system

update: the mounted volume should be fine, I confused it with the exporter chart, but that is another story

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant