mirror of
https://github.com/moghtech/komodo.git
synced 2026-04-30 14:25:22 -05:00
deal with deployment build version
This commit is contained in:
@@ -579,6 +579,25 @@ fn serialize_resources_toml(
|
|||||||
.context("deployment has no config?")?
|
.context("deployment has no config?")?
|
||||||
.as_object_mut()
|
.as_object_mut()
|
||||||
.context("config is not object?")?;
|
.context("config is not object?")?;
|
||||||
|
if let Some(DeploymentImage::Build { version, .. }) =
|
||||||
|
&deployment.config.image
|
||||||
|
{
|
||||||
|
let image = config
|
||||||
|
.get_mut("image")
|
||||||
|
.context("deployment has no image")?
|
||||||
|
.get_mut("params")
|
||||||
|
.context("deployment image has no params")?
|
||||||
|
.as_object_mut()
|
||||||
|
.context("deployment image params is not object")?;
|
||||||
|
if version.is_none() {
|
||||||
|
image.remove("version");
|
||||||
|
} else {
|
||||||
|
image.insert(
|
||||||
|
"version".to_string(),
|
||||||
|
Value::String(version.to_string()),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
if let Some(term_signal_labels) =
|
if let Some(term_signal_labels) =
|
||||||
&deployment.config.term_signal_labels
|
&deployment.config.term_signal_labels
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user