-
Notifications
You must be signed in to change notification settings - Fork 35
use remote mongodb #29
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
Conversation
🦋 Changeset detectedLatest commit: 866b8dd The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
charts/hdx-oss-v2/values.yaml
Outdated
| remote: true | ||
| endpoint: hyperdx-mongodb-svc | ||
| port: 27017 | ||
| database: hyperdx | ||
| size: 10Gi | ||
| auth: | ||
| enabled: false | ||
| username: root | ||
| password: password | ||
| authSource: admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For style consistency, we can add a custom value mongoUri to hyperdx and inject it into MONGO_URI in the config map (https://github.com/hyperdxio/helm-charts/blob/2f160cdbc4f89c1ec28e1ba18a529bd309c28c3e/charts/hdx-oss-v2/templates/configmaps/app-configmap.yaml#L16)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wrn14897 thanks. I fixed it. did you mean this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect! Left a few comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wrn14897 I fixed all you commented. thanks
charts/hdx-oss-v2/values.yaml
Outdated
| usageStatsEnabled: true | ||
| # Endpoint to send hyperdx logs/traces/metrics to.Defaults to the chart's otel collector endpoint. | ||
| otelExporterEndpoint: http://{{ include "hdx-oss.fullname" . }}-otel-collector:{{ .Values.otel.httpPort }} | ||
| mongoUri: mongodb://root:root1234@mongo-uri:27017/hyperdx?authSource=admin |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
mongodb://{{ include "hdx-oss.fullname" . }}-mongodb:{{ .Values.mongodb.port }}/hyperdx
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wrn14897 I didn’t know this syntax was also possible in values.yaml. Thanks.
| {{- if .Values.hyperdx.mongoUri }} | ||
| MONGO_URI: {{ .Values.hyperdx.mongoUri | quote }} | ||
| {{- else }} | ||
| MONGO_URI: mongodb://{{ include "hdx-oss.fullname" . }}-mongodb:{{ .Values.mongodb.service.port }}/hyperdxv2 | ||
| {{- end }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
style: we can do
{{ .Values.hyperdx.mongoUri | default (printf ...) }}
| {{- else }} | ||
| MONGO_URI: mongodb://{{ include "hdx-oss.fullname" . }}-mongodb:{{ .Values.mongodb.service.port }}/hyperdxv2 | ||
| {{- end }} | ||
| MONGO_URI: {{ .Values.hyperdx.mongoUri | default (printf ...) }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry I think {{ .Values.hyperdx.mongoUri }} should be sufficient
|
please also resolve the conflict and we should be good to go |
| usageStatsEnabled: true | ||
| # Endpoint to send hyperdx logs/traces/metrics to.Defaults to the chart's otel collector endpoint. | ||
| otelExporterEndpoint: http://{{ include "hdx-oss.fullname" . }}-otel-collector:{{ .Values.otel.httpPort }} | ||
| mongoUri: mongodb://{{ include "hdx-oss.fullname" . }}-mongodb:{{ .Values.mongodb.port }}/hyperdx |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wrn14897 I think this doesn't work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wrn14897
I think the best way to implement this is writing on _helpers.tpl. How do you think?
like this:
{{- define "hdx-oss.mongodb.uri" -}}
{{- if .Values.hyperdx.mongoUri -}}
{{- printf .Values.hyperdx.mongoUri -}}
{{- else -}}
{{- $mongodbPort := .Values.mongodb.port -}}
{{- printf "mongodb://%s-mongodb:%d/hyperdx" (include "hdx-oss.fullname" .) ( $mongodbPort | int ) -}}
{{- end -}}
{{- end -}}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@wrn14897 sry. i missed write tpl. i fixed ignore this comments
…charts into use_remote_mongodb
|
@wrn14897 I fixed all of missed things. test this please |
wrn14897
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the contribution!
| {{- end -}} | ||
| {{- end }} | ||
| spec: | ||
| {{- if not .Values.mongodb.enabled }} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When we enable mongodb, the initContainer is removed. Is the not here on purpose or accidental?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hello I have a problem using this chart.
I want to use remote mongodb, but it doesn't support.
Added this commit to enable remote MongoDB support, which was previously unavailable.