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

Define the secret name for the connection string output from the operator #1369

Closed
danielloader opened this issue Feb 9, 2024 · 5 comments
Closed
Assignees

Comments

@danielloader
Copy link

Hello all, instead of using a predictable naming convention for secrets:

$project-$cluster-$username

I'd like to be able to nominate the output secret name similar to how crossplane does this.

@roothorp
Copy link
Collaborator

Hi @danielloader, thanks for the issue! I have raised this feature request internally for consideration for future releases.

Could you elaborate on what this feature would ideally look like? Would you like to be able to define the secret name (and have the Operator create it), or point the Operator to an existing secret and have it populate the fields (which looks to be how Crossplane does it?)

@roothorp roothorp self-assigned this Feb 14, 2024
@danielloader
Copy link
Author

Hey, I'm flexible, I think I'm okay with the fixed field model but just providing the secret name if that's possible.

Ideally I'd prefer to be able to name/map the fields out to the secret, so being able to just export a connectionStringStandardSrv field, and rename it to DB_URL.

But I'd be happy with just naming the secret, since my connections are by namespace I'd prefer to just output my secrets to something as benign as "mongodb-credentials" without taking into account the project, cluster or username in the resulting secret name.

@danielloader
Copy link
Author

Additional example found via Aiven.io - https://aiven.io/docs/tools/kubernetes

apiVersion: aiven.io/v1alpha1
kind: PostgreSQL
metadata:
  name: pg-sample
spec:

  # gets the authentication token from the `aiven-token` secret
  authSecretRef:
    name: aiven-token
    key: token

  # outputs the PostgreSQL connection on the `pg-connection` secret
  connInfoSecretTarget:
    name: pg-connection

  # add your Project name here
  project: <your-project-name>

  # cloud provider and plan of your choice
  # you can check all of the possibilities here https://aiven.io/pricing
  cloudName: google-europe-west1
  plan: startup-4

  # general Aiven configuration
  maintenanceWindowDow: friday
  maintenanceWindowTime: 23:00:00

  # specific PostgreSQL configuration
  userConfig:
    pg_version: '11'

With the pertinent part being:

# outputs the PostgreSQL connection on the `pg-connection` secret
connInfoSecretTarget:
  name: pg-connection

@dan-mckean
Copy link
Collaborator

Hi @danielloader - so we don't lose track of this do you mind adding this request to here: https://feedback.mongodb.com/forums/924145-atlas?category_id=418498

It also allows other users to vote and us to provide updates to anyone who has voted on something.

(It's not super widely used right now but I'm trying to promote it so we have a central place to track all such requests!)

No need to copy over all the info - and feel free to link back here to this issue.

@roothorp
Copy link
Collaborator

Closing this issue - we've taken note of the feature request, thanks for the feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants