Skip to content

Commit 7b8e0bd

Browse files
yuwenmabharathkkbg-awmalikdependabot[bot]zyy98
authored
Sync render-helm-chart/v0.2 with the latest changes in master (#1026)
Co-authored-by: Bharath KKB <bharathkrishnakb@gmail.com> Co-authored-by: Awais Malik <awmalik@google.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: g-awmalik <malik.awais@gmail.com> Co-authored-by: zyy98 <45323482+zyy98@users.noreply.github.com> Co-authored-by: Natasha Sarkar <natashasarkar@google.com> Co-authored-by: Snyk bot <snyk-bot@snyk.io> Co-authored-by: Mengqi Yu <mengqiy@google.com> Co-authored-by: Justin Santa Barbara <justinsb@google.com> Co-authored-by: Wietse Muizelaar <wietse@wietsemuizelaar.nl> Co-authored-by: Christopher Fry <ChristopherFry2008@gmail.com> Co-authored-by: sdowell <sdowell@google.com> Co-authored-by: Anthony Poschen <2253299+AnthonyPoschen@users.noreply.github.com> Co-authored-by: Christopher Fry <christopherfry@google.com> Co-authored-by: Andrew Peabody <andrewpeabody@google.com> Co-authored-by: Morten Torkildsen <mortent@google.com> Co-authored-by: wvl <nlwilliam@icloud.com> fix:adds log-sink writer id to the export-terraform fn (#884) fix: upgrade prettier from 2.6.0 to 2.7.1 (#896) fix: upgrade @types/jasmine from 3.10.5 to 3.10.6 (#897) fix: upgrade typescript from 4.5.2 to 4.7.4 (#894) fix: upgrade prettier from 2.6.1 to 2.7.1 (#900) fix a git ref conflict caused by HEAD hard reset (#860) Fix some incorrect/duplicate go.mod paths (#920) fix function (#925) Fix several issues on `set-labels` (#928) fix error message (#932) fix: GitHub Action deprecates Node.js 12 (#940) fix: Revert the Gob cleanup for `preview-hierarchy` function (#942) fix fn (#945) fix: make 'gcloud' as optional in Makefile for ko push (#947) fix: Add ko installation in Makefile (#948) fix: guarantee ko installation in fn Makefile (#950) fix: guarantee ko installation in fn Makefile (#951) fix (#949) fix branch when generating the function catalog (#955) fix CLI example (#968) fix issue with parsing helm output (#1024)
1 parent d4fde00 commit 7b8e0bd

File tree

85 files changed

+599
-110
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+599
-110
lines changed

.github/hooks/pre-commit

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

33
echo "Updating docs..."
44
make generate;
5-
diff=`git diff`
5+
diff=$(git diff)
66

77
if [[ $diff != "" ]];
88
then
9-
echo "Found unstaged changes [$diff]. Make sure to run `make generate` for updating the docs before you commit the changes."
9+
echo "Found unstaged changes [$diff]. Make sure to run \`make generate\` for updating the docs before you commit the changes."
1010
exit 1
1111
else
1212
exit 0
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Run the CD script after pushes to branches
16+
on:
17+
push:
18+
branches:
19+
- "master"
20+
21+
jobs:
22+
build:
23+
name: after-push-to-branch
24+
runs-on: ubuntu-latest
25+
permissions:
26+
packages: write
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-go@v3
30+
with:
31+
go-version: '1.19.3'
32+
- run: go version
33+
- name: dev/cd/after-branch-push
34+
run: GIT_REF=${GITHUB_REF} IMAGE_REPO=ghcr.io/${{ github.repository }} dev/cd/after-push-to-branch
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Copyright 2022 Google LLC
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
name: Run the CD script after tags that look like versions
16+
on:
17+
push:
18+
tags:
19+
- "**/v[0-9]+.*"
20+
21+
jobs:
22+
build:
23+
name: after-tag-with-version
24+
runs-on: ubuntu-latest
25+
permissions:
26+
packages: write
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-go@v3
30+
with:
31+
go-version: '1.19.3'
32+
- run: go version
33+
- name: dev/cd/after-tag-push
34+
run: GIT_REF=${GITHUB_REF} IMAGE_REPO=ghcr.io/${{ github.repository }} dev/cd/after-tag-with-version
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

CODE_OF_CONDUCT.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ dispute. If you are unable to resolve the matter for any reason, or if the
6969
behavior is threatening or harassing, report it. We are dedicated to providing
7070
an environment where participants feel welcome and safe.
7171

72-
Reports should be directed to Frank Farzan frankf@google.com, the
72+
Reports should be directed to Yuwen Ma yuwenma@google.com, the
7373
Project Steward(s) for KPT Functions. It is the Project Steward’s duty to
7474
receive and address reported violations of the code of conduct. They will then
7575
work with a committee consisting of representatives from the Open Source
@@ -90,4 +90,4 @@ harassment or threats to anyone's safety, we may take action without notice.
9090

9191
This Code of Conduct is adapted from the Contributor Covenant, version 1.4,
9292
available at
93-
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html
93+
https://www.contributor-covenant.org/version/1/4/code-of-conduct.html

MAINTAINERS

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
Donny Xia <donnyxia@google.com>
2-
Eyob Tefera <extaeger@google.com>
3-
Frank Farzan <frankf@google.com>
4-
Mengqi Yu <mengqiy@google.com>
1+
Morten Torkildsen <mortent@google.com>
2+
Sunil Arora <sunilarora@google.com>
3+
Yuwen Ma <yuwenma@google.com>
4+
Natasha Sarkar <natasha41575@google.com>
5+
Justin Santa Barbara <justinsb@google.com>

dev/cd/after-push-to-branch

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
if [ -z "${GIT_REF}" ]; then
8+
echo "GIT_REF must be set"
9+
exit 1
10+
fi
11+
12+
if [[ ! "${GIT_REF}" =~ ^refs/heads/.* ]]; then
13+
echo "GIT_REF=${GIT_REF} is not of the expected format refs/heads/*"
14+
exit 1
15+
fi
16+
17+
BRANCH=${GIT_REF/refs\/heads\//}
18+
echo "BRANCH is ${BRANCH}"
19+
20+
REF=$(git rev-parse --short HEAD)
21+
echo "REF is ${REF}"
22+
23+
# We push two tags, <branchname>-latest and <branchname>-git-$GITSHA
24+
# The idea is that if you want the latest version from that branch,
25+
# you'll use the first form, if you want a particular version
26+
# you can use the second form.
27+
#
28+
# We also map main-latest to just "latest" (another reason for people to rename master -> main)
29+
BRANCH_IMAGE_TAG="${BRANCH}-latest"
30+
if [[ "${BRANCH_IMAGE_TAG}" == "main-latest" ]]; then
31+
BRANCH_IMAGE_TAG="latest"
32+
fi
33+
REF_IMAGE_TAG="${BRANCH}-git-${REF}"
34+
export IMAGE_TAG="${REF_IMAGE_TAG},${BRANCH_IMAGE_TAG}"
35+
echo "IMAGE_TAG is ${IMAGE_TAG}"
36+
37+
# We identify functions that follow this new approach by the presence of the krm-fn-metadata.yaml file.
38+
find . -type f -name "krm-fn-metadata.yaml" -print0 | while IFS= read -r -d '' f; do
39+
dir=$(dirname "${f}")
40+
echo "directory: ${dir}"
41+
pushd "${dir}"
42+
make push
43+
popd
44+
done

dev/cd/after-tag-with-version

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
#!/bin/bash
2+
3+
set -o errexit
4+
set -o nounset
5+
set -o pipefail
6+
7+
if [ -z "${GIT_REF}" ]; then
8+
echo "GIT_REF must be set"
9+
exit 1
10+
fi
11+
12+
if [[ ! "${GIT_REF}" =~ ^refs/tags/.* ]]; then
13+
echo "GIT_REF=${GIT_REF} is not of the expected format refs/tags/*"
14+
exit 1
15+
fi
16+
17+
TAG=${GIT_REF/refs\/tags\//}
18+
echo "TAG is ${TAG}"
19+
20+
VERSION=${TAG##*/}
21+
PREFIX=${TAG%/*}
22+
echo "PREFIX is ${PREFIX}, VERSION is ${VERSION}"
23+
24+
if [[ ! -d "${PREFIX}" ]]; then
25+
echo "Directory ${PREFIX} is not found"
26+
exit 1
27+
fi
28+
29+
export IMAGE_TAG=${VERSION}
30+
cd "${PREFIX}"
31+
make push

examples/apply-replacements-simple/Kptfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: kpt.dev/v1
22
kind: Kptfile
33
metadata:
44
name: example
5+
annotations:
6+
config.kubernetes.io/local-config: "true"
57
pipeline:
68
mutators:
79
- image: gcr.io/kpt-fn/apply-replacements:unstable

examples/apply-setters-simple/Kptfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: kpt.dev/v1
22
kind: Kptfile
33
metadata:
44
name: example
5+
annotations:
6+
config.kubernetes.io/local-config: "true"
57
pipeline:
68
mutators:
79
- image: gcr.io/kpt-fn/apply-setters:unstable

examples/create-setters-simple/Kptfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ apiVersion: kpt.dev/v1
22
kind: Kptfile
33
metadata:
44
name: example
5+
annotations:
6+
config.kubernetes.io/local-config: "true"
57
pipeline:
68
mutators:
79
- image: gcr.io/kpt-fn/create-setters:unstable

0 commit comments

Comments
 (0)