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

mount nginx.conf as a volume to the frontend container #244

Open
wants to merge 12 commits into
base: main
Choose a base branch
from

Conversation

mittal-ishaan
Copy link
Contributor

@mittal-ishaan mittal-ishaan commented Dec 26, 2024

mount nginx.conf as a volume to the frontend container. This way we would me moving out of mounting the nginx.conf to the container when pulling the image in the container as that has permission issues in openshift clusters.

Discussion: opencost/opencost-ui#49 (comment)

We need to bump the opencost-ui image to have this opencost/opencost-ui#49 change

Testing: I was able to install opencost with these changes

@mittal-ishaan mittal-ishaan marked this pull request as ready for review December 26, 2024 22:11
@mittal-ishaan mittal-ishaan force-pushed the add_frontend_config_to_helm_chart branch from 0e24ebf to 6f7d4aa Compare January 16, 2025 19:21
Copy link
Collaborator

@toscott toscott left a comment

Choose a reason for hiding this comment

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

A few comments, but overall looks fine as long as this isn't going to break opencost-ui users.

Will need to increment the minor version number in the chart to pass the build checks before we can merge.

volumeMounts: {{- toYaml . | nindent 12 }}
{{- toYaml . | nindent 12 }}
{{- end }}
{{- if .Values.opencost.ui.enabled }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

This whole section (270 - 323) is already wrapped in a check on if the ui is enabled. If there isn't going to be a unique setting to enable the configmap, this is a redundant check.

apiVersion: v1
kind: ConfigMap
metadata:
name: nginx-conf
Copy link
Collaborator

Choose a reason for hiding this comment

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

Feels appropriate to include opencost in this configmap name somewhere. "opencost-ui-nginx-conf" maybe?

@@ -0,0 +1,93 @@
{{- if .Values.opencost.ui.enabled }}
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this specific configmap always necessary if opencost ui is enabled? My initial reaction is this should be a separate setting, but as long as its not going to be a breaking change for users I'm ok enabling it by default.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

This configmap is added during runtime in opencost-ui image. Which has write permission issues in openshift environment. This change will not break with opencost-ui v1.114.0 in which @kastl-ars added an if condition in the entrypoint script there. We can get this in after bumping opencost-ui image to 1.114.0 . But as it can break for lower versions, should we keep it under a separate setting, considering that we can release it with ui image bump.

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