-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add kpt file with a pipeline to tutorial
- Loading branch information
1 parent
f2896d8
commit ff3eab4
Showing
5 changed files
with
219 additions
and
58 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
13 changes: 13 additions & 0 deletions
13
docs/tutorials/starting-with-porch/blueprints/network-function-auto-namespace/Kptfile
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,13 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
|
||
metadata: | ||
name: network-function-auto-namespace | ||
|
||
info: | ||
description: Network Function with automatic namespace setting Blueprint | ||
|
||
pipeline: | ||
mutators: | ||
- image: gcr.io/kpt-fn/set-namespace:v0.4.1 | ||
configPath: package-context.yaml |
25 changes: 25 additions & 0 deletions
25
...orials/starting-with-porch/blueprints/network-function-auto-namespace/README.md
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,25 @@ | ||
# Network Function | ||
|
||
## Description | ||
Network Function with automatic namespace Blueprint | ||
|
||
## Usage | ||
|
||
### Fetch the package | ||
``` | ||
kpt pkg get $GIT_HOST/$GIT_USERNAME/$GIT_BLUEPRINTS_REPO[@VERSION] network-function-auto-namespace | ||
``` | ||
Details: https://kpt.dev/reference/cli/pkg/get/ | ||
|
||
### View package content | ||
``` | ||
kpt pkg tree network-function-auto-namespace | ||
``` | ||
Details: https://kpt.dev/reference/cli/pkg/tree/ | ||
|
||
### Apply the package | ||
``` | ||
kpt live init network-function-auto-namespace | ||
kpt live apply network-function-auto-namespace --reconcile-timeout=2m --output=table | ||
``` | ||
Details: https://kpt.dev/reference/cli/live/ |
17 changes: 17 additions & 0 deletions
17
.../tutorials/starting-with-porch/blueprints/network-function-auto-namespace/deployment.yaml
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,17 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: network-function-auto-namespace | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: network-function-auto-namespace | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: network-function-auto-namespace | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:latest |
8 changes: 8 additions & 0 deletions
8
...rials/starting-with-porch/blueprints/network-function-auto-namespace/package-context.yaml
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: kptfile.kpt.dev | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
data: | ||
name: default-namespace-name |