Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat: add an example about the global-variables policy #95

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

barnettZQG
Copy link
Contributor

Signed-off-by: barnettZQG [email protected]

@barnettZQG barnettZQG changed the title Feat: add a example about the global-variables policy Feat: add an example about the global-variables policy Jul 7, 2022
port: context.variables.DB_PORT
user: context.variables.DB_USER
password: context.variables.DB_PASSWORD
database: context.variables.DB_DATABASE
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个方案的核心问题是会把我们从 IaD 变成 IaC。 每个 value 都加入了 magic,需要计算一下,再render。

现在我们的 Application 是 IaD 的,每个数据都是固定的 data,不需要计算。 唯一需要计算的可能就是 output 里加入了一个 valueFrom

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如果要保留之前的机制,那就是通过 valueFrom 来设置参数获取和赋值。但是感觉写起来有点多余。因为不得不为 每个字段先写一个默认值。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants