Skip to content

Commit

Permalink
Merge master into set/annotations/v0.1 (#265)
Browse files Browse the repository at this point in the history
* implement starlark function (#177)

* implement starlark function

* drop path and url support, update doc and add another test

* update error message according to the guideline

* code review

* update example

* update the starlark example (#188)

* use Entrypoint instead of CMD in Dockerfiles (#189)

Also tweak Dockerfile to speed up build speed by avoiding repeatly downloading go modules

* apply-setters function (#167)

* set-setter function

* Address docs and other comments

* Suggested changes 2

* Search and replace function (#190)

* Example, README and output for search and replace (#194)

* Example and output for search replace

* Add README for example and punt usage docs

* Rename function to search-replace

* Add ENTRYPOINT for search-replace and apply-setters (#195)

* apply-setters and search-replace README and generated docs (#196)

* Search replace README and generated docs

* Apply setters README and godocs

* Suggested changes: generate docs for all funcitons via looping

* Suggested changes: apply-setters docs

* Update image name to full image path

* Suggested changes: remove sh and func-generate to docs-generate

* kpt-fns to kpt-fn

* Don't use dev tag in test (#199)

* Run helm-inflator as current user (#200)

* add a template for usage doc (#198)

* add a template for usage doc

* move the usage doc template into functions/go dir

* put it in comments

* code review

* update examples section

* update Synopsis section

* Update README.md

Co-authored-by: Frank Farzan <[email protected]>

* Migrate policy-controller-validate to use kyaml (#197)

* Initial commit

* Add short flags and usage to gatekeeper function.

Also add a release workflow for pushing to gcr.

* Upgrade OPA constraint framework (#132)

* Upgrade OPA constraint framework
* Change revision -> version in Gopkg.toml

Signed-off-by: Max Smythe <[email protected]>

* Log violated constraint

* Move validate.go to the desired dir after running git filter-branch

* Migrate policy-controller-validate to use kyaml

* code review

* rename fn to gatekeeper-validate

* Support different enforcement levels

* code review

* code review

Co-authored-by: Frank Farzan <[email protected]>
Co-authored-by: Max Smythe <[email protected]>
Co-authored-by: Prachi Pendse <[email protected]>

* fix: upgrade @types/jasmine from 3.6.2 to 3.6.6 (#205)

Snyk has created this PR to upgrade @types/jasmine from 3.6.2 to 3.6.6.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade typescript from 4.1.3 to 4.2.3 (#203)

Snyk has created this PR to upgrade typescript from 4.1.3 to 4.2.3.

See this package in npm:
https://www.npmjs.com/package/typescript

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.2 to 3.6.6 (#207)

Snyk has created this PR to upgrade @types/jasmine from 3.6.2 to 3.6.6.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/0c90cff6-4386-4509-bd57-37f0b57f5960?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade typescript from 4.1.3 to 4.2.3 (#206)

Snyk has created this PR to upgrade typescript from 4.1.3 to 4.2.3.

See this package in npm:
https://www.npmjs.com/package/typescript

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/0c90cff6-4386-4509-bd57-37f0b57f5960?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade typescript from 4.1.3 to 4.2.3 (#208)

Snyk has created this PR to upgrade typescript from 4.1.3 to 4.2.3.

See this package in npm:
https://www.npmjs.com/package/typescript

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.2 to 3.6.6 (#209)

Snyk has created this PR to upgrade @types/jasmine from 3.6.2 to 3.6.6.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* Add metadata.yaml files and remove dir convention for examples (#202)

* Add metadata.yaml files and remove dir convention for examples

* update metadata

* fix: upgrade typescript from 4.1.3 to 4.2.3 (#210)

Snyk has created this PR to upgrade typescript from 4.1.3 to 4.2.3.

See this package in npm:
https://www.npmjs.com/package/typescript

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/23d8f4ca-6976-433c-98ec-370eccabc2e7?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.2 to 3.6.7 (#211)

Snyk has created this PR to upgrade @types/jasmine from 3.6.2 to 3.6.7.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/23d8f4ca-6976-433c-98ec-370eccabc2e7?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.6.3 to 3.7.0 (#212)

Snyk has created this PR to upgrade jasmine from 3.6.3 to 3.7.0.

See this package in npm:
https://www.npmjs.com/package/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* bump up go-yaml version that includes roundtripping fixes (#213)

* fix: upgrade @types/jasmine from 3.6.6 to 3.6.7 (#215)

Snyk has created this PR to upgrade @types/jasmine from 3.6.6 to 3.6.7.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/0c90cff6-4386-4509-bd57-37f0b57f5960?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.6.3 to 3.7.0 (#214)

Snyk has created this PR to upgrade jasmine from 3.6.3 to 3.7.0.

See this package in npm:
https://www.npmjs.com/package/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/23d8f4ca-6976-433c-98ec-370eccabc2e7?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.6 to 3.6.7 (#217)

Snyk has created this PR to upgrade @types/jasmine from 3.6.6 to 3.6.7.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* Use README.md as usage doc for all golang functions (#216)

* bump go-yaml to the latest (#222)

* fix: upgrade jasmine from 3.6.3 to 3.7.0 (#221)

Snyk has created this PR to upgrade jasmine from 3.6.3 to 3.7.0.

See this package in npm:
https://www.npmjs.com/package/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/0c90cff6-4386-4509-bd57-37f0b57f5960?utm_source=github&utm_medium=upgrade-pr

* fix links in examples (#227)

* Add ensure-name-substring function (#226)

* Add function set-name-prefix

* update error message

* Add ensure-name-segment function

* code review

* add note that seeks feedback

* improve error messages

Co-authored-by: Donny Xia <[email protected]>

* fix: upgrade @types/node from 14.14.21 to 14.14.36 (#228)

Snyk has created this PR to upgrade @types/node from 14.14.21 to 14.14.36.

See this package in npm:
https://www.npmjs.com/package/@types/node

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/23d8f4ca-6976-433c-98ec-370eccabc2e7?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.7 to 3.6.9 (#230)

Snyk has created this PR to upgrade @types/jasmine from 3.6.7 to 3.6.9.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/23d8f4ca-6976-433c-98ec-370eccabc2e7?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.7 to 3.6.9 (#232)

Snyk has created this PR to upgrade @types/jasmine from 3.6.7 to 3.6.9.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/0c90cff6-4386-4509-bd57-37f0b57f5960?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.6.3 to 3.7.0 (#235)

Snyk has created this PR to upgrade jasmine from 3.6.3 to 3.7.0.

See this package in npm:
https://www.npmjs.com/package/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.6 to 3.6.9 (#234)

Snyk has created this PR to upgrade @types/jasmine from 3.6.6 to 3.6.9.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.6.7 to 3.6.9 (#237)

Snyk has created this PR to upgrade @types/jasmine from 3.6.7 to 3.6.9.

See this package in npm:
https://www.npmjs.com/package/@types/jasmine

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* Clean up search-replace and apply-setters docs (#201)

* Clean up search-replace and apply-setters docs

* Use run instead of eval and migrate later

* Add sh

* fork openapi2jsonschema in fn kubeval (#240)

* fork github.com/instrumenta/openapi2jsonschema@d697cbff8a25f520e125e3a5f79cb4e9b972e8ce

* drop forked directory

* Add a catalog landing page (#176)

* Stage multiple versions of helm-inflator.

* Site page with versions dropdown hook.

* Copy helm-inflator/local-configs to versions.

* Updated directory structure to remove latest.

* Use semver to sort version list.

* Add catalog generator go command.

* Add named examples to directory structure.

* Add named examples to web page.

* Delete intermediary helm-template dir.

* Account for directories without releases.

* Add names and descriptions for existing funcs.

* Don't use hidden directories as examples.

* Move catalog generation script to its own dir.

* Get function descriptions from `kpt fn doc`

* Remove comment.

* Trim new line from desription.

* Add catalog json generation.

* Get dropdown information from catalog json.

* Add site generator to makefile.

* Update catalog generator to design doc.

* Change the GitHub icon link on func pages.

* Link to function dir in GH instead of just repo.

* Address PR comments.

* Switch yaml fetch to cat-file.

* Reinclude reverted deletions.

* Make kubeval hermetic (#233)

* make kubeval hermetic

* use json parser

* openapi2jsonschema should handle strict

* rebase on new fork openapi2jsonschema

* Use [email protected] in metadata.yaml (#245)

* remove validators directory in examples (#247)

* Update the catalog title

Per style guide: `kpt` not `KPT`.

* Update README.md

* add check to verify docs (#246)

* check metadata files

* check examples and handle release branches

* update how to install mdrip in CI

* Do not process hidden function versions. (#252)

* Rename functions (#251)

gatekeeper-validate -> enforce-gatekeeper
set-annotation -> set-annotations
set-label -> set-labels
helm-inflator -> inflate-helm-chart
istioctl-analyze -> analyze-istio

* use GITHUB_BASE_REF env var (#254)

* Specify how function config should be documented

* Update README.md

* fix: upgrade typescript from 4.2.3 to 4.2.4 (#259)

Snyk has created this PR to upgrade typescript from 4.2.3 to 4.2.4.

See this package in npm:
https://www.npmjs.com/package/typescript

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* add usage doc for kubeval (#257)

* add usage doc for kubeval

* update usage doc

* update usage doc

* update usage doc

* update usage doc

* Fix search-replace image typo (#262)

* update metadata and README file for set-annotations

Co-authored-by: phani <[email protected]>
Co-authored-by: John Belamaric <[email protected]>
Co-authored-by: Frank Farzan <[email protected]>
Co-authored-by: Frank Farzan <[email protected]>
Co-authored-by: Max Smythe <[email protected]>
Co-authored-by: Prachi Pendse <[email protected]>
Co-authored-by: Snyk bot <[email protected]>
Co-authored-by: Sunil Arora <[email protected]>
Co-authored-by: Donny Xia <[email protected]>
Co-authored-by: etefera <[email protected]>
  • Loading branch information
11 people authored May 1, 2021
1 parent c7cd59d commit 86ec57f
Show file tree
Hide file tree
Showing 293 changed files with 100,969 additions and 1,025 deletions.
30 changes: 27 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ on:
pull_request:
branches:
- master
- '*/v[0-9]+.[0-9]+'
schedule:
- cron: '0 17 * * *'

Expand Down Expand Up @@ -49,9 +50,8 @@ jobs:
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- name: Set up Go 1.15
uses: actions/setup-go@v1
uses: actions/setup-go@v2
with:
go-version: 1.15
id: go
Expand All @@ -67,8 +67,32 @@ jobs:
cd functions/go
make check-licenses
verify-ci:
runs-on: ubuntu-latest
env:
GOPATH: /home/runner/work/kpt-functions-catalog/functions/go
GO111MODULE: on
steps:
- uses: actions/checkout@v2
- name: Set up python 3
uses: actions/setup-python@v2
- name: Install libs
run: |
pip install pyyaml
- name: Set up Go 1.15
uses: actions/setup-go@v2
with:
go-version: 1.15
- name: Install mdrip
run: |
go get github.com/russross/blackfriday/[email protected]
go get github.com/monopole/[email protected]
- name: Verify docs
run: |
make verify-docs
e2e-ci:
needs: [ts-unit-test-ci, go-unit-test-ci]
needs: [ts-unit-test-ci, go-unit-test-ci, verify-ci]
strategy:
matrix:
platform: [ubuntu-latest]
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ node_modules
.DS_Store
.nyc_output
bin/
__pycache__

# We use sed -i.bak when doing in-line replace, because it works better cross-platform
*.bak
9 changes: 9 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ check-licenses:
cd functions/go && $(MAKE) check-licenses
cd functions/contrib/ts && $(MAKE) check-licenses

verify-docs:
GO111MODULE=on go get github.com/monopole/mdrip
scripts/verify-docs.py

build: ## Build all function images. Variable 'TAG' is used to specify tag. 'dev' will be used if not set.
cd functions/go && $(MAKE) TAG=$(TAG) build
cd functions/ts && $(MAKE) TAG=$(TAG) build
Expand All @@ -49,3 +53,8 @@ push: ## Push images to registry. WARN: This operation should only be done in CI
cd functions/go && $(MAKE) push
cd functions/ts && $(MAKE) push
cd functions/contrib/ts && $(MAKE) push

site-generate: ## Collect function branches and generate a catalog of their examples and documentation using kpt next.
rm -rf ./examples/*/
# GO111MODULE=on go get -v github.com/GoogleContainerTools/kpt@next
(cd scripts/generate_catalog/ && go run . ../.. ../../examples)
19 changes: 10 additions & 9 deletions examples/apply-setters/simple/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# apply-setters: Simple Example

Setters provide a solution for template-free setting of field values. The
Setters provide a solution for template-free setting of field values. The
`apply-setters` KRM config function applies setter values to resource fields
with setter references.

Expand All @@ -19,8 +19,8 @@ kind: MyKind
metadata:
name: ns
environments: # kpt-set: ${env}
- dev
- stage
- dev
- stage
```
We use ConfigMap to configure the `apply-setters` function. The desired
Expand All @@ -32,15 +32,15 @@ desired value for the tagged field.
apiVersion: v1
kind: ConfigMap
metadata:
...
name: apply-setters-fn-config
data:
name: my-new-map
env: |
- prod
- stage
```

Invoking `apply-setters` function would apply the changes to resource configs
Invoking `apply-setters` function would apply the changes to resource configs

```yaml
apiVersion: v1
Expand All @@ -55,16 +55,17 @@ kind: MyKind
metadata:
name: ns
environments: # kpt-set: ${env}
- prod
- stage
- prod
- stage
```

## Function invocation

Get the config example and try it out by running the following commands:

<!-- @getAndRunPkg @test -->
```sh
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/mutators/apply-setters/simple .
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/apply-setters/simple .
kpt fn run simple
```

Expand All @@ -74,5 +75,5 @@ Check the value of setter `name` is set to `my-new-map`.
Check the value of setter `env` is set to array value `[prod, stage]`.

```sh
kpt cfg cat simple
$ kpt cfg cat simple/
```
3 changes: 2 additions & 1 deletion examples/apply-setters/simple/fn-config.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: my-func-config
name: apply-setters-fn-config
# TODO:(pmarupaka) remove annotations when e2e tests switch to kpt v1 binary
annotations:
config.k8s.io/function: |
container:
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
# Istioctl Analyze
# analyze-istio

The `istioctl-analyze` KRM config function detects potential issues with your
The `analyze-istio` KRM config function detects potential issues with your
Istio configuration and outputs structured results detailing any errors found
during analysis. This example invokes the istioctl-analyze function using
during analysis. This example invokes the `analyze-istio` function using
declarative configuration.

## Function Invocation

Get this example and try it out by running the following commands:

```sh
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/istioctl-analyze .
kpt fn run istioctl-analyze
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/contrib/analyze-istio .
kpt fn run analyze-istio
```

## Expected Results
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ metadata:
annotations:
config.k8s.io/function: |
container:
image: gcr.io/kpt-fn-contrib/istioctl-analyze:unstable
image: gcr.io/kpt-fn-contrib/analyze-istio:unstable
config.kubernetes.io/local-config: 'true'
data:
'--use-kube': 'false'
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# Helm Template
# inflate-helm-chart

The `helm-inflator` KRM config function generates a new kpt package from a
local Helm chart. This example invokes the helm inflator function using
The `inflate-helm-chart` KRM config function generates a new kpt package from a
local Helm chart. This example invokes the `inflate-helm-chart` function using
declarative configuration.

## Function invocation

Get this example and try it out by running the following commands:

```sh
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/helm-inflator .
kpt fn run --as-current-user helm-inflator/local-configs --mount type=bind,src=$(pwd)/helm-inflator/helloworld-chart,dst=/source
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/contrib/inflate-helm-chart .
kpt fn run --as-current-user inflate-helm-chart/local-configs --mount type=bind,src=$(pwd)/inflate-helm-chart/helloworld-chart,dst=/source
```

## Expected result

Checking the contents of the `local-configs` directory with `kpt cfg tree helm-inflator/local-configs/` should reveal the following new yaml files:
Checking the contents of the `local-configs` directory with `kpt cfg tree inflate-helm-chart/local-configs/` should reveal the following new yaml files:

```sh
helm-inflator/local-configs
inflate-helm-chart/local-configs
├── [deployment_chart-helloworld-chart.yaml] Deployment chart-helloworld-chart
├── [fn-config.yaml] ConfigMap my-func-config
├── [pod_chart-helloworld-chart-test-connection.yaml] Pod chart-helloworld-chart-test-connection
Expand All @@ -29,7 +29,7 @@ helm-inflator/local-configs
To view changes without writing them into a file, a dry run can be performed as follows:

```sh
kpt fn run --as-current-user helm-inflator/local-configs --mount type=bind,src=$(pwd)/helm-inflator/helloworld-chart,dst=/source --dry-run
kpt fn run --as-current-user inflate-helm-chart/local-configs --mount type=bind,src=$(pwd)/inflate-helm-chart/helloworld-chart,dst=/source --dry-run
```

The expected output should match the following:
Expand Down Expand Up @@ -88,7 +88,7 @@ metadata:
annotations:
config.kubernetes.io/function: |
container:
image: gcr.io/kpt-fn-contrib/helm-inflator
image: gcr.io/kpt-fn-contrib/inflate-helm-chart
config.kubernetes.io/path: fn-config.yaml
data:
name: chart
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ metadata:
annotations:
config.kubernetes.io/function: |
container:
image: gcr.io/kpt-fn-contrib/helm-inflator:unstable
image: gcr.io/kpt-fn-contrib/inflate-helm-chart:unstable
data:
name: chart
local-chart-path: /source
2 changes: 1 addition & 1 deletion examples/contrib/sops/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ Get this example and try it out by running the following commands:

```sh
# download sops kpt-function example
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/sops .
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/contrib/sops .
# copy example key from sops project
curl -fsSL -o sops/key.asc https://raw.githubusercontent.com/mozilla/sops/master/pgp/sops_functional_tests_key.asc
# run the function
Expand Down
27 changes: 0 additions & 27 deletions examples/contrib/suggest-psp/README.md

This file was deleted.

16 changes: 0 additions & 16 deletions examples/contrib/suggest-psp/resources.yaml

This file was deleted.

File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gatekeeper-validate: invalid configmap
# enforce-gatekeeper: invalid configmap

## Overview

Expand All @@ -12,8 +12,9 @@ The constraint disallows using `private_key` as a key in the ConfigMap.

Get the package:

<!-- @getPkg @test -->
```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/validators/gatekeeper-validate/invalid-configmap .
$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/enforce-gatekeeper/invalid-configmap .
```

Create a directory for storing the structured output.
Expand Down Expand Up @@ -71,4 +72,4 @@ Rerun the command. It will succeed (no output).
## Function Reference Doc

TODO: replace the following with the link to the reference doc when our site is live.
https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/go/gatekeeper-validate/README.md
https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/go/enforce-gatekeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
annotations:
config.k8s.io/function: |
container:
image: gcr.io/kpt-fn/gatekeeper-validate:unstable
image: gcr.io/kpt-fn/enforce-gatekeeper:unstable
config.kubernetes.io/local-config: 'true'
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# gatekeeper-validate: warning only
# enforce-gatekeeper: warning only

## Overview

Expand All @@ -12,8 +12,9 @@ In the constraint, we use `enforcementAction: warn` instead of

Get the package:

<!-- @getPkg @test -->
```shell
$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/validators/gatekeeper-validate/warnning-only .
$ kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/examples/enforce-gatekeeper/warning-only .
```

Create a directory for storing the structured output.
Expand Down Expand Up @@ -65,4 +66,4 @@ Rerun the command. It will no longer have the warning.
## Function Reference Doc

TODO: replace the following with the link to the reference doc when our site is live.
https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/go/gatekeeper-validate/README.md
https://github.com/GoogleContainerTools/kpt-functions-catalog/blob/master/functions/go/enforce-gatekeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,5 @@ metadata:
annotations:
config.k8s.io/function: |
container:
image: gcr.io/kpt-fn/gatekeeper-validate:unstable
image: gcr.io/kpt-fn/enforce-gatekeeper:unstable
config.kubernetes.io/local-config: 'true'
Loading

0 comments on commit 86ec57f

Please sign in to comment.