some-solstice-93243
07/15/2024, 6:25 PMancient-wolf-19325
07/15/2024, 6:25 PMvalues.yaml
file. Here's how you can do it:
1. Create the Secret: Ensure your secret is already created in Kubernetes. For example, if your secret is named db-password
, it might look something like this:
apiVersion: v1
kind: Secret
metadata:
name: db-password
namespace: flyte
type: Opaque
stringData:
pass.txt: <DB_PASSWORD>
2. Update values.yaml
: Reference this secret in your values.yaml
file under the common.databaseSecret
section:
common:
databaseSecret:
name: db-password
3. Deploy Flyte: Apply the Helm chart with the updated values.yaml
file:
helm upgrade --install flyte flyteorg/flyte -f values.yaml
This configuration will ensure that Flyte uses the existing db-password
secret for database credentials.
Would you like more detail on this approach?
Sources:
- Add support for leveraging pre-created secrets in flyte-binary helm chart 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.some-solstice-93243
07/15/2024, 6:28 PMancient-wolf-19325
07/15/2024, 6:28 PMapiVersion: v1
kind: Secret
metadata:
name: db-credentials
namespace: flyte
type: Opaque
stringData:
host: <DB_HOST>
username: <DB_USERNAME>
password: <DB_PASSWORD>
2. Update values.yaml
: Reference each key in your values.yaml
file. You can use the additionalVolumes
and additionalVolumeMounts
to mount the secret and then reference the individual keys:
common:
additionalVolumes:
- name: db-credentials
secret:
secretName: db-credentials
additionalVolumeMounts:
- name: db-credentials
mountPath: /etc/db-credentials
flyteadmin:
config:
database:
hostPath: /etc/db-credentials/host
usernamePath: /etc/db-credentials/username
passwordPath: /etc/db-credentials/password
3. Deploy Flyte: Apply the Helm chart with the updated values.yaml
file:
helm upgrade --install flyte flyteorg/flyte -f values.yaml
This configuration mounts the db-credentials
secret and references the individual keys for the database configuration.
Would you like more detail on this approach?
Sources:
- Add support for leveraging pre-created secrets in flyte-binary helm chart
- Is there a way to set postgres and s3 minio passwords as secrets 👍 0 button 👎 0 button 💡 Hint: Mention @runllm in the thread for followups.some-solstice-93243
07/16/2024, 12:57 PMancient-wolf-19325
07/16/2024, 12:57 PMadditionalVolumes
and additionalVolumeMounts
in the values.yaml
file for both the main and init containers.
Here's how you can achieve this:
1. Create the Secret: Ensure your secret includes separate keys for each credential. For example:
apiVersion: v1
kind: Secret
metadata:
name: db-credentials
namespace: flyte
type: Opaque
stringData:
host: <DB_HOST>
username: <DB_USERNAME>
password: <DB_PASSWORD>
2. Update values.yaml
: Reference each key in your values.yaml
file and ensure the secret is mounted in both the main and init containers:
common:
additionalVolumes:
- name: db-credentials
secret:
secretName: db-credentials
additionalVolumeMounts:
- name: db-credentials
mountPath: /etc/db-credentials
flyteadmin:
config:
database:
hostPath: /etc/db-credentials/host
usernamePath: /etc/db-credentials/username
passwordPath: /etc/db-credentials/password
initContainers:
- name: init-container
volumeMounts:
- name: db-credentials
mountPath: /etc/db-credentials
flytepropeller:
initContainers:
- name: init-container
volumeMounts:
- name: db-credentials
mountPath: /etc/db-credentials
3. Deploy Flyte: Apply the Helm chart with the updated values.yaml
file:
helm upgrade --install flyte flyteorg/flyte -f values.yaml
This configuration ensures that the db-credentials
secret is mounted in both the main and init containers, making the secrets available during the initialization phase.
Would you like more detail on this approach?
Sources:
- Add support for leveraging pre-created secrets in flyte-binary helm chart
- Fix flyte-core helm charts for multi cluster configuration 👍 0 button 👎 1 button 💡 Hint: Mention @ancient-wolf-19325 in the thread for followups.average-finland-92144
07/22/2024, 10:45 PMsome-solstice-93243
07/25/2024, 9:04 AMaverage-finland-92144
07/25/2024, 4:18 PMsome-solstice-93243
07/29/2024, 2:27 PMaverage-finland-92144
07/29/2024, 5:34 PM