diff --git a/.wordlist.txt b/.wordlist.txt index 9fd310be..b7e66995 100644 --- a/.wordlist.txt +++ b/.wordlist.txt @@ -137,7 +137,6 @@ SetNadMaster SIG SiteCode SMF -SMFDeployment snetworkplumbingwg specializer sriov @@ -146,7 +145,7 @@ toolchain TypeOf UnMarshal UPF -UPFDeployment +NFDeployment URI VLAN VLANAllocation diff --git a/controllers/pkg/go.mod b/controllers/pkg/go.mod index dc01c61d..d56db753 100644 --- a/controllers/pkg/go.mod +++ b/controllers/pkg/go.mod @@ -20,7 +20,7 @@ require ( github.com/go-logr/logr v1.2.4 github.com/google/go-cmp v0.5.9 github.com/henderiw-nephio/network v0.0.0-20230626193806-04743403261e - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/configinject-fn v0.0.0-00010101000000-000000000000 github.com/nephio-project/nephio/krm-functions/ipam-fn v0.0.0-00010101000000-000000000000 github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230605213956-a1e470f419a4 diff --git a/controllers/pkg/go.sum b/controllers/pkg/go.sum index c4df3037..fcda91c6 100644 --- a/controllers/pkg/go.sum +++ b/controllers/pkg/go.sum @@ -150,8 +150,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 h1:4v0n24tsumwuz1BDGKoGWxZMFtqAlYpI87gE/enMUUI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= diff --git a/krm-functions/configinject-fn/fn/function.go b/krm-functions/configinject-fn/fn/function.go index a7fb2e3b..4963e367 100644 --- a/krm-functions/configinject-fn/fn/function.go +++ b/krm-functions/configinject-fn/fn/function.go @@ -334,7 +334,7 @@ func BuildConfig(meta metav1.ObjectMeta, spec nephiorefv1alpha1.ConfigSpec) *nep func getForName(annotations map[string]string) string { // forName is the resource that is the root resource of the specialization - // e.g. UPFDeployment, SMFDeployment, AMFDeployment + // e.g. NFDeployment forFullName := annotations[condkptsdk.SpecializerOwner] if owner, ok := annotations[condkptsdk.SpecializerFor]; ok { forFullName = owner diff --git a/krm-functions/configinject-fn/go.mod b/krm-functions/configinject-fn/go.mod index 24e49434..2cee94d5 100644 --- a/krm-functions/configinject-fn/go.mod +++ b/krm-functions/configinject-fn/go.mod @@ -8,7 +8,7 @@ require ( github.com/GoogleContainerTools/kpt v1.0.0-beta.29.0.20230327202912-01513604feaa github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d github.com/GoogleContainerTools/kpt/porch/api v0.0.0-20230608012444-ee7c8cf378e9 - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/lib v0.0.0-00010101000000-000000000000 k8s.io/api v0.27.3 k8s.io/apimachinery v0.27.3 diff --git a/krm-functions/configinject-fn/go.sum b/krm-functions/configinject-fn/go.sum index a946832c..413ccd1d 100644 --- a/krm-functions/configinject-fn/go.sum +++ b/krm-functions/configinject-fn/go.sum @@ -123,8 +123,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c h1:zNeqCNUXERQOPbFvcDv8zbEGtZSpTWar/fgqwvKKklo= github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= diff --git a/krm-functions/dnn-fn/fn/function.go b/krm-functions/dnn-fn/fn/function.go index 4ef1d69f..ffdf97d9 100644 --- a/krm-functions/dnn-fn/fn/function.go +++ b/krm-functions/dnn-fn/fn/function.go @@ -206,7 +206,7 @@ func getAnnotations(annotations map[string]string) map[string]string { func getForName(annotations map[string]string) string { // forName is the resource that is the root resource of the specialization - // e.g. UPFDeployment, SMFDeployment, AMFDeployment + // e.g. NFDeployment forFullName := annotations[condkptsdk.SpecializerOwner] if owner, ok := annotations[condkptsdk.SpecializerFor]; ok { forFullName = owner diff --git a/krm-functions/dnn-fn/fn/testdata/create_owned_resources/_expected.yaml b/krm-functions/dnn-fn/fn/testdata/create_owned_resources/_expected.yaml index 564d0ec2..e28e69de 100644 --- a/krm-functions/dnn-fn/fn/testdata/create_owned_resources/_expected.yaml +++ b/krm-functions/dnn-fn/fn/testdata/create_owned_resources/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-internet-pool1 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.DataNetwork.internet spec: kind: pool @@ -69,7 +69,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/dnn-fn/fn/testdata/create_owned_resources/dnn.yaml b/krm-functions/dnn-fn/fn/testdata/create_owned_resources/dnn.yaml index fd9e932f..81fe9eac 100644 --- a/krm-functions/dnn-fn/fn/testdata/create_owned_resources/dnn.yaml +++ b/krm-functions/dnn-fn/fn/testdata/create_owned_resources/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/Kptfile b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/Kptfile index c6febfae..35884d28 100644 --- a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/Kptfile +++ b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/Kptfile @@ -12,7 +12,7 @@ pipeline: {} status: conditions: - message: update for condition - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: done diff --git a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/_expected.yaml b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/_expected.yaml index 312eb748..cfa24a15 100644 --- a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/_expected.yaml +++ b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-internet-pool1 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.DataNetwork.internet spec: kind: pool @@ -48,7 +48,7 @@ items: status: conditions: - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: done @@ -70,7 +70,7 @@ items: name: internet annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 prefix: 10.0.0.0/8 specializer.nephio.org/debug: "true" spec: diff --git a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/dnn.yaml b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/dnn.yaml index 78110b43..d0a0be1f 100644 --- a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/dnn.yaml +++ b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/dnn.yaml @@ -4,7 +4,7 @@ metadata: name: internet annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 prefix: 10.0.0.0/8 specializer.nephio.org/debug: "true" spec: diff --git a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/ipclaim.yaml b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/ipclaim.yaml index 6b35292f..a882e514 100644 --- a/krm-functions/dnn-fn/fn/testdata/set_dnn_status/ipclaim.yaml +++ b/krm-functions/dnn-fn/fn/testdata/set_dnn_status/ipclaim.yaml @@ -4,7 +4,7 @@ metadata: name: upf-cluster01-internet-pool1 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.DataNetwork.internet spec: kind: pool diff --git a/krm-functions/dnn-fn/go.mod b/krm-functions/dnn-fn/go.mod index 01d31a84..4cd64f76 100644 --- a/krm-functions/dnn-fn/go.mod +++ b/krm-functions/dnn-fn/go.mod @@ -6,7 +6,7 @@ replace github.com/nephio-project/nephio/krm-functions/lib => ../lib require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230605213956-a1e470f419a4 github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 k8s.io/api v0.27.3 diff --git a/krm-functions/dnn-fn/go.sum b/krm-functions/dnn-fn/go.sum index 7333136b..1483253b 100644 --- a/krm-functions/dnn-fn/go.sum +++ b/krm-functions/dnn-fn/go.sum @@ -120,8 +120,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 h1:4v0n24tsumwuz1BDGKoGWxZMFtqAlYpI87gE/enMUUI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= diff --git a/krm-functions/gen-configmap-fn/go.mod b/krm-functions/gen-configmap-fn/go.mod index 1986f885..1d9a6dd7 100644 --- a/krm-functions/gen-configmap-fn/go.mod +++ b/krm-functions/gen-configmap-fn/go.mod @@ -8,6 +8,7 @@ require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d github.com/stretchr/testify v1.8.2 k8s.io/apimachinery v0.27.3 + sigs.k8s.io/kustomize/kyaml v0.14.2 ) require ( @@ -44,6 +45,5 @@ require ( k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect k8s.io/utils v0.0.0-20230505201702-9f6742963106 // indirect sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect - sigs.k8s.io/kustomize/kyaml v0.14.2 // indirect sigs.k8s.io/structured-merge-diff/v4 v4.2.3 // indirect ) diff --git a/krm-functions/interface-fn/fn/function.go b/krm-functions/interface-fn/fn/function.go index c31d5d71..61f38b6e 100644 --- a/krm-functions/interface-fn/fn/function.go +++ b/krm-functions/interface-fn/fn/function.go @@ -328,7 +328,7 @@ func getAnnotations(annotations map[string]string) map[string]string { func getForName(annotations map[string]string) string { // forName is the resource that is the root resource of the specialization - // e.g. UPFDeployment, SMFDeployment, AMFDeployment + // e.g. NFDeployment forFullName := annotations[condkptsdk.SpecializerOwner] if owner, ok := annotations[condkptsdk.SpecializerFor]; ok { forFullName = owner diff --git a/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/_expected.yaml b/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/_expected.yaml index 5c6bae64..72f475f9 100644 --- a/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/_expected.yaml @@ -19,7 +19,7 @@ items: name: upf-cluster01-n4-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: kind: network @@ -67,7 +67,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -80,7 +80,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -93,7 +93,7 @@ items: name: upf-cluster01-n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: diff --git a/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n3.yaml b/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n3.yaml index 8e1ea8aa..2a10fa85 100644 --- a/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n3.yaml +++ b/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n4.yaml b/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n4.yaml index 5b3ff4a3..afeeeb83 100644 --- a/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n4.yaml +++ b/krm-functions/interface-fn/fn/testdata/cni_mismatch_partial/interface_n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/_expected.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/_expected.yaml index be5248f4..ea4da4aa 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -61,7 +61,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/interface.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/interface.yaml index aca750e9..5eb06d58 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/interface.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_novlan/interface.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/Kptfile b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/Kptfile index cabb380b..ad6a5c01 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/Kptfile +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/Kptfile @@ -12,9 +12,9 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/_expected.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/_expected.yaml index 66f0d431..87ddfdd3 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -38,7 +38,7 @@ items: name: upf-cluster01-n3-ipv6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -64,12 +64,12 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: create initial resource reason: req.nephio.org/v1alpha1.Interface.n3 status: "False" @@ -93,7 +93,7 @@ items: annotations: nephio.org/network-name: n3 config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -107,7 +107,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -115,8 +115,10 @@ items: name: cluster01 status: {} - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 annotations: specializer.nephio.org/debug: "true" + spec: + provider: upf.free5gc.io diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/interface.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/interface.yaml index bed2d380..2623b28e 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/interface.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/interface.yaml @@ -5,7 +5,7 @@ metadata: annotations: nephio.org/network-name: n3 config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/upfdeployment.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/upfdeployment.yaml index fb4b1b44..ee4ac9c4 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/upfdeployment.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-dualstack/upfdeployment.yaml @@ -1,6 +1,8 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 annotations: - specializer.nephio.org/debug: "true" \ No newline at end of file + specializer.nephio.org/debug: "true" +spec: + provider: upf.free5gc.io \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/Kptfile b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/Kptfile index cabb380b..ad6a5c01 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/Kptfile +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/Kptfile @@ -12,9 +12,9 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/_expected.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/_expected.yaml index 0f007f53..72c1f500 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-n3-ipv6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -46,12 +46,12 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: create initial resource reason: req.nephio.org/v1alpha1.Interface.n3 status: "False" @@ -71,7 +71,7 @@ items: annotations: nephio.org/network-name: n3 config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -85,7 +85,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -93,8 +93,10 @@ items: name: cluster01 status: {} - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 annotations: specializer.nephio.org/debug: "true" + spec: + provider: upf.free5gc.io diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/interface.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/interface.yaml index ee02c52d..90c50529 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/interface.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/interface.yaml @@ -5,7 +5,7 @@ metadata: annotations: nephio.org/network-name: n3 config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/upfdeployment.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/upfdeployment.yaml index fb4b1b44..ee4ac9c4 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/upfdeployment.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan-ipv6only/upfdeployment.yaml @@ -1,6 +1,8 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 annotations: - specializer.nephio.org/debug: "true" \ No newline at end of file + specializer.nephio.org/debug: "true" +spec: + provider: upf.free5gc.io \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/Kptfile b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/Kptfile index cabb380b..ad6a5c01 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/Kptfile +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/Kptfile @@ -12,9 +12,9 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/_expected.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/_expected.yaml index d1ae41fa..5456918f 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -45,12 +45,12 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: create initial resource reason: req.nephio.org/v1alpha1.Interface.n3 status: "False" @@ -69,7 +69,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -82,7 +82,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -90,8 +90,10 @@ items: name: cluster01 status: {} - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 annotations: specializer.nephio.org/debug: "true" + spec: + provider: upf.free5gc.io diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/interface.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/interface.yaml index 8e1ea8aa..2a10fa85 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/interface.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/interface.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/upfdeployment.yaml b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/upfdeployment.yaml index fb4b1b44..ee4ac9c4 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/upfdeployment.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_cni_vlan/upfdeployment.yaml @@ -1,6 +1,8 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 annotations: - specializer.nephio.org/debug: "true" \ No newline at end of file + specializer.nephio.org/debug: "true" +spec: + provider: upf.free5gc.io \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/interface_loopback/_expected.yaml b/krm-functions/interface-fn/fn/testdata/interface_loopback/_expected.yaml index 59496a75..2f0c3553 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_loopback/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_loopback/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: loopback @@ -57,7 +57,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/interface_loopback/interface.yaml b/krm-functions/interface-fn/fn/testdata/interface_loopback/interface.yaml index 539d2112..c2c90c98 100644 --- a/krm-functions/interface-fn/fn/testdata/interface_loopback/interface.yaml +++ b/krm-functions/interface-fn/fn/testdata/interface_loopback/interface.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/interface-fn/fn/testdata/set_status/Kptfile b/krm-functions/interface-fn/fn/testdata/set_status/Kptfile index f173942d..0e5fa83e 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/Kptfile +++ b/krm-functions/interface-fn/fn/testdata/set_status/Kptfile @@ -24,7 +24,7 @@ status: status: "True" type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.upf-cluster01-n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n3 - message: create resource @@ -33,4 +33,4 @@ status: type: vlan.resource.nephio.org/v1alpha1.VLANClaim.upf-cluster01-n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/set_status/_expected.yaml b/krm-functions/interface-fn/fn/testdata/set_status/_expected.yaml index ce073e59..eba5f316 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/_expected.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/_expected.yaml @@ -20,7 +20,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -39,7 +39,7 @@ items: name: upf-cluster01-n3-ipv6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -57,7 +57,7 @@ items: metadata: name: upf-cluster01-n3 annotations: - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: config: '{"cniVersion":"0.3.1","vlan":2,"plugins":[{"type":"macvlan","capabilities":{"ips":true},"master":"eth1","mode":"bridge","ipam":{"type":"static","addresses":[{"address":"172.1.2.254/24","gateway":"172.1.2.1"}]}},{"type":"tuning","capabilities":{"mac":true},"ipam":{}}]}' @@ -87,7 +87,7 @@ items: status: "True" type: k8s.cni.cncf.io/v1.NetworkAttachmentDefinition.upf-cluster01-n3 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: create resource @@ -96,14 +96,14 @@ items: type: vlan.resource.nephio.org/v1alpha1.VLANClaim.upf-cluster01-n3 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - apiVersion: req.nephio.org/v1alpha1 kind: Interface metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/debug: "true" spec: networkInstance: @@ -125,7 +125,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -134,8 +134,10 @@ items: status: vlanID: 10 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 annotations: specializer.nephio.org/debug: "true" + spec: + provider: upf.free5gc.io diff --git a/krm-functions/interface-fn/fn/testdata/set_status/interface.yaml b/krm-functions/interface-fn/fn/testdata/set_status/interface.yaml index 8a0f91dc..7a8608ca 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/interface.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/interface.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/debug: "true" spec: networkInstance: diff --git a/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv4.yaml b/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv4.yaml index 48aa9d14..02bc6a72 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv4.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv4.yaml @@ -4,7 +4,7 @@ metadata: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network diff --git a/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv6.yaml b/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv6.yaml index f430938f..2119d61c 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv6.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/ipclaim-cluster01-n3-ipv6.yaml @@ -4,7 +4,7 @@ metadata: name: upf-cluster01-n3-ipv6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network diff --git a/krm-functions/interface-fn/fn/testdata/set_status/network_sttach_def.yaml b/krm-functions/interface-fn/fn/testdata/set_status/network_sttach_def.yaml index 64cc0b19..02550ac0 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/network_sttach_def.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/network_sttach_def.yaml @@ -3,7 +3,7 @@ kind: NetworkAttachmentDefinition metadata: name: upf-cluster01-n3 annotations: - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: config: '{"cniVersion":"0.3.1","vlan":2,"plugins":[{"type":"macvlan","capabilities":{"ips":true},"master":"eth1","mode":"bridge","ipam":{"type":"static","addresses":[{"address":"172.1.2.254/24","gateway":"172.1.2.1"}]}},{"type":"tuning","capabilities":{"mac":true},"ipam":{}}]}' \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/set_status/upfdeployment.yaml b/krm-functions/interface-fn/fn/testdata/set_status/upfdeployment.yaml index fb4b1b44..ee4ac9c4 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/upfdeployment.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/upfdeployment.yaml @@ -1,6 +1,8 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 annotations: - specializer.nephio.org/debug: "true" \ No newline at end of file + specializer.nephio.org/debug: "true" +spec: + provider: upf.free5gc.io \ No newline at end of file diff --git a/krm-functions/interface-fn/fn/testdata/set_status/vlanclaim.yaml b/krm-functions/interface-fn/fn/testdata/set_status/vlanclaim.yaml index a36da388..0a0cc183 100644 --- a/krm-functions/interface-fn/fn/testdata/set_status/vlanclaim.yaml +++ b/krm-functions/interface-fn/fn/testdata/set_status/vlanclaim.yaml @@ -4,7 +4,7 @@ metadata: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: diff --git a/krm-functions/interface-fn/go.mod b/krm-functions/interface-fn/go.mod index 96b538e0..62601aed 100644 --- a/krm-functions/interface-fn/go.mod +++ b/krm-functions/interface-fn/go.mod @@ -7,7 +7,7 @@ replace github.com/nephio-project/nephio/krm-functions/lib => ../lib require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0 - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230605213956-a1e470f419a4 github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 k8s.io/api v0.27.3 diff --git a/krm-functions/interface-fn/go.sum b/krm-functions/interface-fn/go.sum index 84874710..9c739994 100644 --- a/krm-functions/interface-fn/go.sum +++ b/krm-functions/interface-fn/go.sum @@ -121,8 +121,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 h1:4v0n24tsumwuz1BDGKoGWxZMFtqAlYpI87gE/enMUUI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= diff --git a/krm-functions/nad-fn/fn/function.go b/krm-functions/nad-fn/fn/function.go index 1ea65408..e3bd0270 100644 --- a/krm-functions/nad-fn/fn/function.go +++ b/krm-functions/nad-fn/fn/function.go @@ -321,7 +321,7 @@ func containsDestination(s []nadlibv1.Route, e string) bool { func getForName(annotations map[string]string) string { // forName is the resource that is the root resource of the specialization - // e.g. UPFDeployment, SMFDeployment, AMFDeployment + // e.g. NFDeployment forFullName := annotations[condkptsdk.SpecializerOwner] if owner, ok := annotations[condkptsdk.SpecializerFor]; ok { forFullName = owner diff --git a/krm-functions/nad-fn/fn/testdata/empty_cni/_expected.yaml b/krm-functions/nad-fn/fn/testdata/empty_cni/_expected.yaml index 533bdda5..dcdd2538 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_cni/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_cni/_expected.yaml @@ -126,7 +126,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -140,7 +140,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -154,7 +154,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n3.yaml index 3156186e..5f4e0b73 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n4.yaml index 91ea4145..fc0d8a4b 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n6.yaml index f8949390..16282b76 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_cni/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/_expected.yaml b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/_expected.yaml index f9a42a1e..4b5e8c74 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/_expected.yaml @@ -151,7 +151,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -165,7 +165,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -179,7 +179,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/empty_ipamaddress/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/_expected.yaml index 72c19306..225a0329 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/_expected.yaml @@ -235,7 +235,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -249,7 +249,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -263,7 +263,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n3.yaml index 6f2bdeaa..8cae71b4 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n4.yaml index 85dbe7cd..fdc1863b 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n6.yaml index a2a1d9be..35f1a401 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/_expected.yaml index d6dcbf23..16c4d533 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/_expected.yaml @@ -295,7 +295,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -309,7 +309,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -323,7 +323,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/_expected.yaml index 182e3574..5f6d5942 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/_expected.yaml @@ -245,7 +245,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -259,7 +259,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -273,7 +273,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_dual_stack_redundant/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/_expected.yaml index 58a93295..5fa4d2be 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/_expected.yaml @@ -153,7 +153,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -167,7 +167,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -181,7 +181,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/create_full_resources_ipv6/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/_expected.yaml index 55cb1714..ed628585 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/_expected.yaml @@ -153,7 +153,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -167,7 +167,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -181,7 +181,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/empty_nad_masterinterface/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/_expected.yaml index 410aef24..03709004 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/_expected.yaml @@ -191,7 +191,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -205,7 +205,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -219,7 +219,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/existing_nad_resources/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/_expected.yaml index 28c2742e..612fff5b 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/_expected.yaml @@ -142,7 +142,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -156,7 +156,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -170,7 +170,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n3.yaml index 6f2bdeaa..8cae71b4 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n4.yaml index 85dbe7cd..fdc1863b 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n6.yaml index a2a1d9be..35f1a401 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/ipclaim_notReady/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/_expected.yaml index ac8e67a9..4f868f71 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/_expected.yaml @@ -152,7 +152,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -166,7 +166,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -180,7 +180,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n3.yaml index 6f2bdeaa..8cae71b4 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n4.yaml index 85dbe7cd..fdc1863b 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n6.yaml index a2a1d9be..35f1a401 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_ipvlanType/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/_expected.yaml index 165bf42d..57feb962 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/_expected.yaml @@ -152,7 +152,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -166,7 +166,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -180,7 +180,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n3.yaml index 6c9be7b1..9f2b4c11 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n4.yaml index 7b6ecabc..b1138c9a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n6.yaml index 5eff674f..06d869f9 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_macvlanType/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/_expected.yaml index c3a6f411..a80554ca 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/_expected.yaml @@ -154,7 +154,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -168,7 +168,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -182,7 +182,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_ipclaim_sriovType/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/_expected.yaml index 4d967104..392b9d4a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/_expected.yaml @@ -104,7 +104,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -118,7 +118,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -132,7 +132,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/only_vlanclaim/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/_expected.yaml b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/_expected.yaml index 5ae56e81..9cd71acc 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/_expected.yaml @@ -146,7 +146,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -160,7 +160,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -174,7 +174,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n3.yaml index 6f2bdeaa..8cae71b4 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n4.yaml index 85dbe7cd..fdc1863b 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n6.yaml index a2a1d9be..35f1a401 100644 --- a/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/golden/vlanclaim_notReady/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlan/_expected.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlan/_expected.yaml index 70d3ea50..3db80084 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlan/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlan/_expected.yaml @@ -151,7 +151,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -165,7 +165,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -179,7 +179,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlan/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/_expected.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/_expected.yaml index c1d85277..ba7db872 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/_expected.yaml @@ -54,7 +54,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -68,7 +68,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -82,7 +82,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/missing_vlanclaim_ipclaim/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/_expected.yaml b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/_expected.yaml index 6fd09896..411823e7 100644 --- a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/_expected.yaml +++ b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/_expected.yaml @@ -125,7 +125,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -139,7 +139,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -153,7 +153,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n3.yaml b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n3.yaml index 55421ce0..048453eb 100644 --- a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n3.yaml +++ b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n4.yaml b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n4.yaml index c6013ff6..1691b807 100644 --- a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n4.yaml +++ b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n6.yaml b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n6.yaml index 6e3a5972..f6b1085a 100644 --- a/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n6.yaml +++ b/krm-functions/nad-fn/fn/testdata/workloadcluster_with_mismatch_cni/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/nad-fn/go.mod b/krm-functions/nad-fn/go.mod index d800c17b..a422cf7b 100644 --- a/krm-functions/nad-fn/go.mod +++ b/krm-functions/nad-fn/go.mod @@ -7,7 +7,7 @@ replace github.com/nephio-project/nephio/krm-functions/lib => ../lib require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d github.com/k8snetworkplumbingwg/network-attachment-definition-client v1.4.0 - github.com/nephio-project/api v0.0.0-20230622115552-0304af432fd3 + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230610150432-d22180c74d94 github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c k8s.io/api v0.27.3 diff --git a/krm-functions/nad-fn/go.sum b/krm-functions/nad-fn/go.sum index a18ce67b..64fd15de 100644 --- a/krm-functions/nad-fn/go.sum +++ b/krm-functions/nad-fn/go.sum @@ -121,8 +121,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230622115552-0304af432fd3 h1:7e6RZ+nQJLkB5NzbY8pGSxhzB2OkC3It//z8t3OE23g= -github.com/nephio-project/api v0.0.0-20230622115552-0304af432fd3/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c h1:zNeqCNUXERQOPbFvcDv8zbEGtZSpTWar/fgqwvKKklo= github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/Dockerfile b/krm-functions/nfdeploy-fn/Dockerfile similarity index 94% rename from krm-functions/nfdeploy-fn/amfdeployfn/Dockerfile rename to krm-functions/nfdeploy-fn/Dockerfile index 91b5db60..e896e680 100644 --- a/krm-functions/nfdeploy-fn/amfdeployfn/Dockerfile +++ b/krm-functions/nfdeploy-fn/Dockerfile @@ -16,7 +16,7 @@ FROM golang:1.20-alpine ENV CGO_ENABLED=0 WORKDIR /go/src/ COPY krm-functions/ krm-functions/ -WORKDIR /go/src/krm-functions/nfdeploy-fn/amfdeployfn +WORKDIR /go/src/krm-functions/nfdeploy-fn RUN go install RUN go build -o /usr/local/bin/function ./ diff --git a/krm-functions/nfdeploy-fn/Makefile b/krm-functions/nfdeploy-fn/Makefile index 93609e27..383c7dae 100644 --- a/krm-functions/nfdeploy-fn/Makefile +++ b/krm-functions/nfdeploy-fn/Makefile @@ -1,21 +1,7 @@ -# Copyright 2023 The Nephio Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -.SHELLFLAGS = -ec - -# find all subdirectories with a Dockerfile in them -DOCKERFILE_DIRS = $(shell find . -iname 'Dockerfile' -printf "'%h' " ) +IMAGE_TAG ?= latest +REGISTRY ?= docker.io/nephio +IMAGE_NAME ?= nfdeploy-fn +IMG ?= $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) # This includes the following targets: # test, unit, unit-clean, @@ -23,45 +9,12 @@ DOCKERFILE_DIRS = $(shell find . -iname 'Dockerfile' -printf "'%h' " ) # fmt, vet include ../../default-go.mk +# This includes the following targets: +# docker-build, docker-push +include ../../default-docker.mk + # This includes the 'help' target that prints out all targets with their descriptions organized by categories include ../../default-help.mk .PHONY: all -all: fmt test docker-build docker-push - -##@ Container images - -.PHONY: docker-build docker-push -docker-build: fmt test ## Build container images. - for dir in $(DOCKERFILE_DIRS); do \ - $(MAKE) -C "$$dir" $@ ; \ - done - -docker-push: ## Push container images. - for dir in $(DOCKERFILE_DIRS); do \ - $(MAKE) -C "$$dir" $@ ; \ - done - -.PHONY: upf-docker-build -upf-docker-build: ## Build docker images. - $(MAKE) -C upfdeployfn docker-build - -.PHONY: upf-docker-push -upf-docker-push: ## Build docker images. - $(MAKE) -C upfdeployfn docker-push - -.PHONY: smf-docker-build -smf-docker-build: ## Build docker images. - $(MAKE) -C smfdeployfn docker-build - -.PHONY: smf-docker-push -smf-docker-push: ## Build docker images. - $(MAKE) -C smfdeployfn docker-push - -.PHONY: amf-docker-build -amf-docker-build: ## Build docker images. - $(MAKE) -C amfdeployfn docker-build - -.PHONY: amf-docker-push -amf-docker-push: ## Build docker images. - $(MAKE) -C amfdeployfn docker-push +all: fmt test docker-build docker-push \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/README.md b/krm-functions/nfdeploy-fn/README.md new file mode 100644 index 00000000..0f39a273 --- /dev/null +++ b/krm-functions/nfdeploy-fn/README.md @@ -0,0 +1,32 @@ +# nf-deploy-fn + +## Overview + +The nf-deploy-fn is a KRM function leveraging the `cond sdk` using the `workload.nephio.org/v1alpha1.NFDeployment` as `for` KRM resource. + +The upf deployment function has 3 `watch` resources: +- `req.nephio.org/v1alpha1.Interface` + - For every interface resource status, it will use `status.ipAllocationStatus` and `status.vlanAllocationStatus` fields to populate NFDeployment `spec.interfaces` values. +- `req.nephio.org/v1alpha1.DataNetwork` + - For every datanetwork resource status, it will use `status.pools.ipAllocation` fields to populate NFDeployment `spec.networkInstances` values. +- `req.nephio.org/v1alpha1.Capacity` + - This resource is the source of truth for the capacity details in NFDeployment spec. +- `req.nephio.org/v1alpha1.Dependency` + - For every dependency resource in the package, injected configs will be appended to `spec.parametersRefs`. Dependency is discovery and injection should be done separately. + +The function generates a final resource with the same name as the `Kptfile`. It does not panic or error out if status fields are missing for any resource. It generates the `NFDeployment` using the available data. + +## usage + +``` +kpt fn source | go run main.go +``` + +``` +kpt fn eval --type mutator -i +``` + + +## build + +make docker-build; make docker-push \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/Makefile b/krm-functions/nfdeploy-fn/amfdeployfn/Makefile deleted file mode 100644 index 9c7b1743..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -IMAGE_TAG ?= latest -REGISTRY ?= docker.io/nephio -IMAGE_NAME ?= amf-deploy-fn -IMG ?= $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) - -# This includes the following targets: -# docker-build, docker-push -include ../../../default-docker.mk - -# This includes the 'help' target that prints out all targets with their descriptions organized by categories -include ../../../default-help.mk diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/README.md b/krm-functions/nfdeploy-fn/amfdeployfn/README.md deleted file mode 100644 index 1548fb41..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# amf-deploy-fn - -## Overview - -The amf-deploy-fn is a KRM function leveraging the `cond sdk` using the `workload.nephio.org/v1alpha1.AMFDeployment` as `for` KRM resource. - -The amf deployment function has 3 `watch` resources: -- `req.nephio.org/v1alpha1.Interface` - - For every interface resource status, it will use `status.ipAllocationStatus` and `status.vlanAllocationStatus` fields to populate AMFDeployment `spec.interfaces` values. -- `req.nephio.org/v1alpha1.DataNetwork` - - For every data network resource status, it will use `status.pools.ipAllocation` fields to populate AMFDeployment `spec.networkInstances` values. -- `req.nephio.org/v1alpha1.Capacity` - - This resource is the source of truth for the capacity details in AMFDeployment spec. - -The function generates a final resource with the same name as the `Kptfile`. It does not panic or error out if status fields are missing for any resource. It generates the `AMFDeployment` using the available data. - -## usage - -``` -kpt fn source | go run main.go -``` - -``` -kpt fn eval --type mutator -i -``` - - -## build - -make amf-docker-build; make amf-docker-push \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/golden_test.go b/krm-functions/nfdeploy-fn/amfdeployfn/golden_test.go deleted file mode 100644 index 9fd91250..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/golden_test.go +++ /dev/null @@ -1,31 +0,0 @@ -/* - Copyright 2023 The Nephio Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package main - -import ( - "testing" - - "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" - tst "github.com/nephio-project/nephio/krm-functions/lib/test" -) - -const TestDataPath = "testdata" - -func TestNFDeployFn(t *testing.T) { - fnRunner := fn.ResourceListProcessorFunc(Run) - tst.RunGoldenTests(t, TestDataPath, fnRunner) -} diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/main.go b/krm-functions/nfdeploy-fn/amfdeployfn/main.go deleted file mode 100644 index f96000e3..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/main.go +++ /dev/null @@ -1,37 +0,0 @@ -/* -Copyright 2023 The Nephio Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ - -package main - -import ( - "os" - - "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" - nephiodeployv1alpha1 "github.com/nephio-project/api/nf_deployments/v1alpha1" - "github.com/nephio-project/nephio/krm-functions/nfdeploy-fn/common" -) - -func Run(rl *fn.ResourceList) (bool, error) { - return common.Run[nephiodeployv1alpha1.AMFDeployment](rl, nephiodeployv1alpha1.AMFDeploymentGroupVersionKind) -} - -func main() { - runner := fn.ResourceListProcessorFunc(Run) - - if err := fn.AsMain(runner); err != nil { - os.Exit(1) - } -} diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/amfdeployment.yaml b/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/amfdeployment.yaml deleted file mode 100644 index e0338abb..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/amfdeployment.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: workload.nephio.org/v1alpha1 -kind: AMFDeployment -metadata: - name: amf-cluster01 diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/capacity.yaml b/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/capacity.yaml deleted file mode 100644 index 521fc916..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/capacity.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: Capacity -metadata: - name: controlplane - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 -spec: - maxSubscribers: 10000 diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/interface-n1.yaml b/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/interface-n1.yaml deleted file mode 100644 index 588e79e3..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/interface-n1.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: Interface -metadata: - name: n1 # also used as pfcp - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 -spec: - networkInstance: - name: vpc-internal - cniType: sriov - attachmentType: vlan \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/interface-sba.yaml b/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/interface-sba.yaml deleted file mode 100644 index f37f5fac..00000000 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/interface-sba.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: Interface -metadata: - name: sbi - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 -spec: - networkInstance: - name: vpc-sba - cniType: ipvlan - attachmentType: vlan \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/common/function.go b/krm-functions/nfdeploy-fn/fn/function.go similarity index 81% rename from krm-functions/nfdeploy-fn/common/function.go rename to krm-functions/nfdeploy-fn/fn/function.go index a2ad1d61..2016d655 100644 --- a/krm-functions/nfdeploy-fn/common/function.go +++ b/krm-functions/nfdeploy-fn/fn/function.go @@ -14,11 +14,12 @@ See the License for the specific language governing permissions and limitations under the License. */ -package common +package fn import ( "fmt" "reflect" + "sort" "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" infrav1alpha1 "github.com/nephio-project/api/infra/v1alpha1" @@ -28,11 +29,10 @@ import ( ko "github.com/nephio-project/nephio/krm-functions/lib/kubeobject" "github.com/nokia/k8s-ipam/pkg/iputil" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime/schema" ) -func Run[T any, PT PtrIsNFDeployment[T]](rl *fn.ResourceList, gvk schema.GroupVersionKind) (bool, error) { - nfDeployFn := NewFunction[T, PT](gvk) +func Run(rl *fn.ResourceList) (bool, error) { + nfDeployFn := NewFunction() var err error /* @@ -51,7 +51,7 @@ func Run[T any, PT PtrIsNFDeployment[T]](rl *fn.ResourceList, gvk schema.GroupVe &condkptsdk.Config{ For: corev1.ObjectReference{ APIVersion: nephiodeployv1alpha1.GroupVersion.Identifier(), - Kind: nfDeployFn.gvk.Kind, + Kind: nephiodeployv1alpha1.NFDeploymentKind, }, Owns: map[corev1.ObjectReference]condkptsdk.ResourceKind{ { @@ -91,7 +91,7 @@ func Run[T any, PT PtrIsNFDeployment[T]](rl *fn.ResourceList, gvk schema.GroupVe return nfDeployFn.sdk.Run() } -func (f *NfDeployFn[T, PT]) WorkloadClusterCallbackFn(o *fn.KubeObject) error { +func (f *NfDeployFn) WorkloadClusterCallbackFn(o *fn.KubeObject) error { var err error if f.workloadCluster != nil { @@ -108,7 +108,7 @@ func (f *NfDeployFn[T, PT]) WorkloadClusterCallbackFn(o *fn.KubeObject) error { // desiredOwnedResourceList returns with the list of all child KubeObjects // belonging to the parent Interface "for object" -func (f *NfDeployFn[T, PT]) desiredOwnedResourceList(o *fn.KubeObject) (fn.KubeObjects, error) { +func (f *NfDeployFn) desiredOwnedResourceList(o *fn.KubeObject) (fn.KubeObjects, error) { if f.workloadCluster == nil { // no WorkloadCluster resource in the package return nil, fmt.Errorf("workload cluster is missing from the kpt package") @@ -116,7 +116,7 @@ func (f *NfDeployFn[T, PT]) desiredOwnedResourceList(o *fn.KubeObject) (fn.KubeO return fn.KubeObjects{}, nil } -func (f *NfDeployFn[T, PT]) CapacityUpdate(o *fn.KubeObject) error { +func (f *NfDeployFn) CapacityUpdate(o *fn.KubeObject) error { capacityKOE, err := ko.NewFromKubeObject[nephioreqv1alpha1.Capacity](o) if err != nil { return err @@ -131,7 +131,7 @@ func (f *NfDeployFn[T, PT]) CapacityUpdate(o *fn.KubeObject) error { return nil } -func (f *NfDeployFn[T, PT]) InterfaceUpdate(o *fn.KubeObject) error { +func (f *NfDeployFn) InterfaceUpdate(o *fn.KubeObject) error { itfcKOE, err := ko.NewFromKubeObject[nephioreqv1alpha1.Interface](o) if err != nil { return err @@ -191,7 +191,7 @@ func (f *NfDeployFn[T, PT]) InterfaceUpdate(o *fn.KubeObject) error { return nil } -func (f *NfDeployFn[T, PT]) DnnUpdate(o *fn.KubeObject) error { +func (f *NfDeployFn) DnnUpdate(o *fn.KubeObject) error { dnnReqKOE, err := ko.NewFromKubeObject[nephioreqv1alpha1.DataNetwork](o) if err != nil { return err @@ -225,7 +225,7 @@ func (f *NfDeployFn[T, PT]) DnnUpdate(o *fn.KubeObject) error { return nil } -func (f *NfDeployFn[T, PT]) DependencyUpdate(o *fn.KubeObject) error { +func (f *NfDeployFn) DependencyUpdate(o *fn.KubeObject) error { depKOE, err := ko.NewFromKubeObject[nephioreqv1alpha1.Dependency](o) if err != nil { return err @@ -241,26 +241,24 @@ func (f *NfDeployFn[T, PT]) DependencyUpdate(o *fn.KubeObject) error { return nil } -func (f *NfDeployFn[T, PT]) UpdateResourceFn(nfDeploymentObj *fn.KubeObject, objs fn.KubeObjects) (fn.KubeObjects, error) { +func (f *NfDeployFn) UpdateResourceFn(nfDeploymentObj *fn.KubeObject, objs fn.KubeObjects) (fn.KubeObjects, error) { if nfDeploymentObj == nil { return nil, fmt.Errorf("expected a for object but got nil") } var err error - nfKoExt, err := ko.NewFromKubeObject[T](nfDeploymentObj) + nfKoExt, err := ko.NewFromKubeObject[nephiodeployv1alpha1.NFDeployment](nfDeploymentObj) if err != nil { return nil, err } - var nf PT + var nf *nephiodeployv1alpha1.NFDeployment nf, err = nfKoExt.GetGoStruct() if err != nil { return nil, err } - nfSpec := nf.GetNFDeploymentSpec() - capObjs := objs.Where(fn.IsGroupVersionKind(nephioreqv1alpha1.CapacityGroupVersionKind)) for _, o := range capObjs { if err := f.CapacityUpdate(o); err != nil { @@ -287,18 +285,33 @@ func (f *NfDeployFn[T, PT]) UpdateResourceFn(nfDeploymentObj *fn.KubeObject, obj } } - f.FillCapacityDetails(nfSpec) - nfSpec.ConfigRefs = f.configRefs + //sort the paramRefs + sort.Slice(f.paramRef, func(i, j int) bool { + if f.paramRef[i].Name != nil && f.paramRef[j].Name != nil { + return *f.paramRef[i].Name <= *f.paramRef[j].Name + } + return true + }) + + f.FillCapacityDetails(nf) + + nf.Spec.ParametersRefs = f.paramRef + + for networkInstanceName, itfceConfigs := range f.interfaceConfigsMap { + for _, itfceConfig := range itfceConfigs { + f.AddInterfaceToNetworkInstance(itfceConfig.Name, networkInstanceName) + } - for networkInstanceName, itfceConfig := range f.interfaceConfigsMap { - f.AddInterfaceToNetworkInstance(itfceConfig.Name, networkInstanceName) + //sort the added interfaces + sort.Slice(f.networkInstance[networkInstanceName].Interfaces, func(i, j int) bool { + return f.networkInstance[networkInstanceName].Interfaces[i] <= f.networkInstance[networkInstanceName].Interfaces[j] + }) } - nfSpec.Interfaces = f.GetAllInterfaceConfig() - nfSpec.NetworkInstances = f.GetAllNetworkInstance() - nf.SetNFDeploymentSpec(nfSpec) + nf.Spec.Interfaces = f.GetAllInterfaceConfig() + nf.Spec.NetworkInstances = f.GetAllNetworkInstance() - err = nfKoExt.SetSpec((*T)(nf)) + err = nfKoExt.SetSpec(nf) return fn.KubeObjects{&nfKoExt.KubeObject}, err } diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/golden_test.go b/krm-functions/nfdeploy-fn/fn/golden_test.go similarity index 54% rename from krm-functions/nfdeploy-fn/upfdeployfn/golden_test.go rename to krm-functions/nfdeploy-fn/fn/golden_test.go index 4b95deb2..11060981 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/golden_test.go +++ b/krm-functions/nfdeploy-fn/fn/golden_test.go @@ -1,20 +1,20 @@ /* - Copyright 2023 The Nephio Authors. +Copyright 2023 The Nephio Authors. - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at +Licensed under the Apache License, Version 2.0 (the "License"); +you may not use this file except in compliance with the License. +You may obtain a copy of the License at - http://www.apache.org/licenses/LICENSE-2.0 + http://www.apache.org/licenses/LICENSE-2.0 - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. +Unless required by applicable law or agreed to in writing, software +distributed under the License is distributed on an "AS IS" BASIS, +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +See the License for the specific language governing permissions and +limitations under the License. */ -package main +package fn import ( "testing" diff --git a/krm-functions/nfdeploy-fn/common/helper.go b/krm-functions/nfdeploy-fn/fn/helper.go similarity index 63% rename from krm-functions/nfdeploy-fn/common/helper.go rename to krm-functions/nfdeploy-fn/fn/helper.go index 09df940d..c7274379 100644 --- a/krm-functions/nfdeploy-fn/common/helper.go +++ b/krm-functions/nfdeploy-fn/fn/helper.go @@ -14,7 +14,7 @@ See the License for the specific language governing permissions and limitations under the License. */ -package common +package fn import ( "sort" @@ -24,44 +24,41 @@ import ( nephioreqv1alpha1 "github.com/nephio-project/api/nf_requirements/v1alpha1" kptcondsdk "github.com/nephio-project/nephio/krm-functions/lib/condkptsdk" corev1 "k8s.io/api/core/v1" - "k8s.io/apimachinery/pkg/runtime/schema" ) -type PtrIsNFDeployment[T any] interface { - *T - nephiodeployv1alpha1.NFDeployment -} - -type NfDeployFn[T any, PT PtrIsNFDeployment[T]] struct { +type NfDeployFn struct { sdk kptcondsdk.KptCondSDK workloadCluster *infrav1alpha1.WorkloadCluster - gvk schema.GroupVersionKind capacity *nephioreqv1alpha1.Capacity //pkgName string networkInstance map[string]nephiodeployv1alpha1.NetworkInstance - interfaceConfigsMap map[string]nephiodeployv1alpha1.InterfaceConfig - configRefs []corev1.ObjectReference + interfaceConfigsMap map[string][]nephiodeployv1alpha1.InterfaceConfig + paramRef []nephiodeployv1alpha1.ObjectReference } -func NewFunction[T any, PT PtrIsNFDeployment[T]](gvk schema.GroupVersionKind) NfDeployFn[T, PT] { - return NfDeployFn[T, PT]{ - interfaceConfigsMap: make(map[string]nephiodeployv1alpha1.InterfaceConfig), +func NewFunction() NfDeployFn { + return NfDeployFn{ + interfaceConfigsMap: make(map[string][]nephiodeployv1alpha1.InterfaceConfig), networkInstance: make(map[string]nephiodeployv1alpha1.NetworkInstance), - configRefs: []corev1.ObjectReference{}, - gvk: gvk, + paramRef: []nephiodeployv1alpha1.ObjectReference{}, } } -func (h *NfDeployFn[T, PT]) SetInterfaceConfig(interfaceConfig nephiodeployv1alpha1.InterfaceConfig, networkInstanceName string) { +func (h *NfDeployFn) SetInterfaceConfig(interfaceConfig nephiodeployv1alpha1.InterfaceConfig, networkInstanceName string) { // don't add to empty networkInstanceName, ideally should not happen if len(networkInstanceName) == 0 { return } - h.interfaceConfigsMap[networkInstanceName] = interfaceConfig + if len(h.interfaceConfigsMap[networkInstanceName]) != 0 { + h.interfaceConfigsMap[networkInstanceName] = append(h.interfaceConfigsMap[networkInstanceName], interfaceConfig) + } else { + h.interfaceConfigsMap[networkInstanceName] = []nephiodeployv1alpha1.InterfaceConfig{interfaceConfig} + } + } -func (h *NfDeployFn[T, PT]) AddDNNToNetworkInstance(dnn nephiodeployv1alpha1.DataNetwork, networkInstanceName string) { +func (h *NfDeployFn) AddDNNToNetworkInstance(dnn nephiodeployv1alpha1.DataNetwork, networkInstanceName string) { if nI, ok := h.networkInstance[networkInstanceName]; ok { nI.DataNetworks = append(nI.DataNetworks, dnn) h.networkInstance[networkInstanceName] = nI @@ -73,7 +70,7 @@ func (h *NfDeployFn[T, PT]) AddDNNToNetworkInstance(dnn nephiodeployv1alpha1.Dat } } -func (h *NfDeployFn[T, PT]) AddInterfaceToNetworkInstance(interfaceName, networkInstanceName string) { +func (h *NfDeployFn) AddInterfaceToNetworkInstance(interfaceName, networkInstanceName string) { if nI, ok := h.networkInstance[networkInstanceName]; ok { nI.Interfaces = append(nI.Interfaces, interfaceName) h.networkInstance[networkInstanceName] = nI @@ -85,7 +82,7 @@ func (h *NfDeployFn[T, PT]) AddInterfaceToNetworkInstance(interfaceName, network } } -func (h *NfDeployFn[T, PT]) GetAllNetworkInstance() []nephiodeployv1alpha1.NetworkInstance { +func (h *NfDeployFn) GetAllNetworkInstance() []nephiodeployv1alpha1.NetworkInstance { networkInstances := make([]nephiodeployv1alpha1.NetworkInstance, 0) for _, nI := range h.networkInstance { @@ -100,11 +97,11 @@ func (h *NfDeployFn[T, PT]) GetAllNetworkInstance() []nephiodeployv1alpha1.Netwo return networkInstances } -func (h *NfDeployFn[T, PT]) GetAllInterfaceConfig() []nephiodeployv1alpha1.InterfaceConfig { +func (h *NfDeployFn) GetAllInterfaceConfig() []nephiodeployv1alpha1.InterfaceConfig { interfaceConfigs := make([]nephiodeployv1alpha1.InterfaceConfig, 0) for _, ic := range h.interfaceConfigsMap { - interfaceConfigs = append(interfaceConfigs, ic) + interfaceConfigs = append(interfaceConfigs, ic...) } //sort it based on resource names @@ -115,14 +112,18 @@ func (h *NfDeployFn[T, PT]) GetAllInterfaceConfig() []nephiodeployv1alpha1.Inter return interfaceConfigs } -func (h *NfDeployFn[T, PT]) FillCapacityDetails(spec *nephiodeployv1alpha1.NFDeploymentSpec) { +func (h *NfDeployFn) FillCapacityDetails(nf *nephiodeployv1alpha1.NFDeployment) { if h.capacity == nil { return } - spec.Capacity = &h.capacity.Spec + nf.Spec.Capacity = &h.capacity.Spec } -func (h *NfDeployFn[T, PT]) AddDependencyRef(ref corev1.ObjectReference) { - h.configRefs = append(h.configRefs, ref) +func (h *NfDeployFn) AddDependencyRef(ref corev1.ObjectReference) { + h.paramRef = append(h.paramRef, nephiodeployv1alpha1.ObjectReference{ + Name: &ref.Name, + Kind: ref.Kind, + APIVersion: ref.APIVersion, + }) } diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/_expected_error.txt b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/_expected_error.txt similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/_expected_error.txt rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/_expected_error.txt diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/capacity.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/capacity.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/capacity.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/dnn.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/dnn.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/interface-n3.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/interface-n3.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/interface-n3.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/interface-n3.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/interface-n4.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/interface-n4.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/interface-n4.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/interface-n4.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/interface-n6.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/interface-n6.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/interface-n6.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/interface-n6.yaml diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingKptFile/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/Kptfile similarity index 68% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/Kptfile rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/Kptfile index 27f1af26..488d2a1e 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/Kptfile +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/Kptfile @@ -10,21 +10,21 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update for condition status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/_expected.yaml similarity index 87% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/_expected.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/_expected.yaml index ade9ac21..956370dd 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/_expected.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/_expected.yaml @@ -28,24 +28,24 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update done status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - reason: Ready status: "True" type: nephio.org.Specializer.specialize @@ -56,7 +56,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstanceReference: name: vpc-internet @@ -69,7 +69,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -87,7 +87,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal @@ -105,7 +105,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -118,10 +118,21 @@ items: vlanClaimStatus: vlanID: 101 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 spec: + provider: upf.free5gc.io + networkInstances: + - name: vpc-internal + interfaces: + - n4 + - name: vpc-internet + interfaces: + - n6 + - name: vpc-ran + interfaces: + - n3 interfaces: - name: n3 ipv4: @@ -138,13 +149,3 @@ items: address: 10.0.0.4/24 gateway: 10.0.0.2 vlanID: 101 - networkInstances: - - name: vpc-internal - interfaces: - - n4 - - name: vpc-internet - interfaces: - - n6 - - name: vpc-ran - interfaces: - - n3 diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/dnn.yaml similarity index 74% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/dnn.yaml index 8eb676af..4022c4d6 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/dnn.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstanceReference: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n3.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n3.yaml similarity index 77% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n3.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n3.yaml index ca91c50e..c4bffbd2 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n3.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n4.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n4.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n4.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n4.yaml index 0364a639..f25cd0e8 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n4.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n6.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n6.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n6.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n6.yaml index 4fdfa098..b2388a54 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n6.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/upfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/upfdeployment.yaml similarity index 58% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/upfdeployment.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/upfdeployment.yaml index 6ea06748..9aba539a 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/upfdeployment.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/upfdeployment.yaml @@ -1,4 +1,6 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 +spec: + provider: upf.free5gc.io diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingcapacity/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/Kptfile similarity index 67% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/Kptfile rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/Kptfile index e2e574df..afb2d9f2 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/Kptfile +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/Kptfile @@ -10,25 +10,25 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update for condition status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/_expected.yaml similarity index 84% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/_expected.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/_expected.yaml index fdf5b5bb..16c1b31d 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/_expected.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/_expected.yaml @@ -28,28 +28,28 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: not ready reason: Specialize status: "False" @@ -60,7 +60,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -71,7 +71,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstanceReference: name: vpc-internet @@ -84,7 +84,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -102,7 +102,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal @@ -120,7 +120,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -133,6 +133,8 @@ items: vlanClaimStatus: vlanID: 101 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 + spec: + provider: upf.free5gc.io diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/capacity.yaml similarity index 68% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/capacity.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/capacity.yaml index 35a7a865..a6950022 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/capacity.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/capacity.yaml @@ -4,7 +4,7 @@ metadata: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/dnn.yaml similarity index 74% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/dnn.yaml index 8eb676af..4022c4d6 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/dnn.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstanceReference: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n3.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n3.yaml similarity index 77% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n3.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n3.yaml index ca91c50e..c4bffbd2 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n3.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n4.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n4.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n4.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n4.yaml index 0364a639..f25cd0e8 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n4.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n6.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n6.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n6.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n6.yaml index 4fdfa098..b2388a54 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n6.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/upfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/upfdeployment.yaml similarity index 58% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/upfdeployment.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/upfdeployment.yaml index 6ea06748..9aba539a 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/upfdeployment.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/upfdeployment.yaml @@ -1,4 +1,6 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 +spec: + provider: upf.free5gc.io diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingKptFile/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingdnnstatus/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/Kptfile similarity index 67% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/Kptfile rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/Kptfile index c27108eb..fd94eab6 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/Kptfile +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/Kptfile @@ -10,25 +10,25 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/_expected.yaml similarity index 84% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/_expected.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/_expected.yaml index 0085e8b6..ae665878 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/_expected.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/_expected.yaml @@ -28,28 +28,28 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "False" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: not ready reason: Specialize status: "False" @@ -60,7 +60,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -71,7 +71,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -89,7 +89,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -101,7 +101,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal @@ -119,7 +119,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -132,6 +132,8 @@ items: vlanClaimStatus: vlanID: 101 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 + spec: + provider: upf.free5gc.io diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/capacity.yaml similarity index 68% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/capacity.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/capacity.yaml index 35a7a865..a6950022 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/capacity.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/capacity.yaml @@ -4,7 +4,7 @@ metadata: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/dnn.yaml similarity index 79% rename from krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/dnn.yaml index 8830e73f..20bab247 100644 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/dnn.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n3.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n3.yaml similarity index 70% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n3.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n3.yaml index 749522b9..888d1052 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/interface-n3.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n4.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n4.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n4.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n4.yaml index 0364a639..f25cd0e8 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/interface-n4.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n6.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n6.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n6.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n6.yaml index 4fdfa098..b2388a54 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/interface-n6.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/upfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/upfdeployment.yaml similarity index 58% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/upfdeployment.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/upfdeployment.yaml index 6ea06748..9aba539a 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/upfdeployment.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/upfdeployment.yaml @@ -1,4 +1,6 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 +spec: + provider: upf.free5gc.io diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingcapacity/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/failure/missingipclaimstatus/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/Kptfile similarity index 68% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/Kptfile rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/Kptfile index d0625f44..0f75c317 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/Kptfile +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/Kptfile @@ -1,9 +1,9 @@ apiVersion: kpt.dev/v1 kind: Kptfile metadata: - name: cluster01-upf + name: cluster01-amf annotations: config.kubernetes.io/local-config: "true" info: - description: upf package example + description: amf package example pipeline: {} \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/_expected.yaml similarity index 52% rename from krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/_expected.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/_expected.yaml index b8cc058d..5e9da6d2 100644 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/_expected.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/_expected.yaml @@ -17,7 +17,7 @@ items: - apiVersion: kpt.dev/v1 kind: Kptfile metadata: - name: pkg-amf + name: cluster01-amf annotations: config.kubernetes.io/local-config: "true" info: @@ -27,37 +27,40 @@ items: pipeline: {} status: conditions: - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Capacity.controlplane - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + - message: not ready + reason: Specialize + status: "False" + type: nephio.org.Specializer.specialize + - message: update for condition + status: "False" + type: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + - message: child local resource -> done + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" + type: req.nephio.org/v1alpha1.Capacity.dataplane + - message: create initial resource condition + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + status: "False" type: req.nephio.org/v1alpha1.DataNetwork.internet - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Interface.n1 - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Interface.sbi - - message: update done - status: "True" - type: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 - - reason: Ready - status: "True" - type: nephio.org.Specializer.specialize + - message: create initial resource condition + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + status: "False" + type: req.nephio.org/v1alpha1.Dependency.upf + - message: create initial resource condition + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + status: "False" + type: req.nephio.org/v1alpha1.Interface.n2 - apiVersion: req.nephio.org/v1alpha1 kind: Capacity metadata: - name: controlplane + name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 spec: - maxSubscribers: 10000 + maxUplinkThroughput: 0 + maxSubscribers: 1000 + maxDownlinkThroughput: 0 - apiVersion: req.nephio.org/v1alpha1 kind: DataNetwork metadata: @@ -65,38 +68,40 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 spec: + status: {} - apiVersion: req.nephio.org/v1alpha1 - kind: Interface + kind: Dependency metadata: - name: n1 # also used as pfcp + name: upf annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + specializer.nephio.org/namespace: free5gc-cp spec: - networkInstance: - name: vpc-internal - cniType: sriov - attachmentType: vlan + packageName: free5gc-upf + injectors: + - apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment + status: {} - apiVersion: req.nephio.org/v1alpha1 kind: Interface metadata: - name: sbi + name: n2 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 spec: networkInstance: - name: vpc-sba - cniType: ipvlan + name: vpc-ran + cniType: sriov attachmentType: vlan + status: {} - apiVersion: workload.nephio.org/v1alpha1 - kind: AMFDeployment + kind: NFDeployment metadata: name: amf-cluster01 + annotations: + specializer.nephio.org/debug: "true" spec: - capacity: - maxDownlinkThroughput: "0" - maxSubscribers: 10000 - maxUplinkThroughput: "0" + provider: amf.free5gc.io diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/capacity.yaml new file mode 100644 index 00000000..97416ba0 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/capacity.yaml @@ -0,0 +1,11 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Capacity +metadata: + name: dataplane + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 +spec: + maxUplinkThroughput: 0 + maxSubscribers: 1000 + maxDownlinkThroughput: 0 diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/dependency.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/dependency.yaml new file mode 100644 index 00000000..e34df882 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/dependency.yaml @@ -0,0 +1,13 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Dependency +metadata: + name: upf + annotations: + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + specializer.nephio.org/namespace: free5gc-cp +spec: + packageName: free5gc-upf + injectors: + - apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment +status: {} \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/dnn.yaml similarity index 60% rename from krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/dnn.yaml index 01b1d1d9..201c621b 100644 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/dnn.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/dnn.yaml @@ -5,5 +5,6 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 -spec: \ No newline at end of file + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 +spec: +status: {} \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/interface-n2.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/interface-n2.yaml new file mode 100644 index 00000000..5f9cfaa3 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/interface-n2.yaml @@ -0,0 +1,13 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Interface +metadata: + name: n2 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 +spec: + networkInstance: + name: vpc-ran + cniType: sriov + attachmentType: vlan +status: {} \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/nfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/nfdeployment.yaml new file mode 100644 index 00000000..d5beb796 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/nfdeployment.yaml @@ -0,0 +1,8 @@ +apiVersion: workload.nephio.org/v1alpha1 +kind: NFDeployment +metadata: + name: amf-cluster01 + annotations: + specializer.nephio.org/debug: "true" +spec: + provider: amf.free5gc.io \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_stage1/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/Kptfile new file mode 100644 index 00000000..5f217b46 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/Kptfile @@ -0,0 +1,34 @@ +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: cluster01-xyz + annotations: + config.kubernetes.io/local-config: "true" +info: + description: xyz package example +pipeline: {} +status: + conditions: + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Capacity.dataplane + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.DataNetwork.internet + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.e1 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Dependency.upf + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Dependency.sample + - message: update for condition + status: "False" + type: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/_expected.yaml new file mode 100644 index 00000000..77f42789 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/_expected.yaml @@ -0,0 +1,159 @@ +apiVersion: config.kubernetes.io/v1 +kind: ResourceList +items: +- apiVersion: infra.nephio.org/v1alpha1 + kind: WorkloadCluster + metadata: + name: cluster01 + annotations: + config.kubernetes.io/local-config: "true" + spec: + clusterName: cluster01 + cnis: + - macvlan + - ipvlan + - sriov + masterInterface: eth1 +- apiVersion: kpt.dev/v1 + kind: Kptfile + metadata: + name: cluster01-xyz + annotations: + config.kubernetes.io/local-config: "true" + info: + description: xyz package example + readinessGates: + - conditionType: nephio.org.Specializer.specialize + pipeline: {} + status: + conditions: + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Capacity.dataplane + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.DataNetwork.internet + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.e1 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Dependency.upf + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Dependency.sample + - message: update done + status: "True" + type: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + - reason: Ready + status: "True" + type: nephio.org.Specializer.specialize +- apiVersion: req.nephio.org/v1alpha1 + kind: Capacity + metadata: + name: dataplane + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + spec: + maxUplinkThroughput: 0 + maxSubscribers: 1000 + maxDownlinkThroughput: 0 +- apiVersion: req.nephio.org/v1alpha1 + kind: DataNetwork + metadata: + name: internet + annotations: + config.kubernetes.io/local-config: "true" + prefix: 10.0.0.0/8 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + spec: + status: {} +- apiVersion: req.nephio.org/v1alpha1 + kind: Dependency + metadata: + name: sample + annotations: + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + specializer.nephio.org/namespace: free5gc-cp + spec: + packageName: free5gc-sample + injectors: + - apiVersion: sample.xyz.org/v1alpha1 + kind: UPF + status: + injected: + - name: xyz-regional-sample-edge02 + namespace: free5gc-sample + apiVersion: ref.nephio.org/v1alpha1 + kind: Config +- apiVersion: req.nephio.org/v1alpha1 + kind: Dependency + metadata: + name: upf + annotations: + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + specializer.nephio.org/namespace: free5gc-cp + spec: + packageName: free5gc-upf + injectors: + - apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment + status: + injected: + - name: xyz-regional-upf-edge02 + namespace: free5gc-cp + apiVersion: ref.nephio.org/v1alpha1 + kind: Config +- apiVersion: req.nephio.org/v1alpha1 + kind: Interface + metadata: + name: e1 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + spec: + networkInstance: + name: vpc-ran + cniType: sriov + attachmentType: vlan + status: + ipClaimStatus: + - prefix: 10.0.0.3/24 + gateway: 10.0.0.1 + vlanClaimStatus: + vlanID: 100 +- apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment + metadata: + name: xyz-cluster01 + annotations: + specializer.nephio.org/debug: "true" + spec: + provider: xyz.free5gc.io + interfaces: + - name: e1 + ipv4: + address: 10.0.0.3/24 + gateway: 10.0.0.1 + vlanID: 100 + networkInstances: + - name: vpc-ran + interfaces: + - e1 + parametersRefs: + - name: xyz-regional-sample-edge02 + apiVersion: ref.nephio.org/v1alpha1 + kind: Config + - name: xyz-regional-upf-edge02 + apiVersion: ref.nephio.org/v1alpha1 + kind: Config + capacity: + maxDownlinkThroughput: "0" + maxSubscribers: 1000 + maxUplinkThroughput: "0" diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/capacity.yaml new file mode 100644 index 00000000..dd3ca8a6 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/capacity.yaml @@ -0,0 +1,11 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Capacity +metadata: + name: dataplane + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 +spec: + maxUplinkThroughput: 0 + maxSubscribers: 1000 + maxDownlinkThroughput: 0 diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dependency-1.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dependency-1.yaml new file mode 100644 index 00000000..193aa3da --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dependency-1.yaml @@ -0,0 +1,18 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Dependency +metadata: + name: sample + annotations: + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + specializer.nephio.org/namespace: free5gc-cp +spec: + packageName: free5gc-sample + injectors: + - apiVersion: sample.xyz.org/v1alpha1 + kind: UPF +status: + injected: + - name: xyz-regional-sample-edge02 + namespace: free5gc-sample + apiVersion: ref.nephio.org/v1alpha1 + kind: Config \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dependency.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dependency.yaml new file mode 100644 index 00000000..e7e08856 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dependency.yaml @@ -0,0 +1,18 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Dependency +metadata: + name: upf + annotations: + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 + specializer.nephio.org/namespace: free5gc-cp +spec: + packageName: free5gc-upf + injectors: + - apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment +status: + injected: + - name: xyz-regional-upf-edge02 + namespace: free5gc-cp + apiVersion: ref.nephio.org/v1alpha1 + kind: Config \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dnn.yaml new file mode 100644 index 00000000..2092563d --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/dnn.yaml @@ -0,0 +1,10 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: DataNetwork +metadata: + name: internet + annotations: + config.kubernetes.io/local-config: "true" + prefix: 10.0.0.0/8 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 +spec: +status: {} \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/interface-n2.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/interface-n2.yaml new file mode 100644 index 00000000..b618c325 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/interface-n2.yaml @@ -0,0 +1,18 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Interface +metadata: + name: e1 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.xyz-cluster01 +spec: + networkInstance: + name: vpc-ran + cniType: sriov + attachmentType: vlan +status: + ipClaimStatus: + - prefix: 10.0.0.3/24 + gateway: 10.0.0.1 + vlanClaimStatus: + vlanID: 100 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/nfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/nfdeployment.yaml new file mode 100644 index 00000000..00a9f274 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/nfdeployment.yaml @@ -0,0 +1,8 @@ +apiVersion: workload.nephio.org/v1alpha1 +kind: NFDeployment +metadata: + name: xyz-cluster01 + annotations: + specializer.nephio.org/debug: "true" +spec: + provider: xyz.free5gc.io \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withmultipledependencies/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/Kptfile similarity index 67% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/Kptfile rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/Kptfile index d4587335..b8fe6d78 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/Kptfile +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/Kptfile @@ -10,25 +10,25 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/_expected.yaml similarity index 88% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/_expected.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/_expected.yaml index e2a3f06f..f8e56da1 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/_expected.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/_expected.yaml @@ -28,28 +28,28 @@ items: status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update done status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - reason: Ready status: "True" type: nephio.org.Specializer.specialize @@ -59,7 +59,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -70,7 +70,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -88,7 +88,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -108,7 +108,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal @@ -128,7 +128,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -143,15 +143,13 @@ items: vlanClaimStatus: vlanID: 101 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 annotations: specializer.nephio.org/debug: "true" spec: - capacity: - maxDownlinkThroughput: 10G - maxUplinkThroughput: 10G + provider: upf.free5gc.io interfaces: - name: n3 ipv4: @@ -191,3 +189,6 @@ items: - name: vpc-ran interfaces: - n3 + capacity: + maxDownlinkThroughput: 10G + maxUplinkThroughput: 10G diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/capacity.yaml similarity index 68% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/capacity.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/capacity.yaml index 35a7a865..a6950022 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/capacity.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/capacity.yaml @@ -4,7 +4,7 @@ metadata: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/dnn.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/dnn.yaml index adc8f003..8751786a 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/dnn.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n3.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n3.yaml similarity index 80% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n3.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n3.yaml index fa536fb4..0b27a2ab 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n3.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n4.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n4.yaml similarity index 80% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n4.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n4.yaml index 418ba5ba..5abe0b2c 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n4.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n6.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n6.yaml similarity index 80% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n6.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n6.yaml index a93b48c9..a200355b 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n6.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/upfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/nfdeployment.yaml similarity index 71% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/upfdeployment.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/nfdeployment.yaml index 07bfad01..ee4ac9c4 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/upfdeployment.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/nfdeployment.yaml @@ -1,6 +1,8 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 annotations: specializer.nephio.org/debug: "true" +spec: + provider: upf.free5gc.io \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withprovider/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/Kptfile new file mode 100644 index 00000000..b8fe6d78 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/Kptfile @@ -0,0 +1,34 @@ +apiVersion: kpt.dev/v1 +kind: Kptfile +metadata: + name: cluster01-upf + annotations: + config.kubernetes.io/local-config: "true" +info: + description: upf package example +pipeline: {} +status: + conditions: + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Capacity.dataplane + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.DataNetwork.internet + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.n3 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.n4 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.n6 + - message: update for condition + status: "False" + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/_expected.yaml new file mode 100644 index 00000000..766e275f --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/_expected.yaml @@ -0,0 +1,192 @@ +apiVersion: config.kubernetes.io/v1 +kind: ResourceList +items: +- apiVersion: infra.nephio.org/v1alpha1 + kind: WorkloadCluster + metadata: + name: cluster01 + annotations: + config.kubernetes.io/local-config: "true" + spec: + clusterName: cluster01 + cnis: + - macvlan + - ipvlan + - sriov + masterInterface: eth1 +- apiVersion: kpt.dev/v1 + kind: Kptfile + metadata: + name: cluster01-upf + annotations: + config.kubernetes.io/local-config: "true" + info: + description: upf package example + readinessGates: + - conditionType: nephio.org.Specializer.specialize + pipeline: {} + status: + conditions: + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Capacity.dataplane + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.DataNetwork.internet + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.n3 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.n4 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Interface.n6 + - message: update done + status: "True" + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + - reason: Ready + status: "True" + type: nephio.org.Specializer.specialize +- apiVersion: req.nephio.org/v1alpha1 + kind: Capacity + metadata: + name: dataplane + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + spec: + maxUplinkThroughput: 10G + maxDownlinkThroughput: 10G +- apiVersion: req.nephio.org/v1alpha1 + kind: DataNetwork + metadata: + name: internet + annotations: + config.kubernetes.io/local-config: "true" + prefix: 10.0.0.0/8 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + spec: + networkInstance: + name: vpc-internet + pools: + - name: pool1 + prefixLength: 8 + status: + pools: + - ipClaim: + prefix: 10.0.0.3/24 + gateway: 10.0.0.1 +- apiVersion: req.nephio.org/v1alpha1 + kind: Interface + metadata: + name: n3 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + spec: + networkInstance: + name: vpc-ran + cniType: sriov + attachmentType: vlan + status: + ipClaimStatus: + - prefix: 10.0.0.3/24 + gateway: 10.0.0.1 + - prefix: 1000::2/64 + gateway: 1000::1 + vlanClaimStatus: + vlanID: 100 +- apiVersion: req.nephio.org/v1alpha1 + kind: Interface + metadata: + name: n4 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + spec: + networkInstance: + name: vpc-ran + cniType: sriov + attachmentType: vlan + status: + ipClaimStatus: + - prefix: 10.0.0.3/24 + gateway: 10.0.0.1 + - prefix: 1000::2/64 + gateway: 1000::1 + vlanClaimStatus: + vlanID: 100 +- apiVersion: req.nephio.org/v1alpha1 + kind: Interface + metadata: + name: n6 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 + spec: + networkInstance: + name: vpc-internet + cniType: sriov + attachmentType: vlan + status: + ipClaimStatus: + - prefix: 10.0.0.4/24 + gateway: 10.0.0.2 + - prefix: 1000::2/64 + gateway: 1000::1 + vlanClaimStatus: + vlanID: 101 +- apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment + metadata: + name: upf-cluster01 + annotations: + specializer.nephio.org/debug: "true" + spec: + provider: upf.free5gc.io + interfaces: + - name: n3 + ipv4: + address: 10.0.0.3/24 + gateway: 10.0.0.1 + ipv6: + address: 1000::2/64 + gateway: 1000::1 + vlanID: 100 + - name: n4 + ipv4: + address: 10.0.0.3/24 + gateway: 10.0.0.1 + ipv6: + address: 1000::2/64 + gateway: 1000::1 + vlanID: 100 + - name: n6 + ipv4: + address: 10.0.0.4/24 + gateway: 10.0.0.2 + ipv6: + address: 1000::2/64 + gateway: 1000::1 + vlanID: 101 + networkInstances: + - name: vpc-internet + dataNetworks: + - name: internet + pool: + - prefix: 10.0.0.3/24 + interfaces: + - n6 + - name: vpc-ran + interfaces: + - n3 + - n4 + capacity: + maxDownlinkThroughput: 10G + maxUplinkThroughput: 10G diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/capacity.yaml similarity index 68% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/capacity.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/capacity.yaml index 35a7a865..a6950022 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingdnnstatus/capacity.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/capacity.yaml @@ -4,7 +4,7 @@ metadata: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/dnn.yaml similarity index 78% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/dnn.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/dnn.yaml index adc8f003..8751786a 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/dnn.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n3.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n3.yaml similarity index 80% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n3.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n3.yaml index fa536fb4..0b27a2ab 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n3.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n4.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n4.yaml similarity index 75% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n4.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n4.yaml index 418ba5ba..fb68dc9d 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/interface-n4.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n4.yaml @@ -4,10 +4,10 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: - name: vpc-internal + name: vpc-ran cniType: sriov attachmentType: vlan status: diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n6.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n6.yaml similarity index 80% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n6.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n6.yaml index a93b48c9..a200355b 100644 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/interface-n6.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/nfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/nfdeployment.yaml new file mode 100644 index 00000000..ee4ac9c4 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/nfdeployment.yaml @@ -0,0 +1,8 @@ +apiVersion: workload.nephio.org/v1alpha1 +kind: NFDeployment +metadata: + name: upf-cluster01 + annotations: + specializer.nephio.org/debug: "true" +spec: + provider: upf.free5gc.io \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/workload_cluster.yaml similarity index 100% rename from krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage2/workload_cluster.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_withsamenetwork/workload_cluster.yaml diff --git a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/Kptfile b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/Kptfile similarity index 52% rename from krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/Kptfile rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/Kptfile index 764866db..1d4cf263 100644 --- a/krm-functions/nfdeploy-fn/amfdeployfn/testdata/createamfdeployment/Kptfile +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/Kptfile @@ -1,7 +1,7 @@ apiVersion: kpt.dev/v1 kind: Kptfile metadata: - name: pkg-amf + name: cluster01-amf annotations: config.kubernetes.io/local-config: "true" info: @@ -10,21 +10,21 @@ pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" - type: req.nephio.org/v1alpha1.Capacity.controlplane + type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" - type: req.nephio.org/v1alpha1.Interface.n1 - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Interface.sbi + type: req.nephio.org/v1alpha1.Interface.n2 - message: update for condition status: "False" - type: workload.nephio.org/v1alpha1.AMFDeployment.amf-cluster01 \ No newline at end of file + type: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Dependency.upf \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/_expected.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/_expected.yaml similarity index 58% rename from krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/_expected.yaml rename to krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/_expected.yaml index e364db61..ac2b03fe 100644 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/_expected.yaml +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/_expected.yaml @@ -17,47 +17,49 @@ items: - apiVersion: kpt.dev/v1 kind: Kptfile metadata: - name: pkg-upf + name: cluster01-amf annotations: config.kubernetes.io/local-config: "true" info: - description: upf package example + description: amf package example readinessGates: - conditionType: nephio.org.Specializer.specialize pipeline: {} status: conditions: - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" - type: req.nephio.org/v1alpha1.Capacity.controlplane + type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 status: "True" - type: req.nephio.org/v1alpha1.Interface.n3 - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Interface.n4 + type: req.nephio.org/v1alpha1.Interface.n2 - message: update done status: "True" - type: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + - message: update condition for initial resource + reason: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + status: "True" + type: req.nephio.org/v1alpha1.Dependency.upf - reason: Ready status: "True" type: nephio.org.Specializer.specialize - apiVersion: req.nephio.org/v1alpha1 kind: Capacity metadata: - name: controlplane + name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 spec: - maxSessions: 10000 + maxUplinkThroughput: 0 + maxSubscribers: 1000 + maxDownlinkThroughput: 0 - apiVersion: req.nephio.org/v1alpha1 kind: DataNetwork metadata: @@ -65,68 +67,68 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 spec: - networkInstance: - name: vpc-internet - pools: - - name: pool1 - prefixLength: 8 - status: - pools: - - ipClaim: - prefix: 10.0.0.3/24 - gateway: 10.0.0.1 + status: {} - apiVersion: req.nephio.org/v1alpha1 - kind: Interface + kind: Dependency metadata: - name: n3 + name: upf annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + specializer.nephio.org/namespace: free5gc-cp spec: - networkInstance: - name: vpc-internet - cniType: sriov - attachmentType: vlan + packageName: free5gc-upf + injectors: + - apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment status: - ipClaimStatus: - - prefix: 10.0.0.4/24 - gateway: 10.0.0.2 - vlanClaimStatus: - vlanID: 101 + injected: + - name: amf-regional-upf-edge02 + namespace: free5gc-cp + apiVersion: ref.nephio.org/v1alpha1 + kind: Config - apiVersion: req.nephio.org/v1alpha1 kind: Interface metadata: - name: n4 # also used as pfcp + name: n2 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 spec: networkInstance: - name: defaultPODNetwork + name: vpc-ran cniType: sriov attachmentType: vlan + status: + ipClaimStatus: + - prefix: 10.0.0.3/24 + gateway: 10.0.0.1 + vlanClaimStatus: + vlanID: 100 - apiVersion: workload.nephio.org/v1alpha1 - kind: SMFDeployment + kind: NFDeployment metadata: - name: smf-cluster01 + name: amf-cluster01 + annotations: + specializer.nephio.org/debug: "true" spec: - capacity: - maxDownlinkThroughput: "0" - maxSessions: 10000 - maxUplinkThroughput: "0" + provider: amf.free5gc.io interfaces: - - name: n3 + - name: n2 ipv4: - address: 10.0.0.4/24 - gateway: 10.0.0.2 - vlanID: 101 + address: 10.0.0.3/24 + gateway: 10.0.0.1 + vlanID: 100 networkInstances: - - name: vpc-internet - dataNetworks: - - name: internet - pool: - - prefix: 10.0.0.3/24 + - name: vpc-ran interfaces: - - n3 + - n2 + parametersRefs: + - name: amf-regional-upf-edge02 + apiVersion: ref.nephio.org/v1alpha1 + kind: Config + capacity: + maxDownlinkThroughput: "0" + maxSubscribers: 1000 + maxUplinkThroughput: "0" diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/capacity.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/capacity.yaml new file mode 100644 index 00000000..97416ba0 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/capacity.yaml @@ -0,0 +1,11 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Capacity +metadata: + name: dataplane + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 +spec: + maxUplinkThroughput: 0 + maxSubscribers: 1000 + maxDownlinkThroughput: 0 diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/dependency.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/dependency.yaml new file mode 100644 index 00000000..967796b6 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/dependency.yaml @@ -0,0 +1,18 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Dependency +metadata: + name: upf + annotations: + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 + specializer.nephio.org/namespace: free5gc-cp +spec: + packageName: free5gc-upf + injectors: + - apiVersion: workload.nephio.org/v1alpha1 + kind: NFDeployment +status: + injected: + - name: amf-regional-upf-edge02 + namespace: free5gc-cp + apiVersion: ref.nephio.org/v1alpha1 + kind: Config \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/dnn.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/dnn.yaml new file mode 100644 index 00000000..201c621b --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/dnn.yaml @@ -0,0 +1,10 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: DataNetwork +metadata: + name: internet + annotations: + config.kubernetes.io/local-config: "true" + prefix: 10.0.0.0/8 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 +spec: +status: {} \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/interface-n2.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/interface-n2.yaml new file mode 100644 index 00000000..b4e59f25 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/interface-n2.yaml @@ -0,0 +1,18 @@ +apiVersion: req.nephio.org/v1alpha1 +kind: Interface +metadata: + name: n2 + annotations: + config.kubernetes.io/local-config: "true" + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.amf-cluster01 +spec: + networkInstance: + name: vpc-ran + cniType: sriov + attachmentType: vlan +status: + ipClaimStatus: + - prefix: 10.0.0.3/24 + gateway: 10.0.0.1 + vlanClaimStatus: + vlanID: 100 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/nfdeployment.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/nfdeployment.yaml new file mode 100644 index 00000000..d5beb796 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/nfdeployment.yaml @@ -0,0 +1,8 @@ +apiVersion: workload.nephio.org/v1alpha1 +kind: NFDeployment +metadata: + name: amf-cluster01 + annotations: + specializer.nephio.org/debug: "true" +spec: + provider: amf.free5gc.io \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/workload_cluster.yaml b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/workload_cluster.yaml new file mode 100644 index 00000000..fdcebf54 --- /dev/null +++ b/krm-functions/nfdeploy-fn/fn/testdata/golden/nfdeployment_witthdependency/workload_cluster.yaml @@ -0,0 +1,13 @@ +apiVersion: infra.nephio.org/v1alpha1 +kind: WorkloadCluster +metadata: + name: cluster01 + annotations: + config.kubernetes.io/local-config: "true" +spec: + clusterName: cluster01 + cnis: + - macvlan + - ipvlan + - sriov + masterInterface: eth1 diff --git a/krm-functions/nfdeploy-fn/go.mod b/krm-functions/nfdeploy-fn/go.mod index b2f15473..9edaa5cc 100644 --- a/krm-functions/nfdeploy-fn/go.mod +++ b/krm-functions/nfdeploy-fn/go.mod @@ -6,11 +6,10 @@ replace github.com/nephio-project/nephio/krm-functions/lib => ../lib require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230605213956-a1e470f419a4 github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 k8s.io/api v0.27.3 - k8s.io/apimachinery v0.27.3 ) require ( @@ -55,6 +54,7 @@ require ( gopkg.in/inf.v0 v0.9.1 // indirect gopkg.in/yaml.v2 v2.4.0 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect + k8s.io/apimachinery v0.27.3 // indirect k8s.io/client-go v0.27.2 // indirect k8s.io/klog/v2 v2.100.1 // indirect k8s.io/kube-openapi v0.0.0-20230525220651-2546d827e515 // indirect diff --git a/krm-functions/nfdeploy-fn/go.sum b/krm-functions/nfdeploy-fn/go.sum index fd0e37ed..5913f5ae 100644 --- a/krm-functions/nfdeploy-fn/go.sum +++ b/krm-functions/nfdeploy-fn/go.sum @@ -120,8 +120,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 h1:4v0n24tsumwuz1BDGKoGWxZMFtqAlYpI87gE/enMUUI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= diff --git a/krm-functions/nfdeploy-fn/main.go b/krm-functions/nfdeploy-fn/main.go new file mode 100644 index 00000000..b1b6ac72 --- /dev/null +++ b/krm-functions/nfdeploy-fn/main.go @@ -0,0 +1,15 @@ +package main + +import ( + "os" + + "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" + fnr "github.com/nephio-project/nephio/krm-functions/nfdeploy-fn/fn" +) + +func main() { + + if err := fn.AsMain(fn.ResourceListProcessorFunc(fnr.Run)); err != nil { + os.Exit(1) + } +} diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/Dockerfile b/krm-functions/nfdeploy-fn/smfdeployfn/Dockerfile deleted file mode 100644 index e0c6fbcc..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2023 The Nephio Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM golang:1.20-alpine -ENV CGO_ENABLED=0 -WORKDIR /go/src/ -COPY krm-functions/ krm-functions/ -WORKDIR /go/src/krm-functions/nfdeploy-fn/smfdeployfn -RUN go install -RUN go build -o /usr/local/bin/function ./ - -FROM gcr.io/distroless/static:latest -COPY --from=0 /usr/local/bin/function /usr/local/bin/function -ENTRYPOINT ["function"] \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/Makefile b/krm-functions/nfdeploy-fn/smfdeployfn/Makefile deleted file mode 100644 index 3073c273..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -IMAGE_TAG ?= latest -REGISTRY ?= docker.io/nephio -IMAGE_NAME ?= smf-deploy-fn -IMG ?= $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) - -# This includes the following targets: -# docker-build, docker-push -include ../../../default-docker.mk - -# This includes the 'help' target that prints out all targets with their descriptions organized by categories -include ../../../default-help.mk diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/README.md b/krm-functions/nfdeploy-fn/smfdeployfn/README.md deleted file mode 100644 index 7c886654..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# smf-deploy-fn - -## Overview - -The smf-deploy-fn is a KRM function leveraging the `cond sdk` using the `workload.nephio.org/v1alpha1.SMFDeployment` as `for` KRM resource. - -The smf deployment function has 3 `watch` resources: -- `req.nephio.org/v1alpha1.Interface` - - For every interface resource status, it will use `status.ipAllocationStatus` and `status.vlanAllocationStatus` fields to populate SMFDeployment `spec.interfaces` values. -- `req.nephio.org/v1alpha1.DataNetwork` - - For every data network resource status, it will use `status.pools.ipAllocation` fields to populate SMFDeployment `spec.networkInstances` values. -- `req.nephio.org/v1alpha1.Capacity` - - This resource is the source of truth for the capacity details in SMFDeployment spec. - -The function generates a final resource with the same name as the `Kptfile`. It does not panic or error out if status fields are missing for any resource. It generates the `SMFDeployment` using the available data. - -## usage - -``` -kpt fn source | go run main.go -``` - -``` -kpt fn eval --type mutator -i -``` - - -## build - -make smf-docker-build; make smf-docker-push \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/golden_test.go b/krm-functions/nfdeploy-fn/smfdeployfn/golden_test.go deleted file mode 100644 index e4c4431a..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/golden_test.go +++ /dev/null @@ -1,30 +0,0 @@ -/* - Copyright 2023 The Nephio Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package main - -import ( - "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" - tst "github.com/nephio-project/nephio/krm-functions/lib/test" - "testing" -) - -const TestDataPath = "testdata" - -func TestNFDeployFn(t *testing.T) { - fnRunner := fn.ResourceListProcessorFunc(Run) - tst.RunGoldenTests(t, TestDataPath, fnRunner) -} diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/main.go b/krm-functions/nfdeploy-fn/smfdeployfn/main.go deleted file mode 100644 index 02ba9356..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/main.go +++ /dev/null @@ -1,37 +0,0 @@ -/* - Copyright 2023 The Nephio Authors. - - Licensed under the Apache License, Version 2.0 (the "License"); - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. -*/ - -package main - -import ( - "os" - - "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" - nephiodeployv1alpha1 "github.com/nephio-project/api/nf_deployments/v1alpha1" - "github.com/nephio-project/nephio/krm-functions/nfdeploy-fn/common" -) - -func Run(rl *fn.ResourceList) (bool, error) { - return common.Run[nephiodeployv1alpha1.SMFDeployment](rl, nephiodeployv1alpha1.SMFDeploymentGroupVersionKind) -} - -func main() { - runner := fn.ResourceListProcessorFunc(Run) - - if err := fn.AsMain(runner); err != nil { - os.Exit(1) - } -} diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/Kptfile b/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/Kptfile deleted file mode 100644 index b9b06273..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/Kptfile +++ /dev/null @@ -1,30 +0,0 @@ -apiVersion: kpt.dev/v1 -kind: Kptfile -metadata: - name: pkg-upf - annotations: - config.kubernetes.io/local-config: "true" -info: - description: upf package example -pipeline: {} -status: - conditions: - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Capacity.controlplane - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.DataNetwork.internet - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Interface.n3 - - message: update condition for initial resource - reason: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Interface.n4 - - message: update for condition - status: "True" - type: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/capacity.yaml b/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/capacity.yaml deleted file mode 100644 index 2c19ed78..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/capacity.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: Capacity -metadata: - name: controlplane - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 -spec: - maxSessions: 10000 diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/interface-n11.yaml b/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/interface-n11.yaml deleted file mode 100644 index 19705657..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/interface-n11.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: Interface -metadata: - name: n3 - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 -spec: - networkInstance: - name: vpc-internet - cniType: sriov - attachmentType: vlan -status: - ipClaimStatus: - - prefix: 10.0.0.4/24 - gateway: 10.0.0.2 - vlanClaimStatus: - vlanID: 101 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/interface-n4.yaml b/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/interface-n4.yaml deleted file mode 100644 index 3dc4990a..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/interface-n4.yaml +++ /dev/null @@ -1,12 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: Interface -metadata: - name: n4 # also used as pfcp - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.SMFDeployment.smf-cluster01 -spec: - networkInstance: - name: defaultPODNetwork - cniType: sriov - attachmentType: vlan \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/smfdeployment.yaml b/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/smfdeployment.yaml deleted file mode 100644 index aa66185f..00000000 --- a/krm-functions/nfdeploy-fn/smfdeployfn/testdata/createsmfdeployment/smfdeployment.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: workload.nephio.org/v1alpha1 -kind: SMFDeployment -metadata: - name: smf-cluster01 diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/Dockerfile b/krm-functions/nfdeploy-fn/upfdeployfn/Dockerfile deleted file mode 100644 index 6111beb2..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/Dockerfile +++ /dev/null @@ -1,25 +0,0 @@ -# Copyright 2023 The Nephio Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -FROM golang:1.20-alpine -ENV CGO_ENABLED=0 -WORKDIR /go/src/ -COPY krm-functions/ krm-functions/ -WORKDIR /go/src/krm-functions/nfdeploy-fn/upfdeployfn -RUN go install -RUN go build -o /usr/local/bin/function ./ - -FROM gcr.io/distroless/static:latest -COPY --from=0 /usr/local/bin/function /usr/local/bin/function -ENTRYPOINT ["function"] \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/Makefile b/krm-functions/nfdeploy-fn/upfdeployfn/Makefile deleted file mode 100644 index 537cf5b6..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -IMAGE_TAG ?= latest -REGISTRY ?= docker.io/nephio -IMAGE_NAME ?= upf-deploy-fn -IMG ?= $(REGISTRY)/$(IMAGE_NAME):$(IMAGE_TAG) - -# This includes the following targets: -# docker-build, docker-push -include ../../../default-docker.mk - -# This includes the 'help' target that prints out all targets with their descriptions organized by categories -include ../../../default-help.mk diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/README.md b/krm-functions/nfdeploy-fn/upfdeployfn/README.md deleted file mode 100644 index 4ddaee10..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/README.md +++ /dev/null @@ -1,30 +0,0 @@ -# upf-deploy-fn - -## Overview - -The upf-deploy-fn is a KRM function leveraging the `cond sdk` using the `workload.nephio.org/v1alpha1.UPFDeployment` as `for` KRM resource. - -The upf deployment function has 3 `watch` resources: -- `req.nephio.org/v1alpha1.Interface` - - For every interface resource status, it will use `status.ipAllocationStatus` and `status.vlanAllocationStatus` fields to populate UPFDeployment `spec.interfaces` values. -- `req.nephio.org/v1alpha1.DataNetwork` - - For every datanetwork resource status, it will use `status.pools.ipAllocation` fields to populate UPFDeployment `spec.networkInstances` values. -- `req.nephio.org/v1alpha1.Capacity` - - This resource is the source of truth for the capacity details in UPFDeployment spec. - -The function generates a final resource with the same name as the `Kptfile`. It does not panic or error out if status fields are missing for any resource. It generates the `UPFDeployment` using the available data. - -## usage - -``` -kpt fn source | go run main.go -``` - -``` -kpt fn eval --type mutator -i -``` - - -## build - -make upf-docker-build; make upf-docker-push \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/main.go b/krm-functions/nfdeploy-fn/upfdeployfn/main.go deleted file mode 100644 index b363c613..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/main.go +++ /dev/null @@ -1,36 +0,0 @@ -/* -Copyright 2023 The Nephio Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -Unless required by applicable law or agreed to in writing, software -distributed under the License is distributed on an "AS IS" BASIS, -WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -See the License for the specific language governing permissions and -limitations under the License. -*/ -package main - -import ( - "os" - - "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" - nephiodeployv1alpha1 "github.com/nephio-project/api/nf_deployments/v1alpha1" - "github.com/nephio-project/nephio/krm-functions/nfdeploy-fn/common" -) - -func Run(rl *fn.ResourceList) (bool, error) { - return common.Run[nephiodeployv1alpha1.UPFDeployment](rl, nephiodeployv1alpha1.UPFDeploymentGroupVersionKind) -} - -func main() { - runner := fn.ResourceListProcessorFunc(Run) - - if err := fn.AsMain(runner); err != nil { - os.Exit(1) - } -} diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/dnn.yaml b/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/dnn.yaml deleted file mode 100644 index c799a818..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/failure/missingipclaimstatus/dnn.yaml +++ /dev/null @@ -1,19 +0,0 @@ -apiVersion: req.nephio.org/v1alpha1 -kind: DataNetwork -metadata: - name: internet - annotations: - config.kubernetes.io/local-config: "true" - prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 -spec: - networkInstance: - name: vpc-internet - pools: - - name: pool1 - prefixLength: 8 -status: - pools: - - ipClaim: - prefix: 10.0.0.3/24 - gateway: 10.0.0.1 \ No newline at end of file diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/_expected.yaml b/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/_expected.yaml deleted file mode 100644 index 006627ef..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/_expected.yaml +++ /dev/null @@ -1,149 +0,0 @@ -apiVersion: config.kubernetes.io/v1 -kind: ResourceList -items: -- apiVersion: infra.nephio.org/v1alpha1 - kind: WorkloadCluster - metadata: - name: cluster01 - annotations: - config.kubernetes.io/local-config: "true" - spec: - clusterName: cluster01 - cnis: - - macvlan - - ipvlan - - sriov - masterInterface: eth1 -- apiVersion: kpt.dev/v1 - kind: Kptfile - metadata: - name: cluster01-upf - annotations: - config.kubernetes.io/local-config: "true" - info: - description: upf package example - readinessGates: - - conditionType: nephio.org.Specializer.specialize - pipeline: {} - status: - conditions: - - message: not ready - reason: Specialize - status: "False" - type: nephio.org.Specializer.specialize - - message: update for condition - status: "False" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - - message: child local resource -> done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - status: "True" - type: req.nephio.org/v1alpha1.Capacity.dataplane - - message: create initial resource condition - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - status: "False" - type: req.nephio.org/v1alpha1.DataNetwork.internet - - message: create initial resource condition - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - status: "False" - type: req.nephio.org/v1alpha1.Interface.n3 - - message: create initial resource condition - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - status: "False" - type: req.nephio.org/v1alpha1.Interface.n4 - - message: create initial resource condition - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - status: "False" - type: req.nephio.org/v1alpha1.Interface.n6 -- apiVersion: req.nephio.org/v1alpha1 - kind: Capacity - metadata: - name: dataplane - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - spec: - maxUplinkThroughput: 10G - maxDownlinkThroughput: 10G -- apiVersion: req.nephio.org/v1alpha1 - kind: DataNetwork - metadata: - name: internet - annotations: - config.kubernetes.io/local-config: "true" - prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - spec: - networkInstance: - name: vpc-internet - pools: - - name: pool1 - prefixLength: 8 - status: - pools: - - ipClaim: - prefix: 10.0.0.3/24 - gateway: 10.0.0.1 -- apiVersion: req.nephio.org/v1alpha1 - kind: Interface - metadata: - name: n3 - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - spec: - networkInstance: - name: vpc-ran - cniType: sriov - attachmentType: vlan - status: - ipClaimStatus: - - prefix: 10.0.0.3/24 - gateway: 10.0.0.1 - - prefix: 1000::2/64 - gateway: 1000::1 - vlanClaimStatus: - vlanID: 100 -- apiVersion: req.nephio.org/v1alpha1 - kind: Interface - metadata: - name: n4 - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - spec: - networkInstance: - name: vpc-internal - cniType: sriov - attachmentType: vlan - status: - ipClaimStatus: - - prefix: 10.0.0.3/24 - gateway: 10.0.0.1 - - prefix: 1000::2/64 - gateway: 1000::1 - vlanClaimStatus: - vlanID: 100 -- apiVersion: req.nephio.org/v1alpha1 - kind: Interface - metadata: - name: n6 - annotations: - config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 - spec: - networkInstance: - name: vpc-internet - cniType: sriov - attachmentType: vlan - status: - ipClaimStatus: - - prefix: 10.0.0.4/24 - gateway: 10.0.0.2 - - prefix: 1000::2/64 - gateway: 1000::1 - vlanClaimStatus: - vlanID: 101 -- apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment - metadata: - name: upf-cluster01 diff --git a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/upfdeployment.yaml b/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/upfdeployment.yaml deleted file mode 100644 index 571d7ccd..00000000 --- a/krm-functions/nfdeploy-fn/upfdeployfn/testdata/golden/createupfdeployment_stage1/upfdeployment.yaml +++ /dev/null @@ -1,4 +0,0 @@ -apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment -metadata: - name: upf-cluster01 \ No newline at end of file diff --git a/krm-functions/pipeline-tests/go.mod b/krm-functions/pipeline-tests/go.mod index 61f26844..0d283105 100644 --- a/krm-functions/pipeline-tests/go.mod +++ b/krm-functions/pipeline-tests/go.mod @@ -15,7 +15,6 @@ replace ( require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da github.com/nephio-project/nephio/krm-functions/dnn-fn v0.0.0-20230516034137-53f1f1859c10 github.com/nephio-project/nephio/krm-functions/interface-fn v0.0.0-20230516034137-53f1f1859c10 github.com/nephio-project/nephio/krm-functions/ipam-fn v0.0.0-20230516034137-53f1f1859c10 @@ -59,6 +58,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d // indirect github.com/pkg/errors v0.9.1 // indirect github.com/prometheus/client_golang v1.15.1 // indirect github.com/prometheus/client_model v0.4.0 // indirect diff --git a/krm-functions/pipeline-tests/go.sum b/krm-functions/pipeline-tests/go.sum index b456c019..e08cdf97 100644 --- a/krm-functions/pipeline-tests/go.sum +++ b/krm-functions/pipeline-tests/go.sum @@ -128,8 +128,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 h1:4v0n24tsumwuz1BDGKoGWxZMFtqAlYpI87gE/enMUUI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE= diff --git a/krm-functions/pipeline-tests/pipeline_test.go b/krm-functions/pipeline-tests/pipeline_test.go index 6bad2fce..630990b4 100644 --- a/krm-functions/pipeline-tests/pipeline_test.go +++ b/krm-functions/pipeline-tests/pipeline_test.go @@ -23,12 +23,11 @@ import ( "github.com/GoogleContainerTools/kpt-functions-sdk/go/fn" tlib "github.com/nephio-project/nephio/krm-functions/lib/test" - nephiodeployv1alpha1 "github.com/nephio-project/api/nf_deployments/v1alpha1" dnn_fn "github.com/nephio-project/nephio/krm-functions/dnn-fn/fn" if_fn "github.com/nephio-project/nephio/krm-functions/interface-fn/fn" ipam_fn "github.com/nephio-project/nephio/krm-functions/ipam-fn/fn" nad_fn "github.com/nephio-project/nephio/krm-functions/nad-fn/fn" - nfdeploy_fn "github.com/nephio-project/nephio/krm-functions/nfdeploy-fn/common" + nfdeploy_fn "github.com/nephio-project/nephio/krm-functions/nfdeploy-fn/fn" vlan_fn "github.com/nephio-project/nephio/krm-functions/vlan-fn/fn" "github.com/nokia/k8s-ipam/pkg/proxy/clientproxy/ipam" "github.com/nokia/k8s-ipam/pkg/proxy/clientproxy/vlan" @@ -36,20 +35,10 @@ import ( const testdir = "testdata" -func upfFn(rl *fn.ResourceList) (bool, error) { - return nfdeploy_fn.Run[nephiodeployv1alpha1.UPFDeployment](rl, nephiodeployv1alpha1.UPFDeploymentGroupVersionKind) +func nfFn(rl *fn.ResourceList) (bool, error) { + return nfdeploy_fn.Run(rl) } -/* -func smfFn(rl *fn.ResourceList) (bool, error) { - return nfdeploy_fn.Run[nephiodeployv1alpha1.SMFDeployment](rl, nephiodeployv1alpha1.SMFDeploymentGroupVersionKind) -} - -func amfFn(rl *fn.ResourceList) (bool, error) { - return nfdeploy_fn.Run[nephiodeployv1alpha1.AMFDeployment](rl, nephiodeployv1alpha1.AMFDeploymentGroupVersionKind) -} -*/ - var ipamFn = ipam_fn.New(ipam.NewMock()) var vlanFn = vlan_fn.New(vlan.NewMock()) @@ -65,7 +54,7 @@ func TestPipelines(t *testing.T) { inputDir: "upf_pkg_init", expectedDataDir: "workload_cluster_not_ready", pipeline: []fn.ResourceListProcessorFunc{ - upfFn, + nfFn, if_fn.Run, dnn_fn.Run, @@ -75,14 +64,14 @@ func TestPipelines(t *testing.T) { nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, }, }, { inputDir: "upf_pkg", expectedDataDir: "simplified_deployment", pipeline: []fn.ResourceListProcessorFunc{ - upfFn, + nfFn, if_fn.Run, dnn_fn.Run, @@ -92,19 +81,19 @@ func TestPipelines(t *testing.T) { nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, }, }, { inputDir: "upf_pkg", expectedDataDir: "real_deployment", pipeline: []fn.ResourceListProcessorFunc{ - upfFn, + nfFn, if_fn.Run, nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, ipamFn.Run, vlanFn.Run, @@ -112,33 +101,33 @@ func TestPipelines(t *testing.T) { nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, }, }, { inputDir: "upf_pkg", expectedDataDir: "real_deployment_2", pipeline: []fn.ResourceListProcessorFunc{ - upfFn, + nfFn, if_fn.Run, nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, ipamFn.Run, nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, vlanFn.Run, nad_fn.Run, if_fn.Run, dnn_fn.Run, - upfFn, + nfFn, }, }, } diff --git a/krm-functions/pipeline-tests/testdata/real_deployment/_expected.yaml b/krm-functions/pipeline-tests/testdata/real_deployment/_expected.yaml index 91d9795e..0b810159 100644 --- a/krm-functions/pipeline-tests/testdata/real_deployment/_expected.yaml +++ b/krm-functions/pipeline-tests/testdata/real_deployment/_expected.yaml @@ -102,7 +102,7 @@ items: name: upf-cluster01-internet-pool1 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.DataNetwork.internet spec: kind: pool @@ -122,7 +122,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -141,7 +141,7 @@ items: name: upf-cluster01-n4-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: kind: network @@ -160,7 +160,7 @@ items: name: upf-cluster01-n6-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n6 spec: kind: network @@ -220,25 +220,25 @@ items: type: nephio.org.Specializer.specialize - message: update done status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: child local resource -> done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update done @@ -287,7 +287,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -298,7 +298,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -316,7 +316,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -335,7 +335,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -354,7 +354,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -381,7 +381,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -395,7 +395,7 @@ items: name: upf-cluster01-n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-internal-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: @@ -409,7 +409,7 @@ items: name: upf-cluster01-n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-internet-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n6 spec: @@ -418,14 +418,12 @@ items: status: vlanID: 10 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 namespace: dummy spec: - capacity: - maxDownlinkThroughput: 10G - maxUplinkThroughput: 10G + provider: upf.free5gc.io interfaces: - name: n3 ipv4: @@ -456,3 +454,6 @@ items: - name: vpc-ran interfaces: - n3 + capacity: + maxDownlinkThroughput: 10G + maxUplinkThroughput: 10G diff --git a/krm-functions/pipeline-tests/testdata/real_deployment_2/_expected.yaml b/krm-functions/pipeline-tests/testdata/real_deployment_2/_expected.yaml index 91d9795e..0b810159 100644 --- a/krm-functions/pipeline-tests/testdata/real_deployment_2/_expected.yaml +++ b/krm-functions/pipeline-tests/testdata/real_deployment_2/_expected.yaml @@ -102,7 +102,7 @@ items: name: upf-cluster01-internet-pool1 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.DataNetwork.internet spec: kind: pool @@ -122,7 +122,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -141,7 +141,7 @@ items: name: upf-cluster01-n4-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: kind: network @@ -160,7 +160,7 @@ items: name: upf-cluster01-n6-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n6 spec: kind: network @@ -220,25 +220,25 @@ items: type: nephio.org.Specializer.specialize - message: update done status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: child local resource -> done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update done @@ -287,7 +287,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -298,7 +298,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -316,7 +316,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -335,7 +335,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -354,7 +354,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -381,7 +381,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -395,7 +395,7 @@ items: name: upf-cluster01-n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-internal-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: @@ -409,7 +409,7 @@ items: name: upf-cluster01-n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-internet-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n6 spec: @@ -418,14 +418,12 @@ items: status: vlanID: 10 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 namespace: dummy spec: - capacity: - maxDownlinkThroughput: 10G - maxUplinkThroughput: 10G + provider: upf.free5gc.io interfaces: - name: n3 ipv4: @@ -456,3 +454,6 @@ items: - name: vpc-ran interfaces: - n3 + capacity: + maxDownlinkThroughput: 10G + maxUplinkThroughput: 10G diff --git a/krm-functions/pipeline-tests/testdata/simplified_deployment/_expected.yaml b/krm-functions/pipeline-tests/testdata/simplified_deployment/_expected.yaml index 91d9795e..0b810159 100644 --- a/krm-functions/pipeline-tests/testdata/simplified_deployment/_expected.yaml +++ b/krm-functions/pipeline-tests/testdata/simplified_deployment/_expected.yaml @@ -102,7 +102,7 @@ items: name: upf-cluster01-internet-pool1 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.DataNetwork.internet spec: kind: pool @@ -122,7 +122,7 @@ items: name: upf-cluster01-n3-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: kind: network @@ -141,7 +141,7 @@ items: name: upf-cluster01-n4-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: kind: network @@ -160,7 +160,7 @@ items: name: upf-cluster01-n6-ipv4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n6 spec: kind: network @@ -220,25 +220,25 @@ items: type: nephio.org.Specializer.specialize - message: update done status: "True" - type: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + type: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 - message: child local resource -> done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Capacity.dataplane - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.DataNetwork.internet - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n3 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n4 - message: update done - reason: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + reason: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 status: "True" type: req.nephio.org/v1alpha1.Interface.n6 - message: update done @@ -287,7 +287,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -298,7 +298,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -316,7 +316,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -335,7 +335,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -354,7 +354,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: @@ -381,7 +381,7 @@ items: name: upf-cluster01-n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-ran-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n3 spec: @@ -395,7 +395,7 @@ items: name: upf-cluster01-n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-internal-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n4 spec: @@ -409,7 +409,7 @@ items: name: upf-cluster01-n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/for: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/for: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/vlanClaimName: vpc-internet-cluster01-bd specializer.nephio.org/owner: req.nephio.org/v1alpha1.Interface.n6 spec: @@ -418,14 +418,12 @@ items: status: vlanID: 10 - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 namespace: dummy spec: - capacity: - maxDownlinkThroughput: 10G - maxUplinkThroughput: 10G + provider: upf.free5gc.io interfaces: - name: n3 ipv4: @@ -456,3 +454,6 @@ items: - name: vpc-ran interfaces: - n3 + capacity: + maxDownlinkThroughput: 10G + maxUplinkThroughput: 10G diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg/capacity.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg/capacity.yaml index 35a7a865..a6950022 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg/capacity.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg/capacity.yaml @@ -4,7 +4,7 @@ metadata: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg/dnn.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg/dnn.yaml index fd9e932f..81fe9eac 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg/dnn.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n3.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n3.yaml index 8e30fece..7d15e134 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n3.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n4.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n4.yaml index df88139a..7dabaa70 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n4.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n6.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n6.yaml index 96a93cbf..144a0abf 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n6.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 specializer.nephio.org/namespace: dummy spec: networkInstance: diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg/upfdeployment.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg/upfdeployment.yaml index b9c9a7ee..a496075a 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg/upfdeployment.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg/upfdeployment.yaml @@ -1,5 +1,7 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 namespace: dummy +spec: + provider: upf.free5gc.io diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg_init/capacity.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg_init/capacity.yaml index 35a7a865..a6950022 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg_init/capacity.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg_init/capacity.yaml @@ -4,7 +4,7 @@ metadata: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg_init/dnn.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg_init/dnn.yaml index fd9e932f..81fe9eac 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg_init/dnn.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg_init/dnn.yaml @@ -5,7 +5,7 @@ metadata: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n3.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n3.yaml index dc84f01e..452b76af 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n3.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n3.yaml @@ -4,7 +4,7 @@ metadata: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n4.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n4.yaml index 1711f6d4..3c6bf053 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n4.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n4.yaml @@ -4,7 +4,7 @@ metadata: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n6.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n6.yaml index 79673c4c..9fb66ef7 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n6.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg_init/interface-n6.yaml @@ -4,7 +4,7 @@ metadata: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet diff --git a/krm-functions/pipeline-tests/testdata/upf_pkg_init/upfdeployment.yaml b/krm-functions/pipeline-tests/testdata/upf_pkg_init/upfdeployment.yaml index b9c9a7ee..a496075a 100644 --- a/krm-functions/pipeline-tests/testdata/upf_pkg_init/upfdeployment.yaml +++ b/krm-functions/pipeline-tests/testdata/upf_pkg_init/upfdeployment.yaml @@ -1,5 +1,7 @@ apiVersion: workload.nephio.org/v1alpha1 -kind: UPFDeployment +kind: NFDeployment metadata: name: upf-cluster01 namespace: dummy +spec: + provider: upf.free5gc.io diff --git a/krm-functions/pipeline-tests/testdata/workload_cluster_not_ready/_expected.yaml b/krm-functions/pipeline-tests/testdata/workload_cluster_not_ready/_expected.yaml index 6564e634..11d14786 100644 --- a/krm-functions/pipeline-tests/testdata/workload_cluster_not_ready/_expected.yaml +++ b/krm-functions/pipeline-tests/testdata/workload_cluster_not_ready/_expected.yaml @@ -46,7 +46,7 @@ items: name: dataplane annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: maxUplinkThroughput: 10G maxDownlinkThroughput: 10G @@ -57,7 +57,7 @@ items: annotations: config.kubernetes.io/local-config: "true" prefix: 10.0.0.0/8 - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -70,7 +70,7 @@ items: name: n3 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-ran @@ -83,7 +83,7 @@ items: name: n4 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internal @@ -96,7 +96,7 @@ items: name: n6 annotations: config.kubernetes.io/local-config: "true" - specializer.nephio.org/owner: workload.nephio.org/v1alpha1.UPFDeployment.upf-cluster01 + specializer.nephio.org/owner: workload.nephio.org/v1alpha1.NFDeployment.upf-cluster01 spec: networkInstance: name: vpc-internet @@ -112,7 +112,9 @@ items: data: name: example - apiVersion: workload.nephio.org/v1alpha1 - kind: UPFDeployment + kind: NFDeployment metadata: name: upf-cluster01 namespace: dummy + spec: + provider: upf.free5gc.io diff --git a/krm-functions/ueransim-deploy-fn/fn/function.go b/krm-functions/ueransim-deploy-fn/fn/function.go index 05caaf45..7cad5ccc 100644 --- a/krm-functions/ueransim-deploy-fn/fn/function.go +++ b/krm-functions/ueransim-deploy-fn/fn/function.go @@ -367,7 +367,7 @@ func getLabels() map[string]string { func getForName(annotations map[string]string) string { // forName is the resource that is the root resource of the specialization - // e.g. UPFDeployment, SMFDeployment, AMFDeployment + // e.g. NFDeployment forFullName := annotations[condkptsdk.SpecializerOwner] if owner, ok := annotations[condkptsdk.SpecializerFor]; ok { forFullName = owner diff --git a/krm-functions/ueransim-deploy-fn/go.mod b/krm-functions/ueransim-deploy-fn/go.mod index 99cf1c7a..c8525674 100644 --- a/krm-functions/ueransim-deploy-fn/go.mod +++ b/krm-functions/ueransim-deploy-fn/go.mod @@ -6,7 +6,7 @@ replace github.com/nephio-project/nephio/krm-functions/lib => ../lib require ( github.com/GoogleContainerTools/kpt-functions-sdk/go/fn v0.0.0-20230427202446-3255accc518d - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230627172556-8b92b80484c8 github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c k8s.io/api v0.27.3 diff --git a/krm-functions/ueransim-deploy-fn/go.sum b/krm-functions/ueransim-deploy-fn/go.sum index 0fa196d9..107e0732 100644 --- a/krm-functions/ueransim-deploy-fn/go.sum +++ b/krm-functions/ueransim-deploy-fn/go.sum @@ -120,8 +120,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c h1:zNeqCNUXERQOPbFvcDv8zbEGtZSpTWar/fgqwvKKklo= github.com/nokia/k8s-ipam v0.0.4-0.20230614172255-e361e59e279c/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo/v2 v2.9.5 h1:+6Hr4uxzP4XIUyAkg61dWBw8lb/gc4/X5luuxN/EC+Q= diff --git a/operators/nephio-controller-manager/go.mod b/operators/nephio-controller-manager/go.mod index 1240aa0d..d47c9fde 100644 --- a/operators/nephio-controller-manager/go.mod +++ b/operators/nephio-controller-manager/go.mod @@ -71,7 +71,7 @@ require ( github.com/modern-go/reflect2 v1.0.2 // indirect github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 // indirect github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect - github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da // indirect + github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d // indirect github.com/nephio-project/nephio/krm-functions/configinject-fn v0.0.0-00010101000000-000000000000 // indirect github.com/nephio-project/nephio/krm-functions/ipam-fn v0.0.0-00010101000000-000000000000 // indirect github.com/nephio-project/nephio/krm-functions/lib v0.0.0-20230609191131-85aa39064ef8 // indirect diff --git a/operators/nephio-controller-manager/go.sum b/operators/nephio-controller-manager/go.sum index 6ddd4edf..8287027c 100644 --- a/operators/nephio-controller-manager/go.sum +++ b/operators/nephio-controller-manager/go.sum @@ -154,8 +154,8 @@ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00 h1:n6/ github.com/monochromegane/go-gitignore v0.0.0-20200626010858-205db1a8cc00/go.mod h1:Pm3mSP3c5uWn86xMLZ5Sa7JB9GsEZySvHYXCTK4E9q4= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da h1:GqTpDe8Xbqs+R4TXLJjn4nbO18/XrkXesN7TITXsrwI= -github.com/nephio-project/api v0.0.0-20230627152656-a2bf013a68da/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d h1:I8j2xAJWpBpI5b/GOEdANY/9k4ORzmUEd1HuiFDVGi0= +github.com/nephio-project/api v1.0.1-0.20231006162045-9ad2d0db2a8d/go.mod h1:9w+JbXeyiT3KZrrXab0pzaWtiUk4upvgLzpqOtSmbpI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4 h1:4v0n24tsumwuz1BDGKoGWxZMFtqAlYpI87gE/enMUUI= github.com/nokia/k8s-ipam v0.0.4-0.20230628092530-8a292aec80a4/go.mod h1:ZVMmhD6jllAAO3YGIZFXUQbKRtEiIYgZ772bn/1GVz4= github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=