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

MongoDB standalone architecture handling - missing in template #251

Open
gauravjain1582 opened this issue Sep 18, 2021 · 2 comments
Open
Labels
bug Something isn't working component:mongodb help wanted Extra attention is needed

Comments

@gauravjain1582
Copy link

folks,
I figured MongoDB standalone architecture handling is also required in configmaps_st2-conf.yaml template.
At the moment Standalone or Replicate set both populate list of mondo-pb pod endpoints to config.

https://github.com/StackStorm/stackstorm-ha/blob/master/templates/configmaps_st2-conf.yaml

  {{- if index .Values "mongodb" "auth" "enabled" }}
   host = mongodb://{{ template "mongodb-nodes" $ }}/{{ required "mongodb.auth.database is required!" (index .Values "mongodb" "auth" "database") }}?authSource={{ required "mongodb.auth.database is required!" (index .Values "mongodb" "auth" "database") }}&replicaSet={{ index .Values "mongodb" "replicaSetName" }}
   username = {{ required "mongodb.auth.username is required!" (index .Values "mongodb" "auth" "username") }}
   password = {{ required "mongodb.auth.password is required!" (index .Values "mongodb" "auth" "password") }}
   db_name = {{ required "mongodb.auth.database is required!" (index .Values "mongodb" "auth" "database") }}
   {{- else }}
   host = mongodb://{{ template "mongodb-nodes" $ }}/?replicaSet={{ index .Values "mongodb" "replicaSetName" }}

I can reproduce everything in my env. I fix would be needed.

Thx
G

@arms11
Copy link
Contributor

arms11 commented Sep 18, 2021

Hi @gauravjain1582 this is by design. MongoDB standalone is not a recommended option for StackStorm-HA deployment. All pods (as appropriate) and external dependencies are expected to be HA. Ideally, standalone should only be used in development/testing environment. For Production replicaset is the way to go. Hope that helps.

@cognifloyd
Copy link
Member

Why would you install a standalone MongoDB in kubernetes?
If you have a standalone MongoDB instance outside of kubernetes, then you should be disabling the mongodb chart, and provide your own database host/auth config in .Values.st2.config.

If, however, you are using the mongo subchart to somehow install a standalone mongo, then I'm happy to review a pull request that fixes support for that setup. What changes would be required to support that? Is it minimal?

@cognifloyd cognifloyd added component:mongodb help wanted Extra attention is needed bug Something isn't working labels Nov 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working component:mongodb help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

3 participants