From 9ff19da51de2571ab5bb18cdc6df11768c9dc719 Mon Sep 17 00:00:00 2001 From: Chris Soyars Date: Wed, 10 Apr 2024 15:33:22 -0700 Subject: [PATCH 1/4] Add support for passing envFrom to flyteadmin Deployment Signed-off-by: Chris Soyars --- charts/flyte-core/README.md | 1 + charts/flyte-core/templates/admin/deployment.yaml | 6 ++++++ charts/flyte-core/values.yaml | 2 ++ docker/sandbox-bundled/manifests/complete-agent.yaml | 4 ++-- docker/sandbox-bundled/manifests/complete.yaml | 4 ++-- docker/sandbox-bundled/manifests/dev.yaml | 4 ++-- 6 files changed, 15 insertions(+), 6 deletions(-) diff --git a/charts/flyte-core/README.md b/charts/flyte-core/README.md index 00fd69f368..c7cf0edda7 100644 --- a/charts/flyte-core/README.md +++ b/charts/flyte-core/README.md @@ -162,6 +162,7 @@ helm install gateway bitnami/contour -n flyte | flyteadmin.configPath | string | `"/etc/flyte/config/*.yaml"` | Default regex string for searching configuration files | | flyteadmin.enabled | bool | `true` | | | flyteadmin.env | list | `[]` | Additional flyteadmin container environment variables e.g. SendGrid's API key - name: SENDGRID_API_KEY value: "" e.g. secret environment variable (you can combine it with .additionalVolumes): - name: SENDGRID_API_KEY valueFrom: secretKeyRef: name: sendgrid-secret key: api_key | +| flyteadmin.envFrom | list | `[]` | Additional flyteadmin environment variables from a reference (ie: Secret or ConfigMap) | | flyteadmin.extraArgs | object | `{}` | Appends extra command line arguments to the serve command | | flyteadmin.image.pullPolicy | string | `"IfNotPresent"` | | | flyteadmin.image.repository | string | `"cr.flyte.org/flyteorg/flyteadmin"` | Docker image for Flyteadmin deployment | diff --git a/charts/flyte-core/templates/admin/deployment.yaml b/charts/flyte-core/templates/admin/deployment.yaml index 23ea9966df..cbc7e21464 100755 --- a/charts/flyte-core/templates/admin/deployment.yaml +++ b/charts/flyte-core/templates/admin/deployment.yaml @@ -47,6 +47,12 @@ spec: {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} {{- end }} + {{- if .Values.flyteadmin.envFrom }} + envFrom: + {{- with .Values.flyteadmin.envFrom -}} + {{- tpl (toYaml .) $ | nindent 12 }} + {{- end }} + {{- end }} {{- if .Values.flyteadmin.initialProjects }} - command: - flyteadmin diff --git a/charts/flyte-core/values.yaml b/charts/flyte-core/values.yaml index 8b1e4b89d6..a5e512b732 100755 --- a/charts/flyte-core/values.yaml +++ b/charts/flyte-core/values.yaml @@ -31,6 +31,8 @@ flyteadmin: # name: sendgrid-secret # key: api_key env: [] + # -- Additional flyteadmin environment variables from a reference (ie: Secret or ConfigMap) + envFrom: [] # -- Default resources requests and limits for Flyteadmin deployment resources: limits: diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index 2db8226933..e6bf6e0212 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -816,7 +816,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: WEJxZGNCTWJiNFUwZEd1bQ== + haSharedSecret: eGJ5UGtPd3FjS1ZKUHBzRg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1412,7 +1412,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 45571013e2bcbc17744162363ccc7fc5c99072b2553a3fe29f41660a07e2e864 + checksum/secret: c7e0e9ec1bf8adc0647243b2b84b678b319a75125680e1a20416c433a9ac12a6 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index 98b5aa3657..ac71136372 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -796,7 +796,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: a1Zqcm1HUlcxZUN4SExqSw== + haSharedSecret: N3lSRVA2Tjk3NVN0RmFReQ== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1360,7 +1360,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: bf4abdac7aaf5a74cf2f12f7511d4af46e5c2b8228637c5eb29f9ed5399e4942 + checksum/secret: c0712053e724267685bc695b8c1ca9656cbaf117cb132897a484553b30b416ba labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 49c259b0d9..713be0a628 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: dkdTTTV4ZkNpc2pneXZBRQ== + haSharedSecret: ZHBQc1FjNjhLTGlaMFBQTA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -934,7 +934,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 40299f1a8b9fffd1ef10051c289e1d654de7f755fff5f44cde65a9cf96bcd543 + checksum/secret: 6443ae7767fff7b93655f39ddacf0246ec37e2a170bb06a00bc62c56ae13e314 labels: app: docker-registry release: flyte-sandbox From acf00e79afc42ffb2864595c819d9c39aade50e7 Mon Sep 17 00:00:00 2001 From: Chris Soyars Date: Thu, 11 Apr 2024 08:33:12 -0700 Subject: [PATCH 2/4] Cean up indentation Signed-off-by: Chris Soyars --- charts/flyte-core/templates/admin/deployment.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/flyte-core/templates/admin/deployment.yaml b/charts/flyte-core/templates/admin/deployment.yaml index cbc7e21464..cc6877a793 100755 --- a/charts/flyte-core/templates/admin/deployment.yaml +++ b/charts/flyte-core/templates/admin/deployment.yaml @@ -46,13 +46,13 @@ spec: {{- with .Values.flyteadmin.env -}} {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} - {{- end }} + {{- end }} {{- if .Values.flyteadmin.envFrom }} envFrom: {{- with .Values.flyteadmin.envFrom -}} {{- tpl (toYaml .) $ | nindent 12 }} {{- end }} - {{- end }} + {{- end }} {{- if .Values.flyteadmin.initialProjects }} - command: - flyteadmin From 18649688b969fa7ea8329c74416ece9d59e6f91b Mon Sep 17 00:00:00 2001 From: Chris Soyars Date: Tue, 26 Nov 2024 09:15:37 -0800 Subject: [PATCH 3/4] chore: run make helm --- docker/sandbox-bundled/manifests/complete-agent.yaml | 4 ++-- docker/sandbox-bundled/manifests/complete.yaml | 4 ++-- docker/sandbox-bundled/manifests/dev.yaml | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index e6bf6e0212..b4617c7126 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -816,7 +816,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: eGJ5UGtPd3FjS1ZKUHBzRg== + haSharedSecret: NEV0eGlOeGtoOVdUTzRsbg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1412,7 +1412,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: c7e0e9ec1bf8adc0647243b2b84b678b319a75125680e1a20416c433a9ac12a6 + checksum/secret: 36a9eb9c7b2d2371f7b2411cc5c54d22e8ddeb56bcb13944b170a7dcc413136f labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index ac71136372..5d98f77ab2 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -796,7 +796,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: N3lSRVA2Tjk3NVN0RmFReQ== + haSharedSecret: OVJDbUQ0Rk1IZERWaG5pdg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1360,7 +1360,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: c0712053e724267685bc695b8c1ca9656cbaf117cb132897a484553b30b416ba + checksum/secret: d55cea36bb847c34e1ddc5cf6235f7ee58fddfd7f93ac402904b6eb07744b56c labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 713be0a628..2ebae7e06d 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: ZHBQc1FjNjhLTGlaMFBQTA== + haSharedSecret: cUNMU1pYR0dSQjZJWXRRYw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -934,7 +934,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 6443ae7767fff7b93655f39ddacf0246ec37e2a170bb06a00bc62c56ae13e314 + checksum/secret: 63ad525fd2165fe44dbf186e8e3216146f8544fe2d41bd35410e1231b09760f2 labels: app: docker-registry release: flyte-sandbox From 21c97401fb6255e069ffb54730352ee8d62bb31f Mon Sep 17 00:00:00 2001 From: Chris Soyars Date: Tue, 26 Nov 2024 09:22:11 -0800 Subject: [PATCH 4/4] chore: run make helm --- docker/sandbox-bundled/manifests/complete-agent.yaml | 4 ++-- docker/sandbox-bundled/manifests/complete.yaml | 4 ++-- docker/sandbox-bundled/manifests/dev.yaml | 5 +++-- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/docker/sandbox-bundled/manifests/complete-agent.yaml b/docker/sandbox-bundled/manifests/complete-agent.yaml index 7b14421d15..56da08046a 100644 --- a/docker/sandbox-bundled/manifests/complete-agent.yaml +++ b/docker/sandbox-bundled/manifests/complete-agent.yaml @@ -819,7 +819,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: MzdjVFBHVmlTTUJLV2FLRA== + haSharedSecret: UE1mU01ZdUU3Mm1EU0M0dg== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1416,7 +1416,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 51eef38b8d9341f4897669e28bab62b0ef7f2a690e6c78756e25dff548f68c57 + checksum/secret: f41ce2d3d3713b025ef28e36a69f78f91ed84b132cc9cb337dd7d23ad9783615 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/complete.yaml b/docker/sandbox-bundled/manifests/complete.yaml index 364ee2e77a..f3ec91ad0a 100644 --- a/docker/sandbox-bundled/manifests/complete.yaml +++ b/docker/sandbox-bundled/manifests/complete.yaml @@ -801,7 +801,7 @@ type: Opaque --- apiVersion: v1 data: - haSharedSecret: QzdpNFV1b01KaVpCZ3NrbQ== + haSharedSecret: UzlMUFQ4QmRVb05pbHZNUw== proxyPassword: "" proxyUsername: "" kind: Secret @@ -1365,7 +1365,7 @@ spec: metadata: annotations: checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 - checksum/secret: 14a953a34adb01e2532145c9fc3eec829b95c5515b181f8877e9837c8ff5ed10 + checksum/secret: ed16cace6787759cf9bbaa202aa5d2942f803ca84fca4a54c2c4128ea9a42d94 labels: app: docker-registry release: flyte-sandbox diff --git a/docker/sandbox-bundled/manifests/dev.yaml b/docker/sandbox-bundled/manifests/dev.yaml index 1fc53050b1..3a676db2b3 100644 --- a/docker/sandbox-bundled/manifests/dev.yaml +++ b/docker/sandbox-bundled/manifests/dev.yaml @@ -499,7 +499,7 @@ metadata: --- apiVersion: v1 data: - haSharedSecret: dkdTTTV4ZkNpc2pneXZBRQ== + haSharedSecret: SnZMbUdvd29EbDF1ckJlVA== proxyPassword: "" proxyUsername: "" kind: Secret @@ -933,7 +933,8 @@ spec: template: metadata: annotations: - checksum/secret: cdfbf45c37e81185184e6abf451cbe04ab03e455ccfd425e83f2e6fddb0b4339 + checksum/config: 8f50e768255a87f078ba8b9879a0c174c3e045ffb46ac8723d2eedbe293c8d81 + checksum/secret: d28e9a7527a41cb3e2b70a28d1bd8aced26f0577ce1b5eea807968f112328499 labels: app: docker-registry release: flyte-sandbox