SubState
在 Statefile 中使用 SubStates 键,可以引用其他 Statefile。
同一 Statefile 需要在多个位置复用时很有用。
在单一仓库中,也可将状态保存在唯一权威来源中。
使用示例:
ApiVersion: v0.18
Namespace: global
SubStates:
# You can require substates from remote urls
- https://my-domain/remote-statefile.yml
# Or from local files
- ./sub_child.yml
# If your substate have arguments, you can pass them like this
- Path: ./sub_child.yml
Args:
- Name: my-arg
Value: my-value
Cargoes:
- Name: my-cargo
Containers:
- Name: web
Image: ghcr.io/next-hat/nanocl-get-started:latest
Resources:
- Name: deploy-example.com
Kind: ncproxy.io/rule/v0.15
Data:
Rules:
- Domain: deploy-example.com
Network: All
Locations:
- Path: /
Target:
Key: global.my-cargo.c
Port: 9000最后更新于