Skip to content

Commit 02fcf0c

Browse files
author
NETIZEN-11
committed
fix: keep apply-setters v0.2.0 in functions map for backward compatibility
The PR bumps apply-setters to v0.2.4 in go.mod. Adding v0.2.4 to the functions registry is required so Kptfiles referencing the new version work with the built-in runner. v0.2.0 is kept for backward compatibility with existing Kptfiles that already reference that version. Also revert testdata Kptfiles back to v0.2.0 since both versions are now supported by the functions map. Addresses reviewer question on PR kptdev#4432 Signed-off-by: NETIZEN-11 <kumarnitesh121411@gmail.com>
1 parent 4939379 commit 02fcf0c

3 files changed

Lines changed: 4 additions & 2 deletions

File tree

internal/kptops/functions.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ import (
1919
)
2020

2121
var functions map[string]framework.ResourceListProcessorFunc = map[string]framework.ResourceListProcessorFunc{
22+
// v0.2.0 kept for backward compatibility with existing Kptfiles
23+
"ghcr.io/kptdev/krm-functions-catalog/apply-setters:v0.2.0": applySetters,
2224
"ghcr.io/kptdev/krm-functions-catalog/apply-setters:v0.2.4": applySetters,
2325
"ghcr.io/kptdev/krm-functions-catalog/set-labels:v0.1.5": setLabels,
2426
"ghcr.io/kptdev/krm-functions-catalog/set-namespace:v0.4.1": setNamespace,

internal/kptops/testdata/render-with-function-config/simple-bucket/Kptfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,5 +22,5 @@ info:
2222
description: A Google Cloud Storage bucket
2323
pipeline:
2424
mutators:
25-
- image: ghcr.io/kptdev/krm-functions-catalog/apply-setters:v0.2.4
25+
- image: ghcr.io/kptdev/krm-functions-catalog/apply-setters:v0.2.0
2626
configPath: setters.yaml

internal/kptops/testdata/render-with-inline-config/simple-bucket/Kptfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ info:
88
description: A Google Cloud Storage bucket
99
pipeline:
1010
mutators:
11-
- image: ghcr.io/kptdev/krm-functions-catalog/apply-setters:v0.2.4
11+
- image: ghcr.io/kptdev/krm-functions-catalog/apply-setters:v0.2.0
1212
configMap:
1313
name: updated-bucket-name
1414
namespace: updated-namespace

0 commit comments

Comments
 (0)