Skip to content

Commit 6401286

Browse files
authored
Merge pull request #4294 from Nordix/env-var-typo
Fix typo in environment variable name KRM_FN_RUNTIME
2 parents 1d1509c + c1961ba commit 6401286

File tree

9 files changed

+21
-21
lines changed

9 files changed

+21
-21
lines changed

.github/workflows/go.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ jobs:
6565
make all
6666
make test-docker
6767
env:
68-
KRM_FN_RUNTIMETIME: ${{ matrix.runtime }}
68+
KRM_FN_RUNTIME: ${{ matrix.runtime }}
6969

7070
build-macos:
7171
runs-on: macos-latest

Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -95,20 +95,20 @@ test:
9595

9696
# This target is used to run Go tests that require docker runtime.
9797
# Some tests, like pipeline tests, need to have docker available to run.
98-
# KRM_FN_RUNTIMETIME can be set to select the desired function runtime.
98+
# KRM_FN_RUNTIME can be set to select the desired function runtime.
9999
# If unspecified, the default function runtime will be used.
100100
test-docker: build
101101
PATH=$(GOBIN):$(PATH) go test -cover --tags=docker ./...
102102

103103
# KPT_E2E_UPDATE_EXPECTED=true (if expected output to be updated)
104104
# target to run e2e tests for "kpt fn render" command
105-
# KRM_FN_RUNTIMETIME can be set to select the desired function runtime.
105+
# KRM_FN_RUNTIME can be set to select the desired function runtime.
106106
# If unspecified, the default function runtime will be used.
107107
test-fn-render: build
108108
PATH=$(GOBIN):$(PATH) go test -v --tags=docker --run=TestFnRender/testdata/fn-render/$(T) ./e2e/
109109

110110
# target to run e2e tests for "kpt fn eval" command
111-
# KRM_FN_RUNTIMETIME can be set to select the desired function runtime.
111+
# KRM_FN_RUNTIME can be set to select the desired function runtime.
112112
# If unspecified, the default function runtime will be used.
113113
test-fn-eval: build
114114
PATH=$(GOBIN):$(PATH) go test -v --tags=docker --run=TestFnEval/testdata/fn-eval/$(T) ./e2e/

documentation/content/en/reference/cli/fn/doc/_index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ kpt fn doc --image=IMAGE
3434
#### Environment Variables
3535

3636
```
37-
KRM_FN_RUNTIMETIME:
37+
KRM_FN_RUNTIME:
3838
The runtime to run kpt functions. It must be one of "docker", "podman" and "nerdctl".
3939
```
4040

documentation/content/en/reference/cli/fn/eval/_index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ fn-args:
145145
#### Environment Variables
146146

147147
```
148-
KRM_FN_RUNTIMETIME:
148+
KRM_FN_RUNTIME:
149149
The runtime to run kpt functions. It must be one of "docker", "podman" and "nerdctl".
150150
```
151151

@@ -258,7 +258,7 @@ kpt fn eval -i set-namespace:latest --by-kind Deployment --by-name foo -- namesp
258258
```shell
259259
# execute container my-fn with podman on the resources in DIR directory and
260260
# write output back to DIR
261-
$ KRM_FN_RUNTIMETIME=podman kpt fn eval DIR -i gcr.io/example.com/my-fn
261+
$ KRM_FN_RUNTIME=podman kpt fn eval DIR -i gcr.io/example.com/my-fn
262262
```
263263

264264
<!--mdtogo-->

e2e/testdata/fn-eval/image-pull-policy-always/.expected/setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
set -eo pipefail
1717

18-
KRM_FN_RUNTIMETIME="${KRM_FN_RUNTIMETIME:=docker}"
18+
KRM_FN_RUNTIME="${KRM_FN_RUNTIME:=docker}"
1919

2020
# Function ghcr.io/kptdev/krm-functions-catalog/foo:v0.1 prints "foo" to stderr and
2121
# function ghcr.io/kptdev/krm-functions-catalog/bar:v0.1 prints "bar" to stderr.
2222
# We intentionally tag a wrong image as ghcr.io/kptdev/krm-functions-catalog/foo:v0.1, since we
2323
# expect the correct image to be pulled and override the wrong image.
24-
${KRM_FN_RUNTIMETIME} pull ghcr.io/kptdev/krm-functions-catalog/bar:v0.1
25-
${KRM_FN_RUNTIMETIME} tag ghcr.io/kptdev/krm-functions-catalog/bar:v0.1 ghcr.io/kptdev/krm-functions-catalog/foo:v0.1
24+
${KRM_FN_RUNTIME} pull ghcr.io/kptdev/krm-functions-catalog/bar:v0.1
25+
${KRM_FN_RUNTIME} tag ghcr.io/kptdev/krm-functions-catalog/bar:v0.1 ghcr.io/kptdev/krm-functions-catalog/foo:v0.1

e2e/testdata/fn-eval/no-image-pull/.expected/exec.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
set -eo pipefail
1717

18-
KRM_FN_RUNTIMETIME="${KRM_FN_RUNTIMETIME:=docker}"
18+
KRM_FN_RUNTIME="${KRM_FN_RUNTIME:=docker}"
1919

2020
kpt fn eval --image ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
2121

22-
${KRM_FN_RUNTIMETIME} image inspect ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
22+
${KRM_FN_RUNTIME} image inspect ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
2323
if [[ $? != 0 ]]; then
2424
echo "ERR: Image could not be found locally and may not have been pulled"
2525
exit 1

e2e/testdata/fn-eval/no-image-pull/.expected/setup.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
# See the License for the specific language governing permissions and
1414
# limitations under the License.
1515

16-
KRM_FN_RUNTIMETIME="${KRM_FN_RUNTIMETIME:=docker}"
16+
KRM_FN_RUNTIME="${KRM_FN_RUNTIME:=docker}"
1717

18-
${KRM_FN_RUNTIMETIME} image inspect ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
18+
${KRM_FN_RUNTIME} image inspect ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
1919
# if inspect exits with a 0 exit code the image was found locally, remove it
2020
if [[ $? == 0 ]]; then
21-
${KRM_FN_RUNTIMETIME} image rm ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
21+
${KRM_FN_RUNTIME} image rm ghcr.io/kptdev/krm-functions-catalog/search-replace:latest
2222
fi

internal/docs/generated/fndocs/docs.go

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/fnruntime/container.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ const (
5252
podmanBin string = "podman"
5353
nerdctlBin string = "nerdctl"
5454

55-
ContainerRuntimeEnv = "KRM_FN_RUNTIMETIME"
55+
ContainerRuntimeEnv = "KRM_FN_RUNTIME"
5656

5757
Docker ContainerRuntime = "docker"
5858
Podman ContainerRuntime = "podman"

0 commit comments

Comments
 (0)