-
Notifications
You must be signed in to change notification settings - Fork 67
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into sopsV3.7.1
- Loading branch information
Showing
64 changed files
with
1,341 additions
and
159 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# 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: CheckSite | ||
on: | ||
pull_request: | ||
paths: | ||
- "functions/**" | ||
- "examples/**" | ||
- "site/**" | ||
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# This file was initially auto-generated by the Firebase CLI | ||
# https://github.com/firebase/firebase-tools | ||
|
||
name: Deploy to Firebase Hosting on merge | ||
on: | ||
push: | ||
branches: | ||
- master | ||
- "*/v[0-9]+.[0-9]+" | ||
jobs: | ||
build_and_deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- name: Generate Site | ||
run: make site-generate | ||
- uses: FirebaseExtended/action-hosting-deploy@276388dd6c2cde23455b30293105cc866c22282d # v0 | ||
with: | ||
repoToken: '${{ secrets.GITHUB_TOKEN }}' | ||
firebaseServiceAccount: '${{ secrets.FIREBASE_SERVICE_ACCOUNT_KPT_DEV }}' | ||
channelId: live | ||
projectId: kpt-dev | ||
entryPoint: site | ||
env: | ||
FIREBASE_CLI_PREVIEWS: hostingchannels |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
runCount: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
diff --git a/resources.yaml b/resources.yaml | ||
index 968a0f4..8cc1c72 100644 | ||
--- a/resources.yaml | ||
+++ b/resources.yaml | ||
@@ -1,22 +1,22 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
- labels: | ||
- foo: bar | ||
- env: dev | ||
name: my-nginx | ||
namespace: my-space | ||
+ labels: | ||
+ env: dev | ||
+ foo: bar | ||
spec: | ||
+ replicas: 3 | ||
selector: | ||
- matchLabels: | ||
- app: nginx | ||
spec: | ||
containers: | ||
- - image: nginx:1.14.2 | ||
- name: nginx | ||
+ - name: nginx | ||
+ image: nginx:1.14.2 | ||
ports: | ||
- containerPort: 80 | ||
- replicas: 3 | ||
+ matchLabels: | ||
+ app: nginx | ||
template: | ||
metadata: | ||
labels: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.expected |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
# format: Simple Example | ||
|
||
The `format` function formats the field ordering in YAML configuration files. This example depicts the functionality of | ||
`format` function by formatting a `Deployment` resource. | ||
|
||
## 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/format/simple . | ||
kpt fn run simple | ||
``` | ||
|
||
## Expected result | ||
|
||
The fields should be ordered as per OpenAPI schema definition of `Deployment` resource. For e.g. `metadata.name` field | ||
is placed before `metadata.labels` field. The keys in `metadata.labels` field are sorted alphabetically. | ||
|
||
Verify that the changes are as described: | ||
|
||
<!-- @getAndRunPkg @test --> | ||
```sh | ||
$ kpt cfg cat simple/ | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: format-fn-config | ||
annotations: | ||
config.k8s.io/function: | | ||
container: | ||
image: gcr.io/kpt-fn/format:unstable |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
labels: | ||
foo: bar | ||
env: dev | ||
name: my-nginx | ||
namespace: my-space | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: nginx | ||
spec: | ||
containers: | ||
- image: nginx:1.14.2 | ||
name: nginx | ||
ports: | ||
- containerPort: 80 | ||
replicas: 3 | ||
template: | ||
metadata: | ||
labels: | ||
app: nginx |
Oops, something went wrong.