Conversation
Signed-off-by: Teo Koon Peng <koonpeng@google.com>
| - --key-store=KUBERNETES | ||
| - --namespace=app-token-vendor | ||
| {{- end }} | ||
| {{- if and .Values.token_vendor .Values.token_vendor.resources }} |
There was a problem hiding this comment.
Are you saying that if you create values.yaml adjacent to BUILD and refer to it from this target then something breaks? Can you share the exact error? I'd expect that to work:
You might need to copy-paste
for the default values? Or at least a subset like in this example: https://github.com/googlecloudrobotics/core/blob/270d1786d30af37814accd73ea27640013bb3884/src/app_charts/k8s-relay/values-cloud.yamlThere was a problem hiding this comment.
Yes, like k8s-relay. This is the error if I do not copy the base values
INFO: Analyzed target //src/app_charts/token-vendor:token-vendor-cloud (698 packages loaded, 24751 targets configured).
INFO: From Action src/app_charts/token-vendor/token-vendor-cloud-0.0.1.tgz:
Error: 1 chart(s) linted, 1 chart(s) failed
==> Linting token-vendor-cloud
[ERROR] templates/: render error in "token-vendor-cloud/templates/token-vendor.yaml": template: token-vendor-cloud/templates/token-vendor.yaml:31:7: executing "token-vendor-cloud/templates/token-vendor.yaml" at <eq .Values.deploy_environment "GCP-testing">: error calling eq: incompatible types for comparison
INFO: Found 1 target...
Target //src/app_charts/token-vendor:token-vendor-cloud up-to-date:
bazel-bin/src/app_charts/token-vendor/token-vendor-cloud-0.0.1.tgz
INFO: Elapsed time: 1.540s, Critical Path: 0.31s
INFO: 3 processes: 564 action cache hit, 1 internal, 2 linux-sandbox.
INFO: Build completed successfully, 3 total actions
bazel still thinks the build succeeded, but I don't think it actually succeeded.
Signed-off-by: Teo Koon Peng <koonpeng@google.com>
|
Added |
…-resources Signed-off-by: Teo Koon Peng <koonpeng@google.com>
Signed-off-by: Teo Koon Peng <koonpeng@google.com>
| name: string. Must be in the format {app}-{chart}, where chart is | ||
| robot, cloud, or cloud-per-robot. | ||
| values: file. The values.yaml file. | ||
| extra_values: list of files. Extra values files to append to values.yaml. |
There was a problem hiding this comment.
TBH. I do not understand we we need 2 values files. If we need to, it should be crystal clear from the code how it would be used and why it is beneficial.
There was a problem hiding this comment.
If a values file is not given, a default values file will be used. token-vendor use values in the default values file so if we want to add more values, we need to copy and extend the default. It's just a rare case that if we want to change the default, there is no longer any single SOT.
There was a problem hiding this comment.
I guess Stefan is asking for a cleanup that migrates the other charts to use extra_values. Otherwise people will have the same problem as before: if they copy-paste the example from k8s-relay to a chart that uses values that are not in k8s-relay's values-cloud.yaml, they'll get the same error you did.
There was a problem hiding this comment.
A cleanup can be in a followup, but I like to have more details on the bazel rule that explains the need.
Eg. when I look at https://github.com/googlecloudrobotics/core/tree/main/src/app_charts/token-vendor
it does not yet have any values.yaml at all.
There was a problem hiding this comment.
What is now the usecase for specifying values? If no rule is doing this anymore and everything is using extra_values, we can keep the attribute name to be called "values" and prepend the defaults?
Signed-off-by: Teo Koon Peng <koonpeng@google.com>
Signed-off-by: Teo Koon Peng <koonpeng@google.com>
Signed-off-by: Teo Koon Peng <koonpeng@google.com>
Not sure if this is a good way to implement it. iiuc
token-vendoris using some basevalues.yaml(likedeploy_environment). If I define values file in the app_chart it fails to render unless I copy and extend the base values.