Skip to content

Commit

Permalink
Rename set-labels and set-annotations (#2018)
Browse files Browse the repository at this point in the history
set-label -> set-labels
set-annotation -> set-annotations
  • Loading branch information
Mengqi Yu authored May 17, 2021
1 parent 08d479d commit 8b1a4dd
Show file tree
Hide file tree
Showing 51 changed files with 71 additions and 71 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ test-fn-eval: build

# target to flush kpt-fn cache
flush-fn-cache:
for fn in set-namespace set-label set-annotation starlark; do \
for fn in set-namespace set-labels set-annotations starlark; do \
docker image rm gcr.io/kpt-fn/$$fn:unstable ; \
done

Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/exclude-fn-config-by-default/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Kptfile b/Kptfile
index cdf6fa7..7246298 100644
index 9c11c4f..f5353ca 100644
--- a/Kptfile
+++ b/Kptfile
@@ -2,7 +2,8 @@ apiVersion: kpt.dev/v1alpha2
Expand All @@ -10,8 +10,8 @@ index cdf6fa7..7246298 100644
pipeline:
mutators:
- - configPath: labelconfig.yaml
- image: gcr.io/kpt-fn/set-label:v0.1
+ - image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1
+ - image: gcr.io/kpt-fn/set-labels:v0.1
+ configPath: labelconfig.yaml
diff --git a/labelconfig.yaml b/labelconfig.yaml
index bb5d15c..f3a8b49 100644
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/include-meta-resources/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
pipeline:
mutators:
- configPath: labelconfig.yaml
image: gcr.io/kpt-fn/set-label:v0.1
image: gcr.io/kpt-fn/set-labels:v0.1
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: app
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ metadata:
name: db
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configPath: labelconfig.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
diff --git a/Kptfile b/Kptfile
index cdf6fa7..7246298 100644
index 9c11c4f..f5353ca 100644
--- a/Kptfile
+++ b/Kptfile
@@ -2,7 +2,8 @@ apiVersion: kpt.dev/v1alpha2
Expand All @@ -10,11 +10,11 @@ index cdf6fa7..7246298 100644
pipeline:
mutators:
- - configPath: labelconfig.yaml
- image: gcr.io/kpt-fn/set-label:v0.1
+ - image: gcr.io/kpt-fn/set-label:v0.1
- image: gcr.io/kpt-fn/set-labels:v0.1
+ - image: gcr.io/kpt-fn/set-labels:v0.1
+ configPath: labelconfig.yaml
diff --git a/db/Kptfile b/db/Kptfile
index 7d7cf73..64ade60 100644
index 94fe38b..462c556 100644
--- a/db/Kptfile
+++ b/db/Kptfile
@@ -2,7 +2,8 @@ apiVersion: kpt.dev/v1alpha2
Expand All @@ -25,8 +25,8 @@ index 7d7cf73..64ade60 100644
pipeline:
mutators:
- - configPath: labelconfig.yaml
- image: gcr.io/kpt-fn/set-label:unstable
+ - image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
+ - image: gcr.io/kpt-fn/set-labels:unstable
+ configPath: labelconfig.yaml
diff --git a/db/labelconfig.yaml b/db/labelconfig.yaml
index ad6b09d..b7b0335 100644
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-eval/subpkg-include-meta-resources/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
pipeline:
mutators:
- configPath: labelconfig.yaml
image: gcr.io/kpt-fn/set-label:v0.1
image: gcr.io/kpt-fn/set-labels:v0.1
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ metadata:
pipeline:
mutators:
- configPath: labelconfig.yaml
image: gcr.io/kpt-fn/set-label:unstable
image: gcr.io/kpt-fn/set-labels:unstable
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/all-resource-deletion/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/basicpipeline/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/fn-failure/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/fnconfig/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configPath: labelconfig.yaml
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/fnconfig/db/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/generator/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: db
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/generator/db/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/inline-fnconfig/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
config: # inline config
apiVersion: v1
kind: ConfigMap
Expand Down
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/invalid-configmap-fnconfig/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap: # invalid config
tier: backend
envs: # lists are not allowed in configmap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# limitations under the License.

exitCode: 1
stdErr: 'Error: invalid pipeline: function "gcr.io/kpt-fn/set-label:unstable": functionConfig must be a valid KRM resource with `apiVersion` and `kind` fields'
stdErr: 'Error: invalid pipeline: function "gcr.io/kpt-fn/set-labels:unstable": functionConfig must be a valid KRM resource with `apiVersion` and `kind` fields'
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/invalid-inline-fnconfig/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
config: # invalid inline config, missing apiVersion/kind
tier: backend
envs:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
# limitations under the License.

exitCode: 1
stdErr: "Error: function image \"gcr.io/kpt-fn/set-label1\" doesn't exist"
stdErr: "Error: function image \"gcr.io/kpt-fn/set-labels1\" doesn't exist"
stdOut: |
[RUNNING] "gcr.io/kpt-fn/set-namespace:unstable"
[PASS] "gcr.io/kpt-fn/set-namespace:unstable"
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/missing-fn-image/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label1 # non-existing image
- image: gcr.io/kpt-fn/set-labels1 # non-existing image
configMap:
tier: backend
4 changes: 2 additions & 2 deletions e2e/testdata/fn-render/missing-fnconfig/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
exitCode: 1
stdErr: 'Error: missing function config "labelconfig1.yaml"'
stdOut: |
[RUNNING] "gcr.io/kpt-fn/set-label:unstable"
[PASS] "gcr.io/kpt-fn/set-label:unstable"
[RUNNING] "gcr.io/kpt-fn/set-labels:unstable"
[PASS] "gcr.io/kpt-fn/set-labels:unstable"
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/missing-fnconfig/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configPath: labelconfig1.yaml
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/missing-fnconfig/db/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
4 changes: 2 additions & 2 deletions e2e/testdata/fn-render/no-fnconfig/.expected/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,5 @@
exitCode: 1
stdErr: "failed to configure function: function config must be a ConfigMap or SetLabelConfig"
stdOut: |
[RUNNING] "gcr.io/kpt-fn/set-label:unstable"
[FAIL] "gcr.io/kpt-fn/set-label:unstable"
[RUNNING] "gcr.io/kpt-fn/set-labels:unstable"
[FAIL] "gcr.io/kpt-fn/set-labels:unstable"
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/no-fnconfig/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ index 10cd18b..a9dd224 100644
+ labels:
+ tier: backend
spec:
image: nginx:1.2.3
image: nginx:1.2.3
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/no-pipeline-in-subpackage/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/resource-deletion/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/resource-has-pkgname-prefix/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ metadata:
name: wordpress
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-annotation:unstable
- image: gcr.io/kpt-fn/set-annotations:unstable
configMap:
abc: def
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,6 @@ metadata:
name: mysql
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-annotation:v0.1
- image: gcr.io/kpt-fn/set-annotations:v0.1
configMap:
foo: bar
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkg-fn-failure/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkg-fn-failure/db/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkg-has-invalid-kptfile/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ configPath: statefulset-filter.yaml
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkg-resource-deletion/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkg-resource-deletion/db/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkgs/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: db
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/subpkgs/db/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: db
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
app: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/success-stdout/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,6 @@ pipeline:
- image: gcr.io/kpt-fn/set-namespace:unstable
configMap:
namespace: staging
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion e2e/testdata/fn-render/validator-mutates-resources/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,6 @@ metadata:
pipeline:
validators:
# mutating function is being used as validator
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
configMap:
tier: backend
2 changes: 1 addition & 1 deletion internal/docs/generated/fndocs/docs.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package-examples/pipeline-validate/Kptfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: kpt-pipeline-validate-example
pipeline:
mutators:
- image: gcr.io/kpt-fn/set-label:unstable
- image: gcr.io/kpt-fn/set-labels:unstable
config:
apiVersion: fn.kpt.dev/v1alpha1
kind: SetLabelConfig
Expand Down
Loading

0 comments on commit 8b1a4dd

Please sign in to comment.