Skip to content

Commit

Permalink
updates for set-project-id/v0.1 branch (#526)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mengqi Yu committed Aug 10, 2021
1 parent 0c4fbf2 commit 58a9c31
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/set-project-id-advanced/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ Running `set-project-id` function on the example packed will:
Get the example package by running the following commands:

```shell
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/set-project-id-advanced
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/set-project-id-advanced@set-project-id/v0.1
```

### Function invocation

Invoke the function with the following command:

```shell
kpt fn eval set-project-id-advanced --include-meta-resources --image gcr.io/kpt-fn/set-project-id:unstable -- 'project-id=foo'
kpt fn eval set-project-id-advanced --include-meta-resources --image gcr.io/kpt-fn/set-project-id:v0.1 -- 'project-id=foo'
```

### Expected result
Expand Down
2 changes: 1 addition & 1 deletion examples/set-project-id-simple/.expected/config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
testType: eval
includeMetaResources: true
image: gcr.io/kpt-fn/set-project-id:unstable
image: gcr.io/kpt-fn/set-project-id:v0.1
args:
project-id: foo
4 changes: 2 additions & 2 deletions examples/set-project-id-simple/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,15 @@ Running `set-project-id` function on the example packed will:
Get the example package by running the following commands:

```shell
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/set-project-id-simple
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/set-project-id-simple@set-project-id/v0.1
```

### Function invocation

Invoke the function with the following command:

```shell
kpt fn eval set-project-id-simple --include-meta-resources --image gcr.io/kpt-fn/set-project-id:unstable -- 'project-id=foo'
kpt fn eval set-project-id-simple --include-meta-resources --image gcr.io/kpt-fn/set-project-id:v0.1 -- 'project-id=foo'
```

### Expected result
Expand Down
4 changes: 2 additions & 2 deletions functions/go/set-project-id/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if they are not already set.
set-project-id function is expected to be executed imperatively like:

```shell
kpt fn eval --include-meta-resources --image gcr.io/kpt-fn/set-project-id:unstable -- 'project-id=foo'
kpt fn eval --include-meta-resources --image gcr.io/kpt-fn/set-project-id:v0.1 -- 'project-id=foo'
```

The `set-project-id` function does the following:
Expand Down Expand Up @@ -63,7 +63,7 @@ metadata:
Invoke the function:

```shell
kpt fn eval --include-meta-resources --image gcr.io/kpt-fn/set-project-id:unstable -- 'project-id=foo'
kpt fn eval --include-meta-resources --image gcr.io/kpt-fn/set-project-id:v0.1 -- 'project-id=foo'
```

Kptfile will be updated to the following:
Expand Down
6 changes: 3 additions & 3 deletions functions/go/set-project-id/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ description: Set project id setter and annotatons if unset.
tags:
- mutator
- GCP
sourceURL: https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/functions/go/set-project-id
sourceURL: https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/set-project-id/v0.1/functions/go/set-project-id
examplePackageURLs:
- https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/set-project-id-simple
- https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/master/examples/set-project-id-advanced
- https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/set-project-id/v0.1/examples/set-project-id-simple
- https://github.com/GoogleContainerTools/kpt-functions-catalog/tree/set-project-id/v0.1/examples/set-project-id-advanced
emails:
- kpt-team@google.com
license: Apache-2.0
Expand Down

0 comments on commit 58a9c31

Please sign in to comment.