From bc2ee44b1456d79f1c9ba437e0c6992bd6b4bae1 Mon Sep 17 00:00:00 2001 From: vireshnavalli Date: Fri, 26 May 2023 09:27:42 +0000 Subject: [PATCH] multus issue --- free5gc-operator/config/rbac/role.yaml | 52 +++++++++++++++++++ .../controllers/amfdeployment_controller.go | 9 ++-- free5gc-operator/test/nad/amf-n2-nad.yaml | 2 +- 3 files changed, 58 insertions(+), 5 deletions(-) diff --git a/free5gc-operator/config/rbac/role.yaml b/free5gc-operator/config/rbac/role.yaml index 1e286b0..501f2a1 100644 --- a/free5gc-operator/config/rbac/role.yaml +++ b/free5gc-operator/config/rbac/role.yaml @@ -57,6 +57,58 @@ rules: - get - list - watch +- apiGroups: + - workload.nephio.org + resources: + - AMFdeployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - workload.nephio.org + resources: + - AMFdeployments/finalizers + verbs: + - update +- apiGroups: + - workload.nephio.org + resources: + - AMFdeployments/status + verbs: + - get + - patch + - update +- apiGroups: + - workload.nephio.org + resources: + - amfdeployments + verbs: + - create + - delete + - get + - list + - patch + - update + - watch +- apiGroups: + - workload.nephio.org + resources: + - amfdeployments/finalizers + verbs: + - update +- apiGroups: + - workload.nephio.org + resources: + - amfdeployments/status + verbs: + - get + - patch + - update - apiGroups: - workload.nephio.org resources: diff --git a/free5gc-operator/controllers/amfdeployment_controller.go b/free5gc-operator/controllers/amfdeployment_controller.go index 976a980..963d508 100644 --- a/free5gc-operator/controllers/amfdeployment_controller.go +++ b/free5gc-operator/controllers/amfdeployment_controller.go @@ -135,7 +135,7 @@ func constructAMFNadName(templateName string, suffix string) string { func getAMFNad(templateName string, spec *workloadv1alpha1.AMFDeploymentSpec) string { var ret string - n2CfgSlice := getIntConfigSlice(spec.Interfaces, "N2") + n2CfgSlice := getIntConfigSlice(spec.Interfaces, "n2") // n11CfgSlice := getIntConfigSlice(spec.Interfaces, "N11") // n4CfgSlice := getIntConfigSlice(spec.Interfaces, "N4") // n9CfgSlice := getIntConfigSlice(spec.Interfaces, "N9") @@ -261,9 +261,10 @@ func free5gcAMFDeployment(log logr.Logger, amfDeploy *workloadv1alpha1.AMFDeploy ContainerPort: 8805, }, }, - // Command: []string{ - // "/free5gc/config//wrapper.sh", - // }, + + Command: []string{"./amf"}, + Args: []string{"-c", "../config/amfcfg.yaml"}, + VolumeMounts: []apiv1.VolumeMount{ { MountPath: "/free5gc/config/", diff --git a/free5gc-operator/test/nad/amf-n2-nad.yaml b/free5gc-operator/test/nad/amf-n2-nad.yaml index 156839c..f75c051 100644 --- a/free5gc-operator/test/nad/amf-n2-nad.yaml +++ b/free5gc-operator/test/nad/amf-n2-nad.yaml @@ -24,7 +24,7 @@ spec: { "type": "macvlan", "capabilities": { "ips": true }, - "master": "ens5", + "master": "eth0", "mode": "bridge", "ipam": { "type": "static",