diff --git a/nephio/core/README.md b/nephio/core/README.md index 458f980..df96a31 100644 --- a/nephio/core/README.md +++ b/nephio/core/README.md @@ -1 +1,3 @@ -# nephio/base +# Nephio Core Packages + +This directory contains packages that are part of the Nephio core system. diff --git a/nephio/core/nephio-operator/Kptfile b/nephio/core/nephio-operator/Kptfile new file mode 100644 index 0000000..9d9783d --- /dev/null +++ b/nephio/core/nephio-operator/Kptfile @@ -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 diff --git a/nephio/core/nephio-operator/README.md b/nephio/core/nephio-operator/README.md new file mode 100644 index 0000000..d110717 --- /dev/null +++ b/nephio/core/nephio-operator/README.md @@ -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/ diff --git a/nephio/core/nephio-operator/app/Kptfile b/nephio/core/nephio-operator/app/Kptfile new file mode 100644 index 0000000..4c1d053 --- /dev/null +++ b/nephio/core/nephio-operator/app/Kptfile @@ -0,0 +1,8 @@ +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: app + annotations: + config.kubernetes.io/local-config: "true" +info: + description: nephio app diff --git a/nephio/core/nephio-operator/app/README.md b/nephio/core/nephio-operator/app/README.md new file mode 100644 index 0000000..9b42548 --- /dev/null +++ b/nephio/core/nephio-operator/app/README.md @@ -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/ diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-approval.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-approval.yaml new file mode 100644 index 0000000..485aaad --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-approval.yaml @@ -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 diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-bootstrap.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-bootstrap.yaml new file mode 100644 index 0000000..c9b56d8 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-bootstrap.yaml @@ -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 diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-controller.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-controller.yaml new file mode 100644 index 0000000..04dea2e --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-controller.yaml @@ -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 diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-network.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-network.yaml new file mode 100644 index 0000000..a6279b9 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-network.yaml @@ -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 diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-porch.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-porch.yaml new file mode 100644 index 0000000..8231d34 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-porch.yaml @@ -0,0 +1,73 @@ +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-porch-role +rules: +- apiGroups: + - porch.kpt.dev + resources: + - packagerevisionresources + - packagerevisions + verbs: + - get + - list + - watch + - update + - patch + - create + - delete +- apiGroups: + - porch.kpt.dev + resources: + - packagerevisionresources/status + - packagerevisions/status + - packagerevisions/approval + 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 diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-repository.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-repository.yaml new file mode 100644 index 0000000..149a51d --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-repository.yaml @@ -0,0 +1,46 @@ +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-repository-role +rules: +- apiGroups: + - '*' + resources: + - services + verbs: + - get + - list + - watch +- apiGroups: + - infra.nephio.org + resources: + - repositories + verbs: + - get + - list + - watch + - update + - patch + - create + - delete +- apiGroups: + - infra.nephio.org + resources: + - repositories/status + verbs: + - get + - list + - watch + - update + - patch + - create + - delete diff --git a/nephio/core/nephio-operator/app/controller/clusterrole-token.yaml b/nephio/core/nephio-operator/app/controller/clusterrole-token.yaml new file mode 100644 index 0000000..8a64ab3 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrole-token.yaml @@ -0,0 +1,58 @@ +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-token-role +rules: +- apiGroups: + - '*' + resources: + - services + verbs: + - get + - list + - watch +- apiGroups: + - infra.nephio.org + resources: + - tokens + verbs: + - get + - list + - watch + - update + - patch + - create + - delete +- apiGroups: + - infra.nephio.org + resources: + - tokens/status + verbs: + - get + - list + - watch + - update + - patch + - create + - delete +- apiGroups: + - "" + resources: + - secrets + verbs: + - get + - list + - watch + - update + - patch + - create + - delete diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-approval.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-approval.yaml new file mode 100644 index 0000000..a07907a --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-approval.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-approval-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-bootstrap.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-bootstrap.yaml new file mode 100644 index 0000000..5f0c698 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-bootstrap.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-bootstrap-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-controller.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-controller.yaml new file mode 100644 index 0000000..b33abe8 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-controller.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-controller-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-network.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-network.yaml new file mode 100644 index 0000000..9778f6a --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-network.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-network-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-porch.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-porch.yaml new file mode 100644 index 0000000..7b53294 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-porch.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-porch-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-porch-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-repository.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-repository.yaml new file mode 100644 index 0000000..0304fe7 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-repository.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-repository-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-repository-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/clusterrolebinding-token.yaml b/nephio/core/nephio-operator/app/controller/clusterrolebinding-token.yaml new file mode 100644 index 0000000..b809ec8 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/clusterrolebinding-token.yaml @@ -0,0 +1,21 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: ClusterRoleBinding +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-token-role-binding +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: ClusterRole + name: nephio-controller-token-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/deployment-controller.yaml b/nephio/core/nephio-operator/app/controller/deployment-controller.yaml new file mode 100644 index 0000000..34a6443 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/deployment-controller.yaml @@ -0,0 +1,117 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: {} + creationTimestamp: null + name: nephio-controller + namespace: nephio-system +spec: + replicas: 1 + selector: + matchLabels: + fn.kptgen.dev/controller: nephio-controller + strategy: {} + template: + metadata: + 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 + fn.kptgen.dev/controller: nephio-controller + name: nephio-controller + namespace: nephio-system + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + resources: {} + - args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: NODE_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.hostIP + - name: GIT_URL + value: http://172.18.0.200:3000 + - name: GIT_NAMESPACE + value: gitea + - name: ENABLE_APPROVAL + value: "true" + - name: ENABLE_REPOSITORIES + value: "true" + - name: ENABLE_BOOTSTRAPSECRETS + value: "true" + - name: ENABLE_BOOTSTRAPPACKAGES + value: "true" + - name: ENABLE_GENERICSPECIALIZER + value: "true" + - name: ENABLE_NETWORKS + value: "true" + - name: CLIENT_PROXY_ADDRESS + value: resource-backend-controller-grpc-svc.backend-system.svc.cluster.local:9999 + image: docker.io/nephio/nephio-operator:latest + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: controller + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + serviceAccountName: nephio-controller +status: {} diff --git a/nephio/core/nephio-operator/app/controller/deployment-token-controller.yaml b/nephio/core/nephio-operator/app/controller/deployment-token-controller.yaml new file mode 100644 index 0000000..9cf325a --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/deployment-token-controller.yaml @@ -0,0 +1,105 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + annotations: {} + creationTimestamp: null + name: token-controller + namespace: nephio-system +spec: + replicas: 1 + selector: + matchLabels: + fn.kptgen.dev/controller: token-controller + strategy: {} + template: + metadata: + 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 + fn.kptgen.dev/controller: token-controller + name: token-controller + namespace: nephio-system + spec: + containers: + - args: + - --secure-listen-address=0.0.0.0:8443 + - --upstream=http://127.0.0.1:8080/ + - --logtostderr=true + - --v=10 + image: gcr.io/kubebuilder/kube-rbac-proxy:v0.8.0 + name: kube-rbac-proxy + ports: + - containerPort: 8443 + name: https + resources: {} + - args: + - --health-probe-bind-address=:8081 + - --metrics-bind-address=127.0.0.1:8080 + - --leader-elect + command: + - /manager + env: + - name: POD_NAMESPACE + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.namespace + - name: POD_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.podIP + - name: POD_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: metadata.name + - name: NODE_NAME + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: spec.nodeName + - name: NODE_IP + valueFrom: + fieldRef: + apiVersion: v1 + fieldPath: status.hostIP + - name: GIT_URL + value: http://172.18.0.200:3000 + - name: GIT_NAMESPACE + value: gitea + - name: ENABLE_TOKENS + value: "true" + image: docker.io/nephio/nephio-operator:latest + livenessProbe: + httpGet: + path: /healthz + port: 8081 + initialDelaySeconds: 15 + periodSeconds: 20 + name: controller + readinessProbe: + httpGet: + path: /readyz + port: 8081 + initialDelaySeconds: 5 + periodSeconds: 10 + resources: + limits: + cpu: 500m + memory: 128Mi + requests: + cpu: 10m + memory: 64Mi + securityContext: + allowPrivilegeEscalation: false + capabilities: + drop: + - ALL + serviceAccountName: nephio-controller +status: {} diff --git a/nephio/core/nephio-operator/app/controller/role-leader-election.yaml b/nephio/core/nephio-operator/app/controller/role-leader-election.yaml new file mode 100644 index 0000000..197e028 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/role-leader-election.yaml @@ -0,0 +1,46 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: Role +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-leader-election-role + namespace: nephio-system +rules: +- apiGroups: + - "" + resources: + - configmaps + verbs: + - get + - list + - watch + - update + - patch + - create + - delete +- apiGroups: + - coordination.k8s.io + resources: + - leases + verbs: + - get + - list + - watch + - update + - patch + - create + - delete +- apiGroups: + - "" + resources: + - events + verbs: + - create + - patch diff --git a/nephio/core/nephio-operator/app/controller/rolebinding-leader-election.yaml b/nephio/core/nephio-operator/app/controller/rolebinding-leader-election.yaml new file mode 100644 index 0000000..aeb4d38 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/rolebinding-leader-election.yaml @@ -0,0 +1,22 @@ +apiVersion: rbac.authorization.k8s.io/v1 +kind: RoleBinding +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-leader-election-role-binding + namespace: nephio-system +roleRef: + apiGroup: rbac.authorization.k8s.io + kind: Role + name: nephio-controller-leader-election-role +subjects: +- kind: ServiceAccount + name: nephio-controller + namespace: nephio-system diff --git a/nephio/core/nephio-operator/app/controller/serviceaccount-controller.yaml b/nephio/core/nephio-operator/app/controller/serviceaccount-controller.yaml new file mode 100644 index 0000000..7b159e3 --- /dev/null +++ b/nephio/core/nephio-operator/app/controller/serviceaccount-controller.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: ServiceAccount +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 + namespace: nephio-system diff --git a/nephio/core/nephio-operator/crd/Kptfile b/nephio/core/nephio-operator/crd/Kptfile new file mode 100644 index 0000000..e59871b --- /dev/null +++ b/nephio/core/nephio-operator/crd/Kptfile @@ -0,0 +1,8 @@ +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: crd + annotations: + config.kubernetes.io/local-config: "true" +info: + description: nephio crd diff --git a/nephio/core/nephio-operator/crd/README.md b/nephio/core/nephio-operator/crd/README.md new file mode 100644 index 0000000..0094f82 --- /dev/null +++ b/nephio/core/nephio-operator/crd/README.md @@ -0,0 +1,21 @@ +# crd + +## Description +nephio crd + +## Usage + +### Fetch the package +`kpt pkg get REPO_URI[.git]/PKG_PATH[@VERSION] crd` +Details: https://kpt.dev/reference/cli/pkg/get/ + +### View package content +`kpt pkg tree crd` +Details: https://kpt.dev/reference/cli/pkg/tree/ + +### Apply the package +``` +kpt live init crd +kpt live apply crd --reconcile-timeout=2m --output=table +``` +Details: https://kpt.dev/reference/cli/live/ diff --git a/nephio/core/nephio-operator/crd/bases/config.nephio.org_networks.yaml b/nephio/core/nephio-operator/crd/bases/config.nephio.org_networks.yaml new file mode 100644 index 0000000..c0c57c1 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/config.nephio.org_networks.yaml @@ -0,0 +1,138 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: networks.config.nephio.org +spec: + group: config.nephio.org + names: + categories: + - nephio + - config + kind: Network + listKind: NetworkList + plural: networks + singular: network + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: REPO_STATUS + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Network is the Schema for the Network API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: NetworkSpec defines the desired state of Network Configuration + properties: + config: + description: Config defines the configuration to be applied to a target + device + type: object + x-kubernetes-preserve-unknown-fields: true + lifecycle: + description: Lifecycle determines the lifecycle policies the resource + e.g. delete is orphan or delete will follow + properties: + deletionPolicy: + default: delete + description: DeletionPolicy specifies what will happen to the + underlying resource when this resource is deleted - either "delete" + or "orphan" the resource. + enum: + - delete + - orphan + type: string + type: object + type: object + status: + description: NetworkStatus defines the observed state of Network + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + lastAppliedConfig: + description: LastAppliedConfig defines the configuration that was + last applied to the target device + type: object + x-kubernetes-preserve-unknown-fields: true + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/infra.nephio.org_clustercontexts.yaml b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_clustercontexts.yaml new file mode 100644 index 0000000..ebd4522 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_clustercontexts.yaml @@ -0,0 +1,61 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: clustercontexts.infra.nephio.org +spec: + group: infra.nephio.org + names: + kind: ClusterContext + listKind: ClusterContextList + plural: clustercontexts + singular: clustercontext + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: ClusterContext is the Schema for the clustercontexts API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: ClusterContextSpec defines the desired state of ClusterContext + properties: + cniConfig: + description: CNIConfig contains the details of CNI configuration for + this cluster + properties: + cniType: + type: string + masterInterface: + type: string + required: + - cniType + - masterInterface + type: object + siteCode: + description: SiteCode identifies this cluster's location + type: string + type: object + status: + description: ClusterContextStatus defines the observed state of ClusterContext + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/infra.nephio.org_networkconfigs.yaml b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_networkconfigs.yaml new file mode 100644 index 0000000..f8348ad --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_networkconfigs.yaml @@ -0,0 +1,144 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: networkconfigs.infra.nephio.org +spec: + group: infra.nephio.org + names: + categories: + - nephio + - network + kind: NetworkConfig + listKind: NetworkConfigList + plural: networkconfigs + singular: networkconfig + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: REPO_STATUS + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: NetworkConfig is the Schema for the Network API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: NetworkConfigSpec defines the desired state of NetworkConfig + properties: + prefixLengths: + description: PrefixLengths define the prefix lengths for ipv4 and + ipv6 configuration elements + properties: + ipv4: + description: IPv4 defines the ipv4 prefixlengths + properties: + interfaceExternal: + default: 24 + type: integer + interfaceInternal: + default: 31 + type: integer + pool: + default: 16 + type: integer + type: object + ipv6: + description: IPv6 defines the ipv6 prefixlengths + properties: + interfaceExternal: + default: 64 + type: integer + interfaceInternal: + default: 127 + type: integer + pool: + default: 48 + type: integer + type: object + type: object + type: object + status: + description: NetworkStatus defines the observed state of Network + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: {} diff --git a/nephio/core/nephio-operator/crd/bases/infra.nephio.org_networks.yaml b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_networks.yaml new file mode 100644 index 0000000..e821fcb --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_networks.yaml @@ -0,0 +1,333 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: networks.infra.nephio.org +spec: + group: infra.nephio.org + names: + categories: + - nephio + - network + kind: Network + listKind: NetworkList + plural: networks + singular: network + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: READY + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Network is the Schema for the Network API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: NetworkSpec defines the desired state of Network + properties: + bridgeDomains: + description: BridgeDomains define a set of logical ports that share + the same flooding or broadcast characteristics. Like a virtual LAN + (VLAN), a bridge domain spans one or more ports of multiple devices. + items: + properties: + interfaces: + description: Interfaces defines the interfaces belonging to + the bridge domain + items: + properties: + attachmentType: + description: 'AttachmentType defines the interface attachement: + vlan or none' + enum: + - none + - vlan + type: string + bridgeDomainName: + description: BridgeDomainName defines the name of the + bridgeDomain belonging to the interface + type: string + interfaceName: + description: InterfaceName defines the name of the interface + type: string + kind: + default: interface + description: Kind defines the kind of interface. Attached + to a routing table both interface and bridgedomain interfaces + are allowed. In a BridgeDomain only regular interfaces + are allowed + enum: + - interface + - bridgedomain + type: string + nodeName: + description: NodeName defines the name of the node the + interface belongs to interface + type: string + selector: + description: Selector defines the selector criterias for + the interface selection + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values + array must be non-empty. If the operator is + Exists or DoesNotExist, the values array must + be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - kind + type: object + type: array + name: + description: Name defines the name of the bridge domain + type: string + required: + - name + type: object + type: array + routingTables: + description: RoutingTables defines a set of routes belonging to a + given routing instance Multiple routing tables are also called virtual + routing instances. Each virtual routing instance can hold overlapping + IP information A routing table supports both ipv4 and ipv6 + items: + properties: + interfaces: + description: Interfaces defines the interfaces belonging to + the routing table + items: + properties: + attachmentType: + description: 'AttachmentType defines the interface attachement: + vlan or none' + enum: + - none + - vlan + type: string + bridgeDomainName: + description: BridgeDomainName defines the name of the + bridgeDomain belonging to the interface + type: string + interfaceName: + description: InterfaceName defines the name of the interface + type: string + kind: + default: interface + description: Kind defines the kind of interface. Attached + to a routing table both interface and bridgedomain interfaces + are allowed. In a BridgeDomain only regular interfaces + are allowed + enum: + - interface + - bridgedomain + type: string + nodeName: + description: NodeName defines the name of the node the + interface belongs to interface + type: string + selector: + description: Selector defines the selector criterias for + the interface selection + properties: + matchExpressions: + description: matchExpressions is a list of label selector + requirements. The requirements are ANDed. + items: + description: A label selector requirement is a selector + that contains values, a key, and an operator that + relates the key and values. + properties: + key: + description: key is the label key that the selector + applies to. + type: string + operator: + description: operator represents a key's relationship + to a set of values. Valid operators are In, + NotIn, Exists and DoesNotExist. + type: string + values: + description: values is an array of string values. + If the operator is In or NotIn, the values + array must be non-empty. If the operator is + Exists or DoesNotExist, the values array must + be empty. This array is replaced during a + strategic merge patch. + items: + type: string + type: array + required: + - key + - operator + type: object + type: array + matchLabels: + additionalProperties: + type: string + description: matchLabels is a map of {key,value} pairs. + A single {key,value} in the matchLabels map is equivalent + to an element of matchExpressions, whose key field + is "key", the operator is "In", and the values array + contains only "value". The requirements are ANDed. + type: object + type: object + x-kubernetes-map-type: atomic + required: + - kind + type: object + type: array + name: + description: Name defines the name of the routing table + type: string + prefixes: + description: Prefixes defines the prefixes belonging to the + routing table + items: + properties: + labels: + additionalProperties: + type: string + description: Labels as user defined labels + type: object + prefix: + description: Prefix defines the ip cidr in prefix notation. + pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) + type: string + required: + - prefix + type: object + type: array + required: + - name + - prefixes + type: object + type: array + topology: + description: Topology defines the topology to which this network applies + type: string + required: + - topology + type: object + status: + description: NetworkStatus defines the observed state of Network + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/infra.nephio.org_repositories.yaml b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_repositories.yaml new file mode 100644 index 0000000..be90aa4 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_repositories.yaml @@ -0,0 +1,158 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: repositories.infra.nephio.org +spec: + group: infra.nephio.org + names: + kind: Repository + listKind: RepositoryList + plural: repositories + singular: repository + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: REPO_STATUS + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Repository is the Schema for the repository API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: RepositorySpec defines the desired state of Repository + properties: + defaultBranch: + description: DefaultBranch of the repository (used when initializes + and in template) + type: string + description: + description: Description of the repository to create + type: string + gitignores: + description: Gitignores defines the Gitignores of the repository + type: string + issueLabels: + description: IssueLabels defines the Issue Label set to use + type: string + license: + description: License to use + type: string + lifecycle: + description: Lifecycle determines the deletion lifecycle policies + the resource will follow + properties: + deletionPolicy: + default: delete + description: DeletionPolicy specifies what will happen to the + underlying resource when this resource is deleted - either "delete" + or "orphan" the resource. + enum: + - delete + - orphan + type: string + type: object + private: + description: Private defines whether the repository is private + type: boolean + readme: + description: Readme of the repository to create + type: string + trustModel: + description: TrustModel of the repository + enum: + - default + - collaborator + - committer + - collaboratorcommitter + type: string + type: object + status: + description: RepositoryStatus defines the observed state of Repository + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + url: + description: URL is the url for the repo + type: string + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/infra.nephio.org_tokens.yaml b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_tokens.yaml new file mode 100644 index 0000000..4a421ee --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_tokens.yaml @@ -0,0 +1,125 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: tokens.infra.nephio.org +spec: + group: infra.nephio.org + names: + kind: Token + listKind: TokenList + plural: tokens + singular: token + scope: Namespaced + versions: + - additionalPrinterColumns: + - jsonPath: .status.conditions[?(@.type=='Ready')].status + name: REPO_TOKEN_STATUS + type: string + name: v1alpha1 + schema: + openAPIV3Schema: + description: Token is the Schema for the repository token API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TokenSpec defines the desired state of Token + properties: + lifecycle: + description: Lifecycle determines the deletion lifecycle policies + the resource will follow + properties: + deletionPolicy: + default: delete + description: DeletionPolicy specifies what will happen to the + underlying resource when this resource is deleted - either "delete" + or "orphan" the resource. + enum: + - delete + - orphan + type: string + type: object + type: object + status: + description: TokenStatus defines the observed state of the Token + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/infra.nephio.org_workloadclusters.yaml b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_workloadclusters.yaml new file mode 100644 index 0000000..bf1c5dc --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/infra.nephio.org_workloadclusters.yaml @@ -0,0 +1,58 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: workloadclusters.infra.nephio.org +spec: + group: infra.nephio.org + names: + kind: WorkloadCluster + listKind: WorkloadClusterList + plural: workloadclusters + singular: workloadcluster + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + description: WorkloadCluster is the Schema for the clustercontexts API + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: WorkloadClusterSpec defines the desired state of WorkloadCluster + properties: + clusterName: + description: ClusterName is the unique name for this cluster + type: string + cnis: + description: CNIs defines the CNIs required for the workload cluster + items: + type: string + type: array + masterInterface: + description: MasterInterface define the master interface for secondary + networking in the nodes on the cluster + type: string + type: object + status: + description: WorkloadClusterStatus defines the observed state of WorkloadCluster + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/req.nephio.org_capacities.yaml b/nephio/core/nephio-operator/crd/bases/req.nephio.org_capacities.yaml new file mode 100644 index 0000000..db2c947 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/req.nephio.org_capacities.yaml @@ -0,0 +1,69 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: capacities.req.nephio.org +spec: + group: req.nephio.org + names: + kind: Capacity + listKind: CapacityList + plural: capacities + singular: capacity + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + maxDownlinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxDownlinkThroughput defines the max downlink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + maxNFConnections: + description: MaxNFConnections defines the max NF(s) that can be connected + to this NF/device + type: integer + maxSessions: + description: MaxSessions defines the max sessions of the control plane + expressed in unit of 1000s + type: integer + maxSubscribers: + description: MaxSubscribers defines the max subscribers expressed + in unit of 1000s + type: integer + maxUplinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxUplinkThroughput defines the max uplink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + status: + type: object + type: object + served: true + storage: true diff --git a/nephio/core/nephio-operator/crd/bases/req.nephio.org_datanetworknames.yaml b/nephio/core/nephio-operator/crd/bases/req.nephio.org_datanetworknames.yaml new file mode 100644 index 0000000..b6e26dd --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/req.nephio.org_datanetworknames.yaml @@ -0,0 +1,79 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: datanetworknames.req.nephio.org +spec: + group: req.nephio.org + names: + kind: DataNetworkName + listKind: DataNetworkNameList + plural: datanetworknames + singular: datanetworkname + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + networkInstanceReference: + description: NetworkInstance defines the networkInstance context to + which this DNN belongs + properties: + name: + description: Name is unique within a namespace to reference a + nfClass. + maxLength: 253 + minLength: 1 + type: string + namespace: + description: Namespace is the namespace of the referent. This + field is required when referring to a Namespace-scoped resource + and MUST be unset when referring to a Cluster-scoped resource. + maxLength: 63 + minLength: 1 + pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$ + type: string + required: + - name + type: object + pools: + description: Pools defines the parameters of the IP pool associated + with the DNN + items: + properties: + name: + description: Name defines the name of the pool + maxLength: 253 + minLength: 1 + type: string + prefixLength: + description: PrefixLength define the size of the pool + type: integer + type: object + type: array + required: + - networkInstanceReference + type: object + status: + type: object + type: object + served: true + storage: true diff --git a/nephio/core/nephio-operator/crd/bases/req.nephio.org_datanetworks.yaml b/nephio/core/nephio-operator/crd/bases/req.nephio.org_datanetworks.yaml new file mode 100644 index 0000000..d8783ed --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/req.nephio.org_datanetworks.yaml @@ -0,0 +1,194 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: datanetworks.req.nephio.org +spec: + group: req.nephio.org + names: + kind: DataNetwork + listKind: DataNetworkList + plural: datanetworks + singular: datanetwork + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + networkInstance: + description: NetworkInstance defines the networkInstance context to + which this DNN belongs Name and optionally Namespace is used here + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + pools: + description: Pools defines the parameters of the IP pool associated + with the DNN + items: + properties: + ipFamily: + description: IPFamily defines the ip family of the pool + enum: + - ipv4 + - ipv6 + type: string + name: + description: Name defines the name of the pool + maxLength: 253 + minLength: 1 + type: string + prefixLength: + description: PrefixLength define the size of the pool + type: integer + type: object + type: array + required: + - networkInstance + type: object + status: + properties: + pools: + description: Pools contains the statuses of individual pools + items: + properties: + ipClaim: + description: IPClaim holds the result of the IP claim belonging + to the pool + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the + condition transitioned from one status to another. + This should be when the underlying condition changed. If + that is not known, then using the time when the + API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty + string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the + .status.conditions[x].observedGeneration is 9, the + condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last transition. + Producers of specific condition types may define + expected values and meanings for this field, and + whether the values are considered a guaranteed API. + The value should be a CamelCase string. This field + may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, + False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in + foo.example.com/CamelCase. --- Many .condition.type + values are consistent across resources like Available, + but because arbitrary conditions can be useful (see + .node.status.conditions), the ability to deconflict + is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + expiryTime: + description: ExpiryTime defines when the claim expires + type: string + gateway: + description: Gateway defines the gateway IP for the claimed + prefix Gateway is only relevant for prefix kind = network + type: string + prefix: + description: Prefix defines the prefix, claimed through + the IPAM backend + type: string + type: object + name: + description: Name of the pool + type: string + type: object + type: array + type: object + type: object + served: true + storage: true diff --git a/nephio/core/nephio-operator/crd/bases/req.nephio.org_interfaces.yaml b/nephio/core/nephio-operator/crd/bases/req.nephio.org_interfaces.yaml new file mode 100644 index 0000000..20d1b80 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/req.nephio.org_interfaces.yaml @@ -0,0 +1,264 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: interfaces.req.nephio.org +spec: + group: req.nephio.org + names: + kind: Interface + listKind: InterfaceList + plural: interfaces + singular: interface + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + description: TBD how do we distinguish the loopback from the vnic(s) + properties: + attachmentType: + description: AttachmentType defines if the interface is attached using + a vlan or not + enum: + - none + - vlan + type: string + cniType: + description: CNIType defines the cniType that is used to attach the + interface to the pod + enum: + - sriov + - ipvlan + - macvlan + type: string + ipFamilyPolicy: + description: IpFamilyPolicy defines the ip family policy on this interface + to determine single stack, dual stack + enum: + - none + - ipv6-only + - ipv4-only + - dual-stack + type: string + networkInstance: + description: NetworkInstance defines the networkInstance to which + this interface belongs Name and optionally Namespace is used here + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + required: + - networkInstance + type: object + status: + properties: + ipClaimStatus: + items: + description: IPClaimStatus defines the observed state of IPClaim + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should + be when the underlying condition changed. If that is + not known, then using the time when the API field changed + is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, + if .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier + indicating the reason for the condition's last transition. + Producers of specific condition types may define expected + values and meanings for this field, and whether the + values are considered a guaranteed API. The value should + be a CamelCase string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across + resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability + to deconflict is important. The regex it matches is + (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + expiryTime: + description: ExpiryTime defines when the claim expires + type: string + gateway: + description: Gateway defines the gateway IP for the claimed + prefix Gateway is only relevant for prefix kind = network + type: string + prefix: + description: Prefix defines the prefix, claimed through the + IPAM backend + type: string + type: object + type: array + vlanClaimStatus: + description: VLANClaimStatus defines the observed state of VLANClaim + properties: + conditions: + description: Conditions of the resource. + items: + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be + when the underlying condition changed. If that is not + known, then using the time when the API field changed + is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if + .metadata.generation is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the + current state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values + and meanings for this field, and whether the values are + considered a guaranteed API. The value should be a CamelCase + string. This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, + Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across + resources like Available, but because arbitrary conditions + can be useful (see .node.status.conditions), the ability + to deconflict is important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + expiryTime: + description: ExpiryTime indicated when the claim expires + type: string + vlanID: + description: VLANID defines the vlan ID, claimed through the VLAN + backend + type: integer + vlanRange: + description: VLANRange defines the vlan range, claimed through + the VLAN backend + type: string + type: object + type: object + type: object + served: true + storage: true diff --git a/nephio/core/nephio-operator/crd/bases/workload.nephio.org_amfdeployments.yaml b/nephio/core/nephio-operator/crd/bases/workload.nephio.org_amfdeployments.yaml new file mode 100644 index 0000000..fc5d62e --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/workload.nephio.org_amfdeployments.yaml @@ -0,0 +1,400 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: amfdeployments.workload.nephio.org +spec: + group: workload.nephio.org + names: + kind: AMFDeployment + listKind: AMFDeploymentList + plural: amfdeployments + singular: amfdeployment + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + capacity: + description: capacity defines the capacity characteristics of the + NF deployment + properties: + maxDownlinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxDownlinkThroughput defines the max downlink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + maxNFConnections: + description: MaxNFConnections defines the max NF(s) that can be + connected to this NF/device + type: integer + maxSessions: + description: MaxSessions defines the max sessions of the control + plane expressed in unit of 1000s + type: integer + maxSubscribers: + description: MaxSubscribers defines the max subscribers expressed + in unit of 1000s + type: integer + maxUplinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxUplinkThroughput defines the max uplink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + configRefs: + description: configRef defines addiitonal configuration references + the nf depends upon + items: + description: "ObjectReference contains enough information to let + you inspect or modify the referred object. --- New uses of this + type are discouraged because of difficulty describing its usage + when embedded in APIs. 1. Ignored fields. It includes many fields + which are not generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in actual usage. 2. Invalid + usage help. It is impossible to add specific help for individual + usage. In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not honored\" + or \"name must be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because the usages + are different, the validation rules are different by usage, which + makes it hard for users to predict what will happen. 4. The fields + are both imprecise and overly precise. Kind is not a precise + mapping to a URL. This can produce ambiguity during interpretation + and require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual struct + is irrelevant. 5. We cannot easily change it. Because this type + is embedded in many locations, updates to this type will affect + numerous schemas. Don't make new APIs embed an underspecified + API type they do not control. \n Instead of using this type, create + a locally provided and used type that is well-focused on your + reference. For example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + interfaces: + description: Interfaces defines the interfaces associated with the + NF deployment + items: + description: InterfaceConfig defines the configuration of the interface + properties: + ipv4: + description: IPv4 defines the ipv4 configuration of the interface + properties: + address: + description: Address defines the IPv4 address and prefix + length in CIDR notation [IP prefix, range IPv4 with host + bits] + type: string + gateway: + description: Gateway defines the IPv4 address associated + to the interface as a gateway + type: string + required: + - address + type: object + ipv6: + description: IPv6Config defines the ipv6 configuration of the + interface + properties: + address: + description: Address defines the IPv6 address and prefix + length in CIDR notation [IP prefix, range IPv6 with host + bits] + type: string + gateway: + description: Gateway defines the IPv6 address associated + to the interface as a gateway + type: string + required: + - address + type: object + name: + description: Name defines the name of the interface + maxLength: 253 + minLength: 1 + type: string + vlanID: + description: VLANID defines the specific vlan id associated + on this interface + type: integer + required: + - name + type: object + type: array + networkInstances: + description: NetworkInstances defines the network instances associated + with the NF deployment + items: + description: A networkInstance is a Layer 3 forwarding construct + such as a virtual routing and forwarding (VRF) instance, + properties: + bgp: + description: BGP defines the BGP configuration associated with + the network instance + properties: + autonomousSystem: + description: AutonomousSystem defines the AS number of the + bgp process + type: integer + bgpNeighbors: + description: BGPNeigbors defines the configuration of the + BGP neighbor + items: + properties: + address: + description: Address defines the IPv4 or IPv6 address + of the BGP neighbor + type: string + name: + description: BGP interface name, MUST match the one + use in InterfaceConfig + type: string + peerAS: + description: PeerAS defines the AS number of the bgp + peer + type: integer + required: + - address + - peerAS + type: object + type: array + routerID: + description: RouterID defines the router ID of the bgp process + type: string + required: + - autonomousSystem + - bgpNeighbors + - routerID + type: object + dataNetworks: + description: DataNetworks defines the data networks assocated + with the network instance + items: + description: A DataNetwork defines the Data Network name defined + by 3GPP + properties: + name: + description: Name defines the name of the data network + maxLength: 253 + minLength: 1 + type: string + pool: + description: Pool defines the list of address pools associated + with the data network + items: + properties: + prefix: + description: Prefix defines the ip cidr in prefix + notation. It is defines as a subnet + pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) + type: string + required: + - prefix + type: object + type: array + type: object + type: array + interfaces: + description: interfaces defines the interfaces associated with + the network instance + items: + type: string + type: array + name: + description: Name defines the name of the network instance + maxLength: 253 + minLength: 1 + type: string + peers: + description: Peers defines the peer configuration associated + with the network instance + items: + description: A PeerConfig defines the peer configuration + properties: + ipv4: + description: IPv4 defines the ipv4 configuration of the + peer + properties: + address: + description: Address defines the IPv4 address and + prefix length in CIDR notation [IP prefix, range + IPv4 with host bits] + type: string + gateway: + description: Gateway defines the IPv4 address associated + to the interface as a gateway + type: string + required: + - address + type: object + ipv6: + description: IPv6 defines the ipv6 configuration of the + peer + properties: + address: + description: Address defines the IPv6 address and + prefix length in CIDR notation [IP prefix, range + IPv6 with host bits] + type: string + gateway: + description: Gateway defines the IPv6 address associated + to the interface as a gateway + type: string + required: + - address + type: object + name: + description: Name defines the name of the data network + maxLength: 253 + minLength: 1 + type: string + type: object + type: array + required: + - name + type: object + type: array + type: object + status: + properties: + conditions: + description: Conditions define the current state of the NF deployment + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the deployment controller. + format: int32 + type: integer + required: + - observedGeneration + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/workload.nephio.org_smfdeployments.yaml b/nephio/core/nephio-operator/crd/bases/workload.nephio.org_smfdeployments.yaml new file mode 100644 index 0000000..50c7627 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/workload.nephio.org_smfdeployments.yaml @@ -0,0 +1,400 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: smfdeployments.workload.nephio.org +spec: + group: workload.nephio.org + names: + kind: SMFDeployment + listKind: SMFDeploymentList + plural: smfdeployments + singular: smfdeployment + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + capacity: + description: capacity defines the capacity characteristics of the + NF deployment + properties: + maxDownlinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxDownlinkThroughput defines the max downlink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + maxNFConnections: + description: MaxNFConnections defines the max NF(s) that can be + connected to this NF/device + type: integer + maxSessions: + description: MaxSessions defines the max sessions of the control + plane expressed in unit of 1000s + type: integer + maxSubscribers: + description: MaxSubscribers defines the max subscribers expressed + in unit of 1000s + type: integer + maxUplinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxUplinkThroughput defines the max uplink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + configRefs: + description: configRef defines addiitonal configuration references + the nf depends upon + items: + description: "ObjectReference contains enough information to let + you inspect or modify the referred object. --- New uses of this + type are discouraged because of difficulty describing its usage + when embedded in APIs. 1. Ignored fields. It includes many fields + which are not generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in actual usage. 2. Invalid + usage help. It is impossible to add specific help for individual + usage. In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not honored\" + or \"name must be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because the usages + are different, the validation rules are different by usage, which + makes it hard for users to predict what will happen. 4. The fields + are both imprecise and overly precise. Kind is not a precise + mapping to a URL. This can produce ambiguity during interpretation + and require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual struct + is irrelevant. 5. We cannot easily change it. Because this type + is embedded in many locations, updates to this type will affect + numerous schemas. Don't make new APIs embed an underspecified + API type they do not control. \n Instead of using this type, create + a locally provided and used type that is well-focused on your + reference. For example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + interfaces: + description: Interfaces defines the interfaces associated with the + NF deployment + items: + description: InterfaceConfig defines the configuration of the interface + properties: + ipv4: + description: IPv4 defines the ipv4 configuration of the interface + properties: + address: + description: Address defines the IPv4 address and prefix + length in CIDR notation [IP prefix, range IPv4 with host + bits] + type: string + gateway: + description: Gateway defines the IPv4 address associated + to the interface as a gateway + type: string + required: + - address + type: object + ipv6: + description: IPv6Config defines the ipv6 configuration of the + interface + properties: + address: + description: Address defines the IPv6 address and prefix + length in CIDR notation [IP prefix, range IPv6 with host + bits] + type: string + gateway: + description: Gateway defines the IPv6 address associated + to the interface as a gateway + type: string + required: + - address + type: object + name: + description: Name defines the name of the interface + maxLength: 253 + minLength: 1 + type: string + vlanID: + description: VLANID defines the specific vlan id associated + on this interface + type: integer + required: + - name + type: object + type: array + networkInstances: + description: NetworkInstances defines the network instances associated + with the NF deployment + items: + description: A networkInstance is a Layer 3 forwarding construct + such as a virtual routing and forwarding (VRF) instance, + properties: + bgp: + description: BGP defines the BGP configuration associated with + the network instance + properties: + autonomousSystem: + description: AutonomousSystem defines the AS number of the + bgp process + type: integer + bgpNeighbors: + description: BGPNeigbors defines the configuration of the + BGP neighbor + items: + properties: + address: + description: Address defines the IPv4 or IPv6 address + of the BGP neighbor + type: string + name: + description: BGP interface name, MUST match the one + use in InterfaceConfig + type: string + peerAS: + description: PeerAS defines the AS number of the bgp + peer + type: integer + required: + - address + - peerAS + type: object + type: array + routerID: + description: RouterID defines the router ID of the bgp process + type: string + required: + - autonomousSystem + - bgpNeighbors + - routerID + type: object + dataNetworks: + description: DataNetworks defines the data networks assocated + with the network instance + items: + description: A DataNetwork defines the Data Network name defined + by 3GPP + properties: + name: + description: Name defines the name of the data network + maxLength: 253 + minLength: 1 + type: string + pool: + description: Pool defines the list of address pools associated + with the data network + items: + properties: + prefix: + description: Prefix defines the ip cidr in prefix + notation. It is defines as a subnet + pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) + type: string + required: + - prefix + type: object + type: array + type: object + type: array + interfaces: + description: interfaces defines the interfaces associated with + the network instance + items: + type: string + type: array + name: + description: Name defines the name of the network instance + maxLength: 253 + minLength: 1 + type: string + peers: + description: Peers defines the peer configuration associated + with the network instance + items: + description: A PeerConfig defines the peer configuration + properties: + ipv4: + description: IPv4 defines the ipv4 configuration of the + peer + properties: + address: + description: Address defines the IPv4 address and + prefix length in CIDR notation [IP prefix, range + IPv4 with host bits] + type: string + gateway: + description: Gateway defines the IPv4 address associated + to the interface as a gateway + type: string + required: + - address + type: object + ipv6: + description: IPv6 defines the ipv6 configuration of the + peer + properties: + address: + description: Address defines the IPv6 address and + prefix length in CIDR notation [IP prefix, range + IPv6 with host bits] + type: string + gateway: + description: Gateway defines the IPv6 address associated + to the interface as a gateway + type: string + required: + - address + type: object + name: + description: Name defines the name of the data network + maxLength: 253 + minLength: 1 + type: string + type: object + type: array + required: + - name + type: object + type: array + type: object + status: + properties: + conditions: + description: Conditions define the current state of the NF deployment + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the deployment controller. + format: int32 + type: integer + required: + - observedGeneration + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/crd/bases/workload.nephio.org_upfdeployments.yaml b/nephio/core/nephio-operator/crd/bases/workload.nephio.org_upfdeployments.yaml new file mode 100644 index 0000000..5839f61 --- /dev/null +++ b/nephio/core/nephio-operator/crd/bases/workload.nephio.org_upfdeployments.yaml @@ -0,0 +1,400 @@ +--- +apiVersion: apiextensions.k8s.io/v1 +kind: CustomResourceDefinition +metadata: + annotations: + controller-gen.kubebuilder.io/version: v0.9.2 + creationTimestamp: null + name: upfdeployments.workload.nephio.org +spec: + group: workload.nephio.org + names: + kind: UPFDeployment + listKind: UPFDeploymentList + plural: upfdeployments + singular: upfdeployment + scope: Namespaced + versions: + - name: v1alpha1 + schema: + openAPIV3Schema: + properties: + apiVersion: + description: 'APIVersion defines the versioned schema of this representation + of an object. Servers should convert recognized schemas to the latest + internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources' + type: string + kind: + description: 'Kind is a string value representing the REST resource this + object represents. Servers may infer this from the endpoint the client + submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + metadata: + type: object + spec: + properties: + capacity: + description: capacity defines the capacity characteristics of the + NF deployment + properties: + maxDownlinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxDownlinkThroughput defines the max downlink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + maxNFConnections: + description: MaxNFConnections defines the max NF(s) that can be + connected to this NF/device + type: integer + maxSessions: + description: MaxSessions defines the max sessions of the control + plane expressed in unit of 1000s + type: integer + maxSubscribers: + description: MaxSubscribers defines the max subscribers expressed + in unit of 1000s + type: integer + maxUplinkThroughput: + anyOf: + - type: integer + - type: string + description: MaxUplinkThroughput defines the max uplink dataplane + throughput + pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$ + x-kubernetes-int-or-string: true + type: object + configRefs: + description: configRef defines addiitonal configuration references + the nf depends upon + items: + description: "ObjectReference contains enough information to let + you inspect or modify the referred object. --- New uses of this + type are discouraged because of difficulty describing its usage + when embedded in APIs. 1. Ignored fields. It includes many fields + which are not generally honored. For instance, ResourceVersion + and FieldPath are both very rarely valid in actual usage. 2. Invalid + usage help. It is impossible to add specific help for individual + usage. In most embedded usages, there are particular restrictions + like, \"must refer only to types A and B\" or \"UID not honored\" + or \"name must be restricted\". Those cannot be well described + when embedded. 3. Inconsistent validation. Because the usages + are different, the validation rules are different by usage, which + makes it hard for users to predict what will happen. 4. The fields + are both imprecise and overly precise. Kind is not a precise + mapping to a URL. This can produce ambiguity during interpretation + and require a REST mapping. In most cases, the dependency is + on the group,resource tuple and the version of the actual struct + is irrelevant. 5. We cannot easily change it. Because this type + is embedded in many locations, updates to this type will affect + numerous schemas. Don't make new APIs embed an underspecified + API type they do not control. \n Instead of using this type, create + a locally provided and used type that is well-focused on your + reference. For example, ServiceReferences for admission registration: + https://github.com/kubernetes/api/blob/release-1.17/admissionregistration/v1/types.go#L533 + ." + properties: + apiVersion: + description: API version of the referent. + type: string + fieldPath: + description: 'If referring to a piece of an object instead of + an entire object, this string should contain a valid JSON/Go + field access statement, such as desiredState.manifest.containers[2]. + For example, if the object reference is to a container within + a pod, this would take on a value like: "spec.containers{name}" + (where "name" refers to the name of the container that triggered + the event) or if no container name is specified "spec.containers[2]" + (container with index 2 in this pod). This syntax is chosen + only to have some well-defined way of referencing a part of + an object. TODO: this design is not final and this field is + subject to change in the future.' + type: string + kind: + description: 'Kind of the referent. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds' + type: string + name: + description: 'Name of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#names' + type: string + namespace: + description: 'Namespace of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/namespaces/' + type: string + resourceVersion: + description: 'Specific resourceVersion to which this reference + is made, if any. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#concurrency-control-and-consistency' + type: string + uid: + description: 'UID of the referent. More info: https://kubernetes.io/docs/concepts/overview/working-with-objects/names/#uids' + type: string + type: object + x-kubernetes-map-type: atomic + type: array + interfaces: + description: Interfaces defines the interfaces associated with the + NF deployment + items: + description: InterfaceConfig defines the configuration of the interface + properties: + ipv4: + description: IPv4 defines the ipv4 configuration of the interface + properties: + address: + description: Address defines the IPv4 address and prefix + length in CIDR notation [IP prefix, range IPv4 with host + bits] + type: string + gateway: + description: Gateway defines the IPv4 address associated + to the interface as a gateway + type: string + required: + - address + type: object + ipv6: + description: IPv6Config defines the ipv6 configuration of the + interface + properties: + address: + description: Address defines the IPv6 address and prefix + length in CIDR notation [IP prefix, range IPv6 with host + bits] + type: string + gateway: + description: Gateway defines the IPv6 address associated + to the interface as a gateway + type: string + required: + - address + type: object + name: + description: Name defines the name of the interface + maxLength: 253 + minLength: 1 + type: string + vlanID: + description: VLANID defines the specific vlan id associated + on this interface + type: integer + required: + - name + type: object + type: array + networkInstances: + description: NetworkInstances defines the network instances associated + with the NF deployment + items: + description: A networkInstance is a Layer 3 forwarding construct + such as a virtual routing and forwarding (VRF) instance, + properties: + bgp: + description: BGP defines the BGP configuration associated with + the network instance + properties: + autonomousSystem: + description: AutonomousSystem defines the AS number of the + bgp process + type: integer + bgpNeighbors: + description: BGPNeigbors defines the configuration of the + BGP neighbor + items: + properties: + address: + description: Address defines the IPv4 or IPv6 address + of the BGP neighbor + type: string + name: + description: BGP interface name, MUST match the one + use in InterfaceConfig + type: string + peerAS: + description: PeerAS defines the AS number of the bgp + peer + type: integer + required: + - address + - peerAS + type: object + type: array + routerID: + description: RouterID defines the router ID of the bgp process + type: string + required: + - autonomousSystem + - bgpNeighbors + - routerID + type: object + dataNetworks: + description: DataNetworks defines the data networks assocated + with the network instance + items: + description: A DataNetwork defines the Data Network name defined + by 3GPP + properties: + name: + description: Name defines the name of the data network + maxLength: 253 + minLength: 1 + type: string + pool: + description: Pool defines the list of address pools associated + with the data network + items: + properties: + prefix: + description: Prefix defines the ip cidr in prefix + notation. It is defines as a subnet + pattern: (([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])/(([0-9])|([1-2][0-9])|(3[0-2]))|((:|[0-9a-fA-F]{0,4}):)([0-9a-fA-F]{0,4}:){0,5}((([0-9a-fA-F]{0,4}:)?(:|[0-9a-fA-F]{0,4}))|(((25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])\.){3}(25[0-5]|2[0-4][0-9]|[01]?[0-9]?[0-9])))(/(([0-9])|([0-9]{2})|(1[0-1][0-9])|(12[0-8]))) + type: string + required: + - prefix + type: object + type: array + type: object + type: array + interfaces: + description: interfaces defines the interfaces associated with + the network instance + items: + type: string + type: array + name: + description: Name defines the name of the network instance + maxLength: 253 + minLength: 1 + type: string + peers: + description: Peers defines the peer configuration associated + with the network instance + items: + description: A PeerConfig defines the peer configuration + properties: + ipv4: + description: IPv4 defines the ipv4 configuration of the + peer + properties: + address: + description: Address defines the IPv4 address and + prefix length in CIDR notation [IP prefix, range + IPv4 with host bits] + type: string + gateway: + description: Gateway defines the IPv4 address associated + to the interface as a gateway + type: string + required: + - address + type: object + ipv6: + description: IPv6 defines the ipv6 configuration of the + peer + properties: + address: + description: Address defines the IPv6 address and + prefix length in CIDR notation [IP prefix, range + IPv6 with host bits] + type: string + gateway: + description: Gateway defines the IPv6 address associated + to the interface as a gateway + type: string + required: + - address + type: object + name: + description: Name defines the name of the data network + maxLength: 253 + minLength: 1 + type: string + type: object + type: array + required: + - name + type: object + type: array + type: object + status: + properties: + conditions: + description: Conditions define the current state of the NF deployment + items: + description: "Condition contains details for one aspect of the current + state of this API Resource. --- This struct is intended for direct + use as an array at the field path .status.conditions. For example, + \n type FooStatus struct{ // Represents the observations of a + foo's current state. // Known .status.conditions.type are: \"Available\", + \"Progressing\", and \"Degraded\" // +patchMergeKey=type // +patchStrategy=merge + // +listType=map // +listMapKey=type Conditions []metav1.Condition + `json:\"conditions,omitempty\" patchStrategy:\"merge\" patchMergeKey:\"type\" + protobuf:\"bytes,1,rep,name=conditions\"` \n // other fields }" + properties: + lastTransitionTime: + description: lastTransitionTime is the last time the condition + transitioned from one status to another. This should be when + the underlying condition changed. If that is not known, then + using the time when the API field changed is acceptable. + format: date-time + type: string + message: + description: message is a human readable message indicating + details about the transition. This may be an empty string. + maxLength: 32768 + type: string + observedGeneration: + description: observedGeneration represents the .metadata.generation + that the condition was set based upon. For instance, if .metadata.generation + is currently 12, but the .status.conditions[x].observedGeneration + is 9, the condition is out of date with respect to the current + state of the instance. + format: int64 + minimum: 0 + type: integer + reason: + description: reason contains a programmatic identifier indicating + the reason for the condition's last transition. Producers + of specific condition types may define expected values and + meanings for this field, and whether the values are considered + a guaranteed API. The value should be a CamelCase string. + This field may not be empty. + maxLength: 1024 + minLength: 1 + pattern: ^[A-Za-z]([A-Za-z0-9_,:]*[A-Za-z0-9_])?$ + type: string + status: + description: status of the condition, one of True, False, Unknown. + enum: + - "True" + - "False" + - Unknown + type: string + type: + description: type of condition in CamelCase or in foo.example.com/CamelCase. + --- Many .condition.type values are consistent across resources + like Available, but because arbitrary conditions can be useful + (see .node.status.conditions), the ability to deconflict is + important. The regex it matches is (dns1123SubdomainFmt/)?(qualifiedNameFmt) + maxLength: 316 + pattern: ^([a-z0-9]([-a-z0-9]*[a-z0-9])?(\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*/)?(([A-Za-z0-9][-A-Za-z0-9_.]*)?[A-Za-z0-9])$ + type: string + required: + - lastTransitionTime + - message + - reason + - status + - type + type: object + type: array + observedGeneration: + description: The generation observed by the deployment controller. + format: int32 + type: integer + required: + - observedGeneration + type: object + type: object + served: true + storage: true + subresources: + status: {} diff --git a/nephio/core/nephio-operator/namespace.yaml b/nephio/core/nephio-operator/namespace.yaml new file mode 100644 index 0000000..5e6b14e --- /dev/null +++ b/nephio/core/nephio-operator/namespace.yaml @@ -0,0 +1,4 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: nephio-system