Skip to content

Commit

Permalink
Merge master (#657)
Browse files Browse the repository at this point in the history
* fix: upgrade @types/jasmine from 3.7.8 to 3.8.1 (#512)

Snyk has created this PR to upgrade @types/jasmine from 3.7.8 to 3.8.1.

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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* Update the release script (#513)

Add support for longer format that matches the path,
so that it works with go get.
It can handle both the short and long format.

* update contributing guide (#517)

* update contributing guide

* address comments

* check in generated doc so that they are go get-able (#519)

* Add support for GCP-tagged functions. (#520)

* Add set-project-id function. (#518)

* Add set-project-id function.

* Addressed comments.

* Update go functions Makefile.

* Add processing of Kptfiles in sub-packages.

* Seatch for Kptfile by kind.

* Update set-project-id-simple example.

* Fix golangci-lint error.

* Add advanced example with sub-package.

* Update test diffs.

Co-authored-by: Andrey Udovenko <andu@google.com>

* Swith to the Kptfile v1 types in the SDK repo (#521)

* build(deps): bump path-parse in /functions/contrib/ts/analyze-istio (#525)

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump path-parse in /functions/contrib/ts/sops (#524)

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump path-parse in /functions/ts/kubeval (#523)

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump path-parse in /functions/contrib/ts/inflate-helm-chart (#522)

Bumps [path-parse](https://github.com/jbgutierrez/path-parse) from 1.0.6 to 1.0.7.
- [Release notes](https://github.com/jbgutierrez/path-parse/releases)
- [Commits](https://github.com/jbgutierrez/path-parse/commits/v1.0.7)

---
updated-dependencies:
- dependency-name: path-parse
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* docs: check in generated doc fo set-project-id (#530)

* fork helm inflation code from kustomize (#535)

* Add globbing logic for contributed functions. (#534)

* Add support for GCP-tagged functions.

* Add globbing logic for contrib functions.

* fix: upgrade @types/jasmine from 3.7.6 to 3.8.1 (#536)

Snyk has created this PR to upgrade @types/jasmine from 3.7.6 to 3.8.1.

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: avoid roundtriping when passing objects to starlark fn (#537)

* helm chart inflator function in go (#516)

* remove helm inflator plugin unit tests (#539)

* Merge gob branch with master before collecting functions. (#540)

* Add gob merging to site creation.

* Add gob merging to site checking.

* Update checkSite.yml

* Update firebase-hosting-merge.yml

* fix: upgrade @types/node from 14.14.36 to 14.17.6 (#541)

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

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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* e2e tests and examples for inflate helm chart (#544)

* e2e tests for inflate helm chart

* test for remote values file

* skip crds test

* code review

* different chart for remote values file test

* add inline values example to readme

* rename inflate-helm-chart to render-helm-chart

* move kustomize example out of function readme

* fix ci failure

* code review

* run make generate

* suggested changes

* more code review

* Do not error for empty matches (#546)

* fix: upgrade @types/jasmine from 3.8.1 to 3.8.2 (#543)

Snyk has created this PR to upgrade @types/jasmine from 3.8.1 to 3.8.2.

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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/node from 14.17.3 to 14.17.6 (#545)

Snyk has created this PR to upgrade @types/node from 14.17.3 to 14.17.6.

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/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/node from 14.17.3 to 14.17.9 (#551)

Snyk has created this PR to upgrade @types/node from 14.17.3 to 14.17.9.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix(list-setters): do not error for empty setters (#555)

* fix(list-setters): do not error for no setters

* removed failed from error message

* Make SOPS work with keys from parameters and function input (#533)

Function input parameters can be taken from
ConfigMap and Secret matching jsonpath expression.

Added test for kpt v1

* fix: upgrade @types/node from 14.14.21 to 14.17.9 (#557)

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

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/39fced9f-be52-4f85-898b-0a0434cb8a0f?utm_source=github&utm_medium=upgrade-pr

* Add instructions of how to easily update expected (#528)

* Add instructions of how to easily update expected

* Add when to update diff

* fix: upgrade @types/node from 14.17.6 to 14.17.9 (#558)

Snyk has created this PR to upgrade @types/node from 14.17.6 to 14.17.9.

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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* Update apply-setters from v0.1 to v0.2 (#550)

* Update apply-setters from v0.1 to v0.2

* Update apply-setters version everywhere

* Address code-review comment

See https://github.com/GoogleContainerTools/kpt-functions-catalog/pull/550/files/9e34d68f4927b0be741535920856c588d0f786f2#r698810143

* Address code-review comment

See #550 (comment)

* Disable checkSite check in CI (#560)

* verify-docs skips Kptfile when the type is eval (#561)

* fix: upgrade @types/node from 14.17.6 to 14.17.9 (#562)

Snyk has created this PR to upgrade @types/node from 14.17.6 to 14.17.9.

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/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* Updated SOPS README with kpt v1 examples (#564)

* fix kustomize helm inflator CI failure (#567)

* This adds the remove-local-config-resources function to the catalog (#553)

* This adds the remove-annotated-resources function to the catalog

* This adds the metadata.yaml file to the package

* This adds a simple example for the function and fixes the docker version

* This adds the configs for the simple example

* This adds the auto-generated docs

* Renamed the function and added unit tests along with results

* Fixes the function name in the go makefile

* Added multiple results and minor formatting changes

* Adds filepath to the results and addresses comments on documentation

* Adds lowercase logic to annotation comparison and some doc fixes

* Removed the custom Result struct

Co-authored-by: Awais Malik <awmalik@google.com>

* remove old inflate-helm-chart function (#569)

* Add annotate-apply-time-mutations function (#556)

* Add annotate-mutations fn

* Fixed doc

* Test cleanup

* Fix sample readme

* Add build line

* Fix ci errors

* Review changes

* Rename annotate-apply-time-mutations, refactor

* Continue rename updates

* Further refactor

* Update tests

* Presubmit fixes

* Review comment

* Formatting

* Fix sample test diff

* e2e fix

* Relocate function to contrib

* Update readme to new gcr

* update pkg path

* More path fix

* makefile fix

* add Makefile for contrib/go

* update root-level Makefile

* Review comments

* go mod up

* readme fix

* readme fix

Co-authored-by: Michael Thacker <thackem@google.com>
Co-authored-by: Mengqi Yu <mengqiy@google.com>

* document how subjects works with set-namespace (#566)

* use the right path for contrib to install license checker (#571)

* support loading starlib in starlark fn (#570)

* fix: upgrade @types/node from 14.17.9 to 14.17.10 (#573)

Snyk has created this PR to upgrade @types/node from 14.17.9 to 14.17.10.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* enable some non-standard features in starlark (#572)

Enabled set, global reassign, recursion

* This adds the generate-folders function to the kpt catalog (#574)

* This adds the generate-folders function to the kpt catalog

* Adds sourceURL to metadata.yaml

* Added the generator tag to metadata.yaml

Co-authored-by: Awais Malik <awmalik@google.com>

* fix: upgrade @types/node from 14.17.9 to 14.17.10 (#575)

Snyk has created this PR to upgrade @types/node from 14.17.9 to 14.17.10.

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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/node from 14.17.9 to 14.17.10 (#576)

Snyk has created this PR to upgrade @types/node from 14.17.9 to 14.17.10.

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/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.7.0 to 3.9.0 (#577)

Snyk has created this PR to upgrade jasmine from 3.7.0 to 3.9.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/node from 14.17.10 to 14.17.11 (#578)

Snyk has created this PR to upgrade @types/node from 14.17.10 to 14.17.11.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.7.0 to 3.9.0 (#579)

Snyk has created this PR to upgrade jasmine from 3.7.0 to 3.9.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

* fix: upgrade @types/node from 14.17.10 to 14.17.11 (#580)

Snyk has created this PR to upgrade @types/node from 14.17.10 to 14.17.11.

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/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.8.0 to 3.9.0 (#582)

Snyk has created this PR to upgrade jasmine from 3.8.0 to 3.9.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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/node from 14.17.5 to 14.17.11 (#581)

Snyk has created this PR to upgrade @types/node from 14.17.5 to 14.17.11.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade js-yaml from 4.0.0 to 4.1.0 (#583)

Snyk has created this PR to upgrade js-yaml from 4.0.0 to 4.1.0.

See this package in npm:
https://www.npmjs.com/package/js-yaml

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=upgrade-pr

Co-authored-by: Mengqi Yu <mengqiy@google.com>

* fix: upgrade typescript from 4.3.5 to 4.4.2 (#588)

Snyk has created this PR to upgrade typescript from 4.3.5 to 4.4.2.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade jasmine from 3.7.0 to 3.9.0 (#585)

Snyk has created this PR to upgrade jasmine from 3.7.0 to 3.9.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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/node from 14.17.11 to 14.17.12 (#584)

Snyk has created this PR to upgrade @types/node from 14.17.11 to 14.17.12.

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/206705c7-640c-491f-9f5b-bcb93537444e?utm_source=github&utm_medium=upgrade-pr

* Typo fix in set-project-id (#587)

* fix: upgrade typescript from 4.3.5 to 4.4.2 (#590)

Snyk has created this PR to upgrade typescript from 4.3.5 to 4.4.2.

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/node from 14.17.10 to 14.17.12 (#591)

Snyk has created this PR to upgrade @types/node from 14.17.10 to 14.17.12.

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/1c244995-4ad9-4dc6-92a2-3cb1306dd559?utm_source=github&utm_medium=upgrade-pr

* Support contrib fn catalog (#594)

* Support contrib fn catalog

* update contributor guide

* update the site generation script (#595)

* remove some docker artifacts that are accidentally checked in (#589)

* fix: upgrade @types/node from 14.17.11 to 14.17.12 (#593)

Snyk has created this PR to upgrade @types/node from 14.17.11 to 14.17.12.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=upgrade-pr

* ci: re-enable checkSite CI (#596)

* re-enable checkSite CI

* fix comments

* chore: don't skip sops/v0.3 branch (#598)

* fix: upgrade @types/node from 14.17.11 to 14.17.13 (#599)

Snyk has created this PR to upgrade @types/node from 14.17.11 to 14.17.13.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=upgrade-pr

* fix: upgrade @types/jasmine from 3.8.1 to 3.9.0 (#602)

Snyk has created this PR to upgrade @types/jasmine from 3.8.1 to 3.9.0.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* update sidebar (#601)

* update sidebar

* Don't repeat

* fix: upgrade @types/jasmine from 3.8.1 to 3.9.0 (#603)

Snyk has created this PR to upgrade @types/jasmine from 3.8.1 to 3.9.0.

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=referral&page=upgrade-pr

* feat: Project Service List local CRD function (#568)

* feat: add project services

* add main and docs

* add simple test

* additional test

* remove unused const

* bump deps

* use default test runner configs

* readme feedback

* rename to enable-gcp-services

* regen

* switch to GCP project svc, clarify test

* fix newline

* fix newlines

* switch to implicit fn config

* add a nested pkg test

* remove explicit fn config from examples

* ignore local config anno

* update docs

* validate local config

* fix missing local config

* extract structs, use ResultItems

* simplify readme

* add an explicit service in test to be pruned

* update readme

* add test for prune with multiple ProjectServiceList

* user validation for expected results

* recreate result

* standardize blueprints CR ownership

* rename to ProjectServiceSet

* update e2e

* regen e2e expected

* move test to example

* regen docs

* fix example name

* sort result items

* readme updates

* force set LocalConfigAnnotation

* fix: upgrade @types/node from 14.17.13 to 14.17.15 (#606)

Snyk has created this PR to upgrade @types/node from 14.17.13 to 14.17.15.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade @types/node from 14.17.12 to 14.17.15 (#607)

Snyk has created this PR to upgrade @types/node from 14.17.12 to 14.17.15.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* Pin docsify-themeable to 0.8.4 (#604)

* fix: stop printing error message twice (#609)

* fix: handle non-trivial apiVersion correctly (#608)

* fix: upgrade @types/jasmine from 3.9.0 to 3.9.1 (#613)

Snyk has created this PR to upgrade @types/jasmine from 3.9.0 to 3.9.1.

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=referral&page=upgrade-pr

* fix: upgrade @types/node from 14.17.15 to 14.17.16 (#614)

Snyk has created this PR to upgrade @types/node from 14.17.15 to 14.17.16.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade prettier from 2.3.2 to 2.4.0 (#611)

Snyk has created this PR to upgrade prettier from 2.3.2 to 2.4.0.

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

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

* fix: upgrade typescript from 4.4.2 to 4.4.3 (#612)

Snyk has created this PR to upgrade typescript from 4.4.2 to 4.4.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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* Update kubeval (#619)

* update README and add an example

* add json schema

* describe the use case

* fix: upgrade @types/jasmine from 3.9.0 to 3.9.1 (#618)

Snyk has created this PR to upgrade @types/jasmine from 3.9.0 to 3.9.1.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade @types/node from 14.17.15 to 14.17.18 (#616)

Snyk has created this PR to upgrade @types/node from 14.17.15 to 14.17.18.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade prettier from 2.4.0 to 2.4.1 (#617)

Snyk has created this PR to upgrade prettier from 2.4.0 to 2.4.1.

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

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

* fix: upgrade @types/node from 14.17.16 to 14.17.18 (#621)

Snyk has created this PR to upgrade @types/node from 14.17.16 to 14.17.18.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade @types/node from 14.17.18 to 14.17.20 (#626)

Snyk has created this PR to upgrade @types/node from 14.17.18 to 14.17.20.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade @types/node from 14.17.20 to 14.17.21 (#628)

Snyk has created this PR to upgrade @types/node from 14.17.20 to 14.17.21.

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/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade kpt-functions from 0.15.0 to 0.15.1 (#632)

Snyk has created this PR to upgrade kpt-functions from 0.15.0 to 0.15.1.

See this package in npm:
https://www.npmjs.com/package/kpt-functions

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* fix: upgrade @types/node from 14.17.18 to 14.17.21 (#630)

Snyk has created this PR to upgrade @types/node from 14.17.18 to 14.17.21.

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/5ee802a9-8df2-4243-be28-e1da63426b99?utm_source=github&utm_medium=referral&page=upgrade-pr

* feat:adds set-enforcement-action function for policy constraints (#625)

* feat:adds set-enforcement-action function for policy constraints

* minor code changes and a comment for warn

* removed setters in example resources

* fixed diffpatch

* readme changes and warn constants addition

Co-authored-by: Awais Malik <awmalik@google.com>

* fix: upgrade kpt-functions from 0.15.0 to 0.15.1 (#633)

Snyk has created this PR to upgrade kpt-functions from 0.15.0 to 0.15.1.

See this package in npm:
https://www.npmjs.com/package/kpt-functions

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

* temporarily use kpt beta7 in e2e test (#643)

* disable checkSite CI (#631)

* Upsert resource improvements (#640)

* Upsert resource improvements

* Update docs and examples

* UpdateMetaData

* Fix checks

* Update example names

* Suggested changes

* Suggested changes

* Update tests

* Suggested changes

* Remove typo

* Skip test

* bump dep for functions that are affected by the annotation changes (#644)

* upgrade dep for affected functions

* use kpt from HEAD for testing

* build(deps): bump validator in /contrib/functions/ts/analyze-istio (#636)

Bumps [validator](https://github.com/validatorjs/validator.js) from 13.6.0 to 13.7.0.
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](validatorjs/validator.js@13.6.0...13.7.0)

---
updated-dependencies:
- dependency-name: validator
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* build(deps): bump validator in /functions/ts/kubeval (#635)

Bumps [validator](https://github.com/validatorjs/validator.js) from 13.6.0 to 13.7.0.
- [Release notes](https://github.com/validatorjs/validator.js/releases)
- [Changelog](https://github.com/validatorjs/validator.js/blob/master/CHANGELOG.md)
- [Commits](validatorjs/validator.js@13.6.0...13.7.0)

---
updated-dependencies:
- dependency-name: validator
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* fix: upgrade prettier from 2.3.2 to 2.4.1 (#648)

Snyk has created this PR to upgrade prettier from 2.3.2 to 2.4.1.

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

See this project in Snyk:
https://app.snyk.io/org/kpt-fn-bot/project/9c679165-80dd-42cc-8c50-3ff4a52ffea9?utm_source=github&utm_medium=referral&page=upgrade-pr

* upgrade generate-folders and sops to kpt-functions:v0.16.1 (#653)

* upgrade fn enable-gcp-services to use latest kyaml (#654)

* add support for ConstraintTemplate v1 (#649)

* add support for ConstraintTemplate v1

* use versionless interface

Co-authored-by: Snyk bot <snyk-bot@snyk.io>
Co-authored-by: etefera <31711490+etefera@users.noreply.github.com>
Co-authored-by: Andrey Udovenko <andu.nsk@gmail.com>
Co-authored-by: Andrey Udovenko <andu@google.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Natasha Sarkar <natashasarkar@google.com>
Co-authored-by: phani <phanitejamarupaka@gmail.com>
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com>
Co-authored-by: Alexey Odinokov <alexey.odinokov.82@gmail.com>
Co-authored-by: adamdoes <88112692+adamdoes@users.noreply.github.com>
Co-authored-by: Awais Malik <malik.awais@gmail.com>
Co-authored-by: Awais Malik <awmalik@google.com>
Co-authored-by: Michael <38145789+thackem@users.noreply.github.com>
Co-authored-by: Michael Thacker <thackem@google.com>
Co-authored-by: Ben Congdon <bencongdon96@gmail.com>
  • Loading branch information
16 people committed Nov 22, 2021
1 parent e975da1 commit 48a2948
Show file tree
Hide file tree
Showing 1,106 changed files with 581,908 additions and 35,411 deletions.
13 changes: 13 additions & 0 deletions .github/hooks/pre-commit
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash

echo "Updating docs..."
make generate;
diff=`git diff`

if [[ $diff != "" ]];
then
echo "Found unstaged changes [$diff]. Make sure to run `make generate` for updating the docs before you commit the changes."
exit 1
else
exit 0
fi
25 changes: 25 additions & 0 deletions .github/workflows/check-doc-sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
# Copyright 2021 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

name: Check Documentation Synchronized
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
./.github/hooks/pre-commit
62 changes: 32 additions & 30 deletions .github/workflows/checkSite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,33 +12,35 @@
# See the License for the specific language governing permissions and
# limitations under the License.

name: CheckSite
on:
pull_request:
paths:
- "functions/**"
- "examples/**"
- "site/**"
- "scripts/generate_catalog/**"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/checkout@v2
with:
repository: etefera/href-checker
ref: docsify
path: href-checker
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: Install Site Checker
run: yarn install
working-directory: href-checker
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Run Site Checker
run: make site-check
# name: CheckSite
# on:
# pull_request:
# paths:
# - "functions/**"
# - "examples/**"
# - "site/**"
# - "scripts/generate_catalog/**"
# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# with:
# fetch-depth: 0
# - name: Merge gob branch
# run: git worktree add ./gob gob && cp -r gob/* .
# - uses: actions/checkout@v2
# with:
# repository: etefera/href-checker
# ref: docsify
# path: href-checker
# - uses: actions/setup-node@v2
# with:
# node-version: '16'
# - name: Install Site Checker
# run: yarn install
# working-directory: href-checker
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v1
# - name: Run Site Checker
# run: make site-check
6 changes: 6 additions & 0 deletions .github/workflows/firebase-hosting-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ name: Docs Deployment
on:
push:
branches:
- gob
- master
- "*/v[0-9]+.[0-9]+"
jobs:
Expand All @@ -14,6 +15,11 @@ jobs:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-node@v2
with:
node-version: '16'
- name: Merge gob branch
run: git worktree add ./gob gob && cp -r gob/* .
- name: Generate Site
run: make site-generate
- uses: FirebaseExtended/action-hosting-deploy@276388dd6c2cde23455b30293105cc866c22282d # v0
Expand Down
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ node_modules
.nyc_output
bin/
__pycache__

functions/go/*/generated
.docker

# We use sed -i.bak when doing in-line replace, because it works better cross-platform
*.bak
100 changes: 89 additions & 11 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,10 @@ Contributions are required to follow these style guides:
### Repo Layout

```shell
├── examples: Home for all function examples
│ ├── contrib: Home for all contrib function examples
├── examples: Home for all curated function examples
│ ├── curated_function_bar_example
│ └── curated_function_foo_example
├── functions
│ ├── contrib: Home for all contrib function source code
│ │ └── ts: Home for all typescript-based contrib function source code
│ │ ├── Makefile
│ │ └── contrib_ts_function_foo
│ ├── go: Home for all golang-based curated function source code
│ │ ├── Makefile
│ │ ├── curated_go_function_bar
Expand All @@ -55,15 +50,20 @@ Contributions are required to follow these style guides:
│ ├── Makefile
│ ├── curated_ts_function_bar
│ └── curated_ts_function_foo
├── contrib
│ ├── functions
│ │ ├── go: Home for all golang-based contrib function source code
│ │ └── ts: Home for all typescript-based contrib function source code
│ └── examples: Home for all contrib function examples.
├── scripts
└── tests: Home for e2e tests
```

For each function, its files spread in the follow places:

- `functions/` directory: Each function must have its own directory in one
of `functions/` sub-directory. In each function's directory, it must have
the following:
of `functions/` sub-directory. In each function's directory, it must have the
following:
- Source code (and unit tests).
- A README.md file serving as the usage doc and will be shown in
the [catalog website].
Expand All @@ -77,14 +77,87 @@ For each function, its files spread in the follow places:
should follow the [template][example-template].
- The `tests/` directory contains additional e2e tests.

### E2E Tests
For golang-based functions, you need to generate some doc related variables from
the `README.md` by running

```shell
$ cd functions/go
$ make generate
```

### Tests

#### Unit Tests

To run all unit tests

```shell
$ make unit-test
```

#### E2E Tests

The e2e tests are the recommended way to test functions in the catalog. They are
very easy to write and set up with our [e2e test harness].
very easy to write and set up with our e2e test harness. You can find all the
supported options and expected test directory
structure [here][e2e test harness doc].

You can choose to put the e2e test in either the `examples/` directory or in the
`tests/` directory depending on if it is worthwhile to be shown as an example.

To test a specific example or the e2e test, run

```shell
$ cd tests/e2etest
$ go test -v ./... -run TestE2E/../../examples/$EXAMPLE_NAME
```

If you encounter some test failure saying something like "actual diff doesn't
match expected" or "actual results doesn't match expected", you can update the
expected `diff.patch` or `results.yaml` by running the following commands:

```shell
# Update one example
$ KPT_E2E_UPDATE_EXPECTED=true go test -v ./... -run TestE2E/../../examples/$EXAMPLE_NAME

# Update all examples
$ KPT_E2E_UPDATE_EXPECTED=true go test -v ./...
```


Most contributors don't need this, but if you happen to need to test all
examples and e2e tests, run the following command

```shell
$ make e2e-test
```

#### Doc Verifier

We have a script to ensure the usage docs and the examples are consistent.
Please ensure it's passing by running:

```shell
$ ./scripts/verify-docs.py
```

This script requires Python 3, `pyyaml` and `mdrip` which is a CLI tool.

To install `pyyaml`, run the following command:

```shell
pip install pyyaml
```

To install `mdrip`, run the following commands:

```shell
$ go get github.com/russross/blackfriday/v2@v2.0.1
$ go get github.com/monopole/mdrip@v1.0.2
```

And you need to ensure `$GOPATH/bin` is in your `PATH`.

### Change Existing Functions

You must follow the layout convention when you make changes to existing
Expand All @@ -99,6 +172,11 @@ If you fix a bug, you must add (unit or e2e) tests to cover that.

You must follow the layout convention when you contribute new functions.

You need to add new function name to the respective language Makefiles.

- `functions/go/Makefile` for golang.
- `functions/ts/Makefile` for typescript.

## Contact Us

Do you need a review or release of functions? We’d love to hear from you!
Expand All @@ -112,7 +190,7 @@ Do you need a review or release of functions? We’d love to hear from you!

[catalog website]: https://catalog.kpt.dev/

[e2e test harness]: https://pkg.go.dev/github.com/GoogleContainerTools/kpt@v1.0.0-beta.2/pkg/test/runner
[e2e test harness doc]: https://github.com/GoogleContainerTools/kpt/blob/main/pkg/test/runner/README.md

[golang-template]: https://raw.githubusercontent.com/GoogleContainerTools/kpt-functions-catalog/master/functions/go/_template/README.md

Expand Down
14 changes: 9 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,11 @@ unit-test: unit-test-go unit-test-ts ## Run unit tests for all functions

unit-test-go: ## Run unit tests for Go functions
cd functions/go && $(MAKE) test
cd contrib/functions/go && $(MAKE) test

unit-test-ts: ## Run unit tests for TS functions
cd functions/ts && $(MAKE) test
cd functions/contrib/ts && $(MAKE) test
cd contrib/functions/ts && $(MAKE) test

e2e-test: ## Run all e2e tests
cd tests && $(MAKE) TAG=$(TAG) test
Expand All @@ -38,7 +39,8 @@ test: unit-test e2e-test ## Run all unit tests and e2e tests
check-licenses:
cd functions/ts && $(MAKE) check-licenses
cd functions/go && $(MAKE) check-licenses
cd functions/contrib/ts && $(MAKE) check-licenses
cd contrib/functions/go && $(MAKE) check-licenses
cd contrib/functions/ts && $(MAKE) check-licenses

verify-docs:
GO111MODULE=on go get github.com/monopole/mdrip
Expand All @@ -47,15 +49,17 @@ verify-docs:
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
cd functions/contrib/ts && $(MAKE) TAG=$(TAG) build
cd contrib/functions/go && $(MAKE) TAG=$(TAG) build
cd contrib/functions/ts && $(MAKE) TAG=$(TAG) build

push: ## Push images to registry. WARN: This operation should only be done in CI environment.
cd functions/go && $(MAKE) push
cd functions/ts && $(MAKE) push
cd functions/contrib/ts && $(MAKE) push
cd contrib/functions/go && $(MAKE) push
cd contrib/functions/ts && $(MAKE) push

site-generate: ## Collect function branches and generate a catalog of their examples and documentation using kpt next.
rm -rf ./site/*/
rm -rf ./site/*/ && mkdir site/contrib
(cd scripts/generate_catalog/ && go run . ../.. ../../site)

site-run: ## Run the site locally.
Expand Down
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,17 +1,24 @@
# analyze-istio
# analyze-istio: Simple Example

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 `analyze-istio` function using
declarative configuration.

### Fetch the example package

Get the example package by running the following commands:

```shell
kpt pkg get https://github.com/GoogleContainerTools/kpt-functions-catalog.git/contrib/examples/analyze-istio-simple
```

### Function Invocation

Get this example and try it out by running the following commands:
Invoke the function with the following command:

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

### Expected Results
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
testType: eval
image: gcr.io/kpt-fn-contrib/annotate-apply-time-mutations:unstable
Loading

0 comments on commit 48a2948

Please sign in to comment.