Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate nephio-controllers from examples to core #14

Merged
merged 2 commits into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 3 additions & 1 deletion nephio/core/README.md
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# nephio/base
# Nephio Core Packages

This directory contains packages that are part of the Nephio core system.
9 changes: 9 additions & 0 deletions nephio/core/nephio-operator/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
name: nephio-operator
namespace: nephio-system
annotations:
config.kubernetes.io/local-config: "true"
info:
description: nephio controller
21 changes: 21 additions & 0 deletions nephio/core/nephio-operator/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# nephio-operator

## Description
nephio controller

## Usage

### Fetch the package
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] nephio`
Details: https://kpt.dev/reference/cli/pkg/get/

### View package content
`kpt pkg tree nephio`
Details: https://kpt.dev/reference/cli/pkg/tree/

### Apply the package
```
kpt live init nephio
kpt live apply nephio --reconcile-timeout=2m --output=table
```
Details: https://kpt.dev/reference/cli/live/
8 changes: 8 additions & 0 deletions nephio/core/nephio-operator/app/Kptfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: kpt.dev/v1
kind: Kptfile
metadata:
name: app
annotations:
config.kubernetes.io/local-config: "true"
info:
description: nephio app
21 changes: 21 additions & 0 deletions nephio/core/nephio-operator/app/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# app

## Description
nephio app

## Usage

### Fetch the package
`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] app`
Details: https://kpt.dev/reference/cli/pkg/get/

### View package content
`kpt pkg tree app`
Details: https://kpt.dev/reference/cli/pkg/tree/

### Apply the package
```
kpt live init app
kpt live apply app --reconcile-timeout=2m --output=table
```
Details: https://kpt.dev/reference/cli/live/
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations: {}
creationTimestamp: null
labels:
app.kubernetes.io/component: tbd
app.kubernetes.io/instance: tbd
app.kubernetes.io/managed-by: kpt
app.kubernetes.io/name: nephio
app.kubernetes.io/part-of: nephio
app.kubernetes.io/version: tbd
name: nephio-controller-approval-role
rules:
- apiGroups:
- porch.kpt.dev
resources:
- packagerevisions
- packagerevisions/status
- packagerevisions/approval
verbs:
- get
- list
- watch
- patch
- update
- apiGroups:
- ""
resources:
- events
verbs:
- create
- patch
- apiGroups:
- config.porch.kpt.dev
resources:
- packagevariants
- packagevariants/status
verbs:
- get
- list
- watch
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations: {}
creationTimestamp: null
labels:
app.kubernetes.io/component: tbd
app.kubernetes.io/instance: tbd
app.kubernetes.io/managed-by: kpt
app.kubernetes.io/name: nephio
app.kubernetes.io/part-of: nephio
app.kubernetes.io/version: tbd
name: nephio-controller-bootstrap-role
rules:
- apiGroups:
- cluster.x-k8s.io
resources:
- clusters
verbs:
- get
- list
- watch
- apiGroups:
- '*'
resources:
- secrets
verbs:
- get
- list
- watch
- apiGroups:
- porch.kpt.dev
resources:
- packagerevisionresources
- packagerevisions
verbs:
- get
- list
- watch
- apiGroups:
- config.porch.kpt.dev
resources:
- repositories
verbs:
- get
- list
- watch
- apiGroups:
- porch.kpt.dev
resources:
- packagerevisionresources/status
- packagerevisions/status
- packagerevisions/approval
verbs:
- get
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations: {}
creationTimestamp: null
labels:
app.kubernetes.io/component: tbd
app.kubernetes.io/instance: tbd
app.kubernetes.io/managed-by: kpt
app.kubernetes.io/name: nephio
app.kubernetes.io/part-of: nephio
app.kubernetes.io/version: tbd
name: nephio-controller-controller-role
rules: null
170 changes: 170 additions & 0 deletions nephio/core/nephio-operator/app/controller/clusterrole-network.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
annotations: {}
creationTimestamp: null
labels:
app.kubernetes.io/component: tbd
app.kubernetes.io/instance: tbd
app.kubernetes.io/managed-by: kpt
app.kubernetes.io/name: nephio
app.kubernetes.io/part-of: nephio
app.kubernetes.io/version: tbd
name: nephio-controller-network-role
rules:
- apiGroups:
- inv.nephio.org
resources:
- links
- nodes
- endpoints
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- infra.nephio.org
resources:
- links/status
- nodes/status
- endpoints/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- ipam.resource.nephio.org
resources:
- networkinstances
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- ipam.resource.nephio.org
resources:
- networkinstances/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- vlan.resource.nephio.org
resources:
- vlanindices
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- vlan.resource.nephio.org
resources:
- vlanindices/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- config.nephio.org
resources:
- networks
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- config.nephio.org
resources:
- networks/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- infra.nephio.org
resources:
- networks
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- infra.nephio.org
resources:
- networks/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- config.nephio.org
resources:
- networks
- networks/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete
- apiGroups:
- infra.nephio.org
resources:
- networks
- networks/status
- repositories
- repositories/status
- tokens
- tokens/status
- workloadclusters
- workloadclusters/status
verbs:
- get
- list
- watch
- update
- patch
- create
- delete