generated from kubernetes/kubernetes-template-project
-
Notifications
You must be signed in to change notification settings - Fork 127
feat: support envFrom and envVars #1183
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
Closed
+143
−3
Closed
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,9 @@ Note that the provider name is needed to deploy provider-specific resources. If | |
|
||
### Install with Custom Environment Variables | ||
|
||
To set custom environment variables for the EndpointPicker deployment: | ||
#### Simple Environment Variables | ||
|
||
To set simple key-value environment variables for the EndpointPicker deployment: | ||
|
||
```txt | ||
$ helm install vllm-llama3-8b-instruct \ | ||
|
@@ -43,6 +45,50 @@ inferenceExtension: | |
FEATURE_FLAG_ENABLED: "true" | ||
``` | ||
|
||
#### Advanced Environment Variables | ||
|
||
For more complex environment variable configurations, including secrets, configmaps, and field references, use the `envVars` and `envFrom` fields: | ||
|
||
```yaml | ||
# values.yaml | ||
inferenceExtension: | ||
# Simple key-value environment variables | ||
env: | ||
SIMPLE_VAR: "simple-value" | ||
Comment on lines
+55
to
+57
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. what happens in the same var is defined in both places? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ++ Is it possible to fold |
||
|
||
# Advanced environment variables with valueFrom support | ||
envVars: | ||
- name: HF_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: hf-token | ||
key: token | ||
- name: POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
- name: CONFIG_VALUE | ||
valueFrom: | ||
configMapKeyRef: | ||
name: my-config | ||
key: config-key | ||
- name: MEMORY_LIMIT | ||
valueFrom: | ||
resourceFieldRef: | ||
resource: limits.memory | ||
|
||
# Load all environment variables from secrets/configmaps | ||
envFrom: | ||
- secretRef: | ||
name: my-secret | ||
- configMapRef: | ||
name: my-configmap | ||
``` | ||
|
||
And apply it with: | ||
|
||
```txt | ||
|
@@ -84,7 +130,9 @@ The following table list the configurable parameters of the chart. | |
| `inferenceExtension.image.tag` | Image tag of the endpoint picker. | | ||
| `inferenceExtension.image.pullPolicy` | Image pull policy for the container. Possible values: `Always`, `IfNotPresent`, or `Never`. Defaults to `Always`. | | ||
| `inferenceExtension.extProcPort` | Port where the endpoint picker service is served for external processing. Defaults to `9002`. | | ||
| `inferenceExtension.env` | Map of environment variables to set in the endpoint picker container. Defaults to `{}`. | | ||
| `inferenceExtension.env` | Map of simple key-value environment variables to set in the endpoint picker container. Defaults to `{}`. | | ||
| `inferenceExtension.envVars` | List of advanced environment variables with valueFrom support (secretKeyRef, configMapKeyRef, fieldRef, resourceFieldRef). Defaults to `[]`. | | ||
| `inferenceExtension.envFrom` | List of sources to populate environment variables from (secretRef, configMapRef). Defaults to `[]`. | | ||
| `provider.name` | Name of the Inference Gateway implementation being used. Possible values: `gke`. Defaults to `none`. | | ||
|
||
## Notes | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not have env accept any yaml? then it's up to the user to use it properly.
E.g., in the epp-deployment template, env can have:
The applying of a helm chart goes through Kubernetes validation in all cases. What do you think are the benefits of an explicit schema?