diff --git a/testdata/fn-config.yaml b/testdata/fn-config.yaml index 88c8b3b..c5e5451 100644 --- a/testdata/fn-config.yaml +++ b/testdata/fn-config.yaml @@ -4,6 +4,6 @@ metadata: name: set-replicas spec: params: - replicas: 5 + replicas: 6 source: | - [item | {if item.kind == "Deployment": spec.replicas = option("resource_list").functionConfig.spec.params.replicas} for item in option("resource_list").items] + [item | {if item.kind == "Deployment": spec.replicas = option("params").replicas} for item in option("items") or []] diff --git a/testdata/resources.yaml b/testdata/resources.yaml index 10f7e6f..3a77495 100644 --- a/testdata/resources.yaml +++ b/testdata/resources.yaml @@ -17,7 +17,7 @@ metadata: labels: app: nginx spec: - replicas: 5 + replicas: 6 selector: matchLabels: app: nginx