Skip to content

Commit

Permalink
Merge pull request #61 from johnbelamaric/fix-participant-package-readme
Browse files Browse the repository at this point in the history
Add local-config annotation, fix README for participant package
  • Loading branch information
johnbelamaric authored Nov 9, 2022
2 parents 55eecfc + 0eeefb8 commit c8fdfc9
Show file tree
Hide file tree
Showing 8 changed files with 50 additions and 2 deletions.
12 changes: 10 additions & 2 deletions packages/participant/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,18 @@ Kpt package to apply with participant specific repositories and other setup

## Usage

When you fetch the package, you should give it the name of the particpant. So,
When you fetch the package, you should give it the name of the participant. So,
if the participant is 'workshopper', then:

`kpt pkg get https://github.com/nephio-project/one-summit-22-workshop/packages/particpant.git workshopper`
```bash
kpt pkg get --for-deployment https://github.com/nephio-project/one-summit-22-workshop.git/packages/participant workshopper
kpt fn render workshopper
kpt live init workshopper
kpt live apply workshopper --table
```

This assumes the GitHub basic auth secret `github-personal-access-token` has
been created with username `nephio-test` and the PAT as the password.

This will pull the package and set up the repository pointers correctly.

16 changes: 16 additions & 0 deletions packages/participant/repo-catalog.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: config.porch.kpt.dev/v1alpha1
kind: Repository
metadata:
name: catalog
namespace: default
spec:
content: Package
deployment: false
git:
branch: main
createBranch: true
directory: /
repo: https://github.com/nephio-test/participant-catalog.git
secretRef:
name: github-personal-access-token
type: git
2 changes: 2 additions & 0 deletions packages/participant/repo-edge-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ metadata:
namespace: default
spec:
content: Package
deployment: true
git:
branch: main
createBranch: true
directory: /
repo: https://github.com/nephio-test/participant-edge-1.git
secretRef:
Expand Down
2 changes: 2 additions & 0 deletions packages/participant/repo-edge-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ metadata:
namespace: default
spec:
content: Package
deployment: true
git:
branch: main
createBranch: true
directory: /
repo: https://github.com/nephio-test/participant-edge-2.git
secretRef:
Expand Down
15 changes: 15 additions & 0 deletions packages/participant/repo-free5gc-packages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
apiVersion: config.porch.kpt.dev/v1alpha1
kind: Repository
metadata:
name: free5gc-packages
namespace: default
spec:
content: Package
deployment: false
git:
branch: main
directory: /
repo: https://github.com/nephio-project/free5gc-packages.git
secretRef:
name: github-personal-access-token
type: git
1 change: 1 addition & 0 deletions packages/participant/repo-nephio-packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ metadata:
namespace: default
spec:
content: Package
deployment: false
git:
branch: main
directory: /
Expand Down
2 changes: 2 additions & 0 deletions packages/participant/repo-regional.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,10 @@ metadata:
namespace: default
spec:
content: Package
deployment: true
git:
branch: main
createBranch: true
directory: /
repo: https://github.com/nephio-test/participant-regional.git
secretRef:
Expand Down
2 changes: 2 additions & 0 deletions packages/participant/set-repos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ apiVersion: fn.kpt.dev/v1alpha1
kind: StarlarkRun
metadata:
name: set-repos
annotations:
config.kubernetes.io/local-config: "true"
source: |
# set the repo names
def setrepo(resources, participant):
Expand Down

0 comments on commit c8fdfc9

Please sign in to comment.