Skip to Content

SubState

SubStates キーを使うと、Statefile から別の 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
最終更新日