refactor mongodb metadata.yaml file (#2739)

Signed-off-by: Mukundan Sundararajan <65565396+mukundansundar@users.noreply.github.com>
This commit is contained in:
Mukundan Sundararajan 2023-04-03 23:32:46 +05:30 committed by GitHub
parent 6262e138a2
commit 09fba22bad
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 44 additions and 33 deletions

View File

@ -17,34 +17,49 @@ capabilities:
- transactional
- etag
- query
authenticationProfiles:
- title: "Connection string"
description: |
Authenticate using a connetion string.
metadata:
- name: connectionString
required: true
description: |
The connection string to use. One of `server`, `host` or `connectionstring` is required.
example: '"mongodb://localhost:27017"'
- title: "Username and password"
description: |
Authenticate using username, password and either server or host properties.
metadata:
- name: username
description: |
The username of the user to connect with (applicable in conjunction with `host`)
required: true
example: '"admin"'
- name: password
sensitive: true
description: |
The password of the user (applicable in conjunction with `host`)
required: true
example: '"password"'
- name: server
# Required if host is not set
required: false
description: |
The server to connect to, when using DNS SRV record. One of `server` or `host` is required.
example: '"server.example.com"'
- name: host
# Required if server is not set
required: false
description: |
The host to connect to. One of `server` or `host` is required.
example: '"mongo-mongodb.default.svc.cluster.local:27017"'
- name: params
description: |
Additional parameters to use when connecting. The params field accepts a query string that specifies connection specific options as `<name>=<value>` pairs, separated by `&` and prefixed with `?`. See the MongoDB manual for the list of available options and their use cases.
example: '"?authSource=daprStore&ssl=true"'
required: false
metadata:
- name: server
# Required if host is not set
required: false
description: |
The server to connect to, when using DNS SRV record. One of `server` and `host` is required.
example: '"server.example.com"'
- name: host
# Required if server is not set
required: false
description: |
The host to connect to. One of `server` and `host` is required.
example: '"mongo-mongodb.default.svc.cluster.local:27017"'
- name: connectionstring
# Required if host and server are not set
required: false
description: |
The connection string to use. One of `server` or `host` or `connectionstring` is required.
example: '"mongodb://localhost:27017"'
- name: username
description: |
The username of the user to connect with (applicable in conjunction with `host`)
example: '"admin"'
- name: password
sensitive: true
description: |
The password of the user (applicable in conjunction with `host`)
example: '"password"'
- name: databaseName
description: |
The name of the database to use.
@ -63,7 +78,7 @@ metadata:
description: |
The read concern to use
type: string
allowedValues:
allowedValues:
- "available"
- "local"
- "linearizable"
@ -75,8 +90,4 @@ metadata:
The timeout for the operation.
type: duration
default: '"5s"'
example: '"10s"'
- name: params
description: |
Additional parameters to use when connecting. The params field accepts a query string that specifies connection specific options as `<name>=<value>` pairs, separated by `&` and prefixed with `?`. See the MongoDB manual for the list of available options and their use cases.
example: '"?authSource=daprStore&ssl=true"'
example: '"10s"'