forked from nephio-project/porch
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request nephio-project#117 from Nordix/restore-tutorial-co…
…nfig Restore tutorial example configuration files
- Loading branch information
Showing
17 changed files
with
268 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
examples/tutorials/starting-with-porch/blueprints/initialized/.gitignore
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,2 @@ | ||
* | ||
!.gitignore |
15 changes: 15 additions & 0 deletions
15
...ials/starting-with-porch/blueprints/local-changes/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,15 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
|
||
metadata: | ||
name: network-function-auto-namespace | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
|
||
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
...g-with-porch/blueprints/local-changes/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
...rting-with-porch/blueprints/local-changes/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
...-with-porch/blueprints/local-changes/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 |
10 changes: 10 additions & 0 deletions
10
examples/tutorials/starting-with-porch/blueprints/local-changes/network-function/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,10 @@ | ||
apiVersion: kpt.dev/v1 | ||
kind: Kptfile | ||
|
||
metadata: | ||
name: network-function | ||
annotations: | ||
config.kubernetes.io/local-config: "true" | ||
|
||
info: | ||
description: network function blueprint |
25 changes: 25 additions & 0 deletions
25
...torials/starting-with-porch/blueprints/local-changes/network-function/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 Blueprint | ||
|
||
## Usage | ||
|
||
### Fetch the package | ||
``` | ||
kpt pkg get $GIT_HOST/$GIT_USERNAME/$GIT_BLUEPRINTS_REPO[@VERSION] network-function | ||
``` | ||
Details: https://kpt.dev/reference/cli/pkg/get/ | ||
|
||
### View package content | ||
``` | ||
kpt pkg tree network-function | ||
``` | ||
Details: https://kpt.dev/reference/cli/pkg/tree/ | ||
|
||
### Apply the package | ||
``` | ||
kpt live init network-function | ||
kpt live apply network-function --reconcile-timeout=2m --output=table | ||
``` | ||
Details: https://kpt.dev/reference/cli/live/ |
17 changes: 17 additions & 0 deletions
17
...s/tutorials/starting-with-porch/blueprints/local-changes/network-function/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 | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: network-function | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: network-function | ||
spec: | ||
containers: | ||
- name: nginx | ||
image: nginx:latest |
14 changes: 14 additions & 0 deletions
14
examples/tutorials/starting-with-porch/kind_edge1_cluster.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,14 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
|
||
name: edge1 | ||
networking: | ||
apiServerAddress: 127.0.0.1 | ||
apiServerPort: 31001 | ||
podSubnet: 10.98.0.0/16 | ||
serviceSubnet: 10.198.0.0/16 | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 30000 | ||
hostPort: 32001 |
16 changes: 16 additions & 0 deletions
16
examples/tutorials/starting-with-porch/kind_management_cluster.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,16 @@ | ||
kind: Cluster | ||
apiVersion: kind.x-k8s.io/v1alpha4 | ||
|
||
name: management | ||
networking: | ||
apiServerAddress: 127.0.0.1 | ||
apiServerPort: 31000 | ||
podSubnet: 10.97.0.0/16 | ||
serviceSubnet: 10.197.0.0/16 | ||
nodes: | ||
- role: control-plane | ||
extraPortMappings: | ||
- containerPort: 30000 | ||
hostPort: 32000 | ||
- containerPort: 3000 # Gitea NodePort | ||
hostPort: 30600 |
2 changes: 2 additions & 0 deletions
2
examples/tutorials/starting-with-porch/kpt_packages/.gitignore
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,2 @@ | ||
* | ||
!.gitignore |
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,15 @@ | ||
apiVersion: metallb.io/v1beta1 | ||
kind: IPAddressPool | ||
metadata: | ||
name: example | ||
namespace: metallb-system | ||
spec: | ||
addresses: | ||
- 172.18.255.200-172.18.255.250 | ||
--- | ||
apiVersion: metallb.io/v1beta1 | ||
kind: L2Advertisement | ||
metadata: | ||
name: empty | ||
namespace: metallb-system | ||
|
21 changes: 21 additions & 0 deletions
21
examples/tutorials/starting-with-porch/name-namespace-variant.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,21 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha2 | ||
kind: PackageVariantSet | ||
|
||
metadata: | ||
name: network-function-auto-namespace | ||
namespace: porch-demo | ||
|
||
spec: | ||
upstream: | ||
repo: management | ||
package: network-function-auto-namespace | ||
revision: v1 | ||
targets: | ||
- repositories: | ||
- name: edge1 | ||
packageNames: | ||
- network-function-auto-namespace-x | ||
- network-function-auto-namespace-y | ||
template: | ||
downstream: | ||
packageExpr: "target.package + '-cumulonimbus'" |
59 changes: 59 additions & 0 deletions
59
examples/tutorials/starting-with-porch/porch-repositories.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,59 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: Repository | ||
|
||
metadata: | ||
name: edge1 | ||
namespace: porch-demo | ||
|
||
spec: | ||
description: edge1 | ||
content: Package | ||
deployment: true | ||
type: git | ||
git: | ||
repo: http://172.18.255.200:3000/nephio/edge1.git | ||
directory: / | ||
branch: main | ||
createBranch: true | ||
secretRef: | ||
name: gitea | ||
|
||
--- | ||
|
||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: Repository | ||
|
||
metadata: | ||
name: management | ||
namespace: porch-demo | ||
|
||
spec: | ||
description: management | ||
content: Package | ||
deployment: false | ||
type: git | ||
git: | ||
repo: http://172.18.255.200:3000/nephio/management.git | ||
directory: / | ||
branch: main | ||
secretRef: | ||
name: gitea | ||
|
||
--- | ||
|
||
apiVersion: config.porch.kpt.dev/v1alpha1 | ||
kind: Repository | ||
|
||
metadata: | ||
name: external-blueprints | ||
namespace: porch-demo | ||
|
||
spec: | ||
description: External blueprints | ||
content: Package | ||
deployment: false | ||
type: git | ||
git: | ||
repo: https://github.com/nephio-project/free5gc-packages.git | ||
directory: / | ||
branch: main |
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,2 @@ | ||
* | ||
!.gitignore |
18 changes: 18 additions & 0 deletions
18
examples/tutorials/starting-with-porch/simple-variant.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,18 @@ | ||
apiVersion: config.porch.kpt.dev/v1alpha2 | ||
kind: PackageVariantSet | ||
|
||
metadata: | ||
name: network-function | ||
namespace: porch-demo | ||
|
||
spec: | ||
upstream: | ||
repo: management | ||
package: network-function | ||
revision: v1 | ||
targets: | ||
- repositories: | ||
- name: edge1 | ||
packageNames: | ||
- network-function-b | ||
- network-function-c |
2 changes: 2 additions & 0 deletions
2
examples/tutorials/starting-with-porch/tmp_packages_for_deployment/.gitignore
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,2 @@ | ||
* | ||
!.gitignore |