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

[Don't merge] Add component yaml configuration definition with connection env renaming guide #1684

Open
wants to merge 11 commits into
base: dev
Choose a base branch
from

Conversation

|-------------------------------|--------------|----------------------------------------------------------------------------------|
| **env** | Optional | Array of env variable confiuration |
| ** name** | Required | A unique name starting with a letter or an underscore, containing letters, numbers and underscore for the environment variable name |
| ** valueFrom** | Required | Value source for the env variable |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say "The source of the environment variable value."?

| ** name** | Required | A unique name starting with a letter or an underscore, containing letters, numbers and underscore for the environment variable name |
| ** valueFrom** | Required | Value source for the env variable |
| **  connectionRef** | Required | Connection reference value source definition |
| **   name** | Required | Choreo connection name to refer the value from |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we say "The name of the Choreo connection to reference the value from."?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes. I'll update.

| ** valueFrom** | Required | Value source for the env variable |
| **  connectionRef** | Required | Connection reference value source definition |
| **   name** | Required | Choreo connection name to refer the value from |
| **   key** | Required | Choreo connection configuration key to refer the value from. Refer to [connection configurations](https://wso2.com/choreo/docs/develop-components/sharing-and-reusing/use-a-connection-in-your-service/) or see in-line in-line developer guide displayed during connection creation to discover available keys |
Copy link
Contributor

@Nashaath Nashaath Jan 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
"The Choreo connection configuration key to reference the value from. For details on available keys, see Consume a service through a connection or the inline developer guide."

!!! note
Runtime configurations are supported only from component.yaml v1.1.

When environment variable value source is specified using `connectionRef`, the connection environment variable will be renamed into the given environment name. For example, in above sample `component.yaml` file, `CHOREO_HR_CONNECTION_SERVICEURL` variable from the `hr-connection` will be renamed to `HR_SERVICE_URL`.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggestion:
When an environment variable value is specified using connectionRef, the connection's environment variable is renamed to the environment variable name defined in the configuration section. For example, in the sample component.yaml file given above, the CHOREO_HR_CONNECTION_SERVICEURL variable in the hr-connection is renamed to HR_SERVICE_URL.

Copy link
Contributor

@Nashaath Nashaath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added a few minor suggestions to apply if applicable.

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

Successfully merging this pull request may close these issues.

2 participants