有没有关于如何在 kustomize 中使用 vars 的文档?

Is there any documentation on how to use vars in kustomize?

我想使用没有 ConfigMaps 或 Secrets 的变量。声明一个值对我来说就足够了。但是我看不到任何关于 vars 属性或如何使用的文档。你知道关于这个的任何文档吗?谢谢!

vars:
  - name: ROUTE_HOST
    objref:
      kind: ConfigMap
      name: template-vars
      apiVersion: v1
    fieldref:
      fieldpath: data.ROUTE_HOST

总结 Jonas 的评论:

WARNING: There are plans to deprecate vars. For existing users of vars, we recommend migration to replacements as early as possible. There is a guide for convering vars to replacements at the bottom of this page under “convert vars to replacements”. For new users, we recommend never using vars, and starting with replacements to avoid migration in the future.

请在 the official documentation 中找到更多信息。

尝试使用上面建议的替代品。