konstellation-io / kre

Konstellation Runtime Engine
https://www.konstellation.io
16 stars 2 forks source link

feat(scripts): add make-kre-user-admin.sh script #711

Closed sto closed 1 year ago

sto commented 1 year ago

Added a script to make a user ADMIN on the KRE mongodb database

Description

The script uses kubectl to get the mongodb admin password and executes the mongo cli on a container to update the user with the email address passed as argument if it exists, printing the updated data if succeeds.

Motivation and Context

I was going to do the change manually and thought that with this command I don't need to remember it anymore.

The command executes the code on a container to simplify things (no need to use port forwarding nor installing the mongo cli locally).

I haven't updated the documentation yet, if the addition is OK I guess it has to be documented somewhere (i.e. probably this section of the konstellation-infrastructure/README.md should be changed).

Types of changes

Checklist: