Skip to content

Commit 8090f29

Browse files
committed
Merge configuration.inline storage overrides into co-pilot's Secret
configuration.inline reaches the binary as 100-inline-config.yaml, which viper merges over the chart's 003-storage.yaml. Co-pilot never sees that file, and once a Secret is configured nothing travels on its command line either, so a deployment that set its endpoint or session token through inline had co-pilot talking to a different object store than the binary it belongs to. Merge the same overrides into the Secret. The block the helper already renders is round-tripped through fromYaml so the provider branching stays in one place, and only deployments that actually set configuration.inline.storage take that path: every other render is byte-identical. Verified that the result loads under co-pilot's strict-mode config accessor, including the devbox's storage.signedURL section, which the merge now carries across. Signed-off-by: Kevin Su <pingsutw@apache.org>
1 parent 2ac7b7e commit 8090f29

2 files changed

Lines changed: 25 additions & 10 deletions

File tree

charts/flyte-binary/templates/config-secret.yaml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,18 @@ stringData:
7878
# The whole Secret is projected, so the key name is ours to choose — but the .yaml suffix
7979
# is what makes co-pilot's *.yaml glob find it, and an unsuffixed key is never read.
8080
copilot-storage-config.yaml: |
81-
{{- include "flyte-binary.configuration.storageBlock" (dict "root" $ "withCredentials" true) | nindent 4 }}
81+
{{- $block := include "flyte-binary.configuration.storageBlock" (dict "root" $ "withCredentials" true) }}
82+
{{- $inlineStorage := dict }}
83+
{{- if and .Values.configuration.inline (hasKey .Values.configuration.inline "storage") }}
84+
{{- $inlineStorage = index .Values.configuration.inline "storage" }}
85+
{{- end }}
86+
{{- if $inlineStorage }}
87+
{{- /* configuration.inline reaches the binary through 100-inline-config.yaml, which
88+
co-pilot never sees. Merge the same overrides in here, or co-pilot talks to a
89+
different object store than the deployment it belongs to. */}}
90+
{{- toYaml (mergeOverwrite ($block | fromYaml) (dict "storage" $inlineStorage)) | nindent 4 }}
91+
{{- else }}
92+
{{- $block | nindent 4 }}
93+
{{- end }}
8294
{{- end }}
8395
{{- end }}

docker/devbox-bundled/manifests/complete.yaml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8187,18 +8187,21 @@ metadata:
81878187
stringData:
81888188
copilot-storage-config.yaml: |
81898189
storage:
8190-
type: stow
8190+
container: flyte-data
8191+
signedURL:
8192+
stowConfigOverride:
8193+
endpoint: http://localhost:30002
81918194
stow:
8192-
kind: s3
81938195
config:
8194-
region: us-east-1
8196+
access_key_id: rustfs
8197+
auth_type: accesskey
81958198
disable_ssl: true
8196-
v2_signing: true
81978199
endpoint: http://rustfs-svc.flyte:9000
8198-
auth_type: accesskey
8199-
access_key_id: "rustfs"
8200-
secret_key: "rustfsstorage"
8201-
container: flyte-data
8200+
region: us-east-1
8201+
secret_key: rustfsstorage
8202+
v2_signing: true
8203+
kind: s3
8204+
type: stow
82028205
type: Opaque
82038206
---
82048207
apiVersion: v1
@@ -8761,7 +8764,7 @@ spec:
87618764
metadata:
87628765
annotations:
87638766
checksum/configuration: 234f623bb88a11f8007d57f08b191c0d071273e46a56b910dfbba8ae6f43a34c
8764-
checksum/configuration-secret: 652a905205b043cbc7e2d4dbb41c05679fbec92bd4aecee1b996834f797d559b
8767+
checksum/configuration-secret: ff95a9986cc42dff0a114449c9b8e9a95c781b7bdd9832b31ca461423ae0b678
87658768
labels:
87668769
app.kubernetes.io/component: flyte-binary
87678770
app.kubernetes.io/instance: flyte-devbox

0 commit comments

Comments
 (0)