Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# To re-generate a bundle for another specific version without changing the standard setup, you can:
# - use the VERSION as arg of the bundle target (e.g make bundle VERSION=0.0.2)
# - use environment variables to overwrite this value (e.g export VERSION=0.0.2)
VERSION ?= 1.0.4
VERSION ?= 1.0.5

# CHANNELS define the bundle channels used in the bundle.
# Add a new line here if you would like to change its default config. (E.g CHANNELS = "candidate,fast,stable")
Expand Down Expand Up @@ -227,7 +227,7 @@ GOLANGCI_LINT = $(LOCALBIN)/golangci-lint-$(GOLANGCI_LINT_VERSION)

## Tool Versions
KUSTOMIZE_VERSION ?= v5.3.0
CONTROLLER_TOOLS_VERSION ?= v0.14.0
CONTROLLER_TOOLS_VERSION ?= v0.16.5
ENVTEST_VERSION ?= release-0.17
GOLANGCI_LINT_VERSION ?= v1.57.2

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ A complete demo with UERANSIM is available at [this link](https://gradiant.githu
5. By default, components use the `ClusterIP` service type. To change the service type, set the `serviceType` field to `LoadBalancer` or `NodePort` in the CR for the desired component. This option is currently available for the `amf-ngap`, `smf-pfcp`, `upf-pfcp`, and `upf-gtpu` services.
6. The `open5gsImage` field in the CR specifies the version of the Open5GS images. If not specified, the operator defaults to version `docker.io/gradiant/open5gs:2.7.5`.
7. The `webuiImage` field in the CR specifies the version of the Open5GS WebUI image. If not specified, the operator defaults to version `docker.io/gradiant/open5gs-webui:2.7.5`.
8. The `mongoDBVersion` field in the CR specifies the version of the MongoDB image. If not specified, the operator defaults to version `bitnami/mongodb:8.0.6-debian-12-r0`.
8. The `mongoDBVersion` field in the CR specifies the version of the MongoDB image. If not specified, the operator defaults to version `bitnami/mongodb:latest`.
9. Components with metric support can generate a `ServiceMonitor` CR to expose metrics to Prometheus. However, ensure that the `ServiceMonitor` CRD is installed in the cluster; otherwise, the operator will encounter an error and fail to create the resource. To create a ServiceMonitor, set the `serviceMonitor` field to `true` in the CR for the desired component.
10. **UPF Deployment Annotations:** The annotations for the UPF Deployment are managed exclusively through the `upf.deploymentAnnotations` field in the CR. Any annotation not present in this field will be automatically reconciled by the operator (added or removed as needed), so manual changes to annotations will not persist unless reflected in the CR.
11. **UPF GTP-U Interface:** The GTP-U network interface used by the UPF is set via the `upf.gtpuDev` field in the CR (e.g., `gtpuDev: "eth0"`). By default, the UPF uses the `eth0` interface.
Expand Down
2 changes: 1 addition & 1 deletion api/v1/open5gs_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ type Open5GSSpec struct {
WebUI Open5GSFunction `json:"webui,omitempty" default:"{\"enabled\":false,\"serviceAccount\":false,\"metrics\":false,\"serviceMonitor\":false}"`
WebUIImage string `json:"webuiImage,omitempty" default:"docker.io/gradiant/open5gs-webui:2.7.5"`
Open5GSImage string `json:"open5gsImage,omitempty" default:"docker.io/gradiant/open5gs:2.7.5"`
MongoDBVersion string `json:"mongoDBVersion,omitempty" default:"bitnami/mongodb:8.0.6-debian-12-r0"`
MongoDBVersion string `json:"mongoDBVersion,omitempty" default:"bitnami/mongodb:latest"`
Configuration Open5GSConfiguration `json:"configuration,omitempty" default:"{\"mcc\":\"999\",\"mnc\":\"70\",\"region\":\"2\",\"set\":\"1\",\"tac\":\"0001\",\"slices\":[]}"`
}

Expand Down
4 changes: 2 additions & 2 deletions charts/open5gs-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ apiVersion: v2
name: open5gs-operator
description: A Helm chart for Kubernetes
type: application
version: 1.0.4
appVersion: "1.0.4"
version: 1.0.5
appVersion: "1.0.5"
2 changes: 1 addition & 1 deletion charts/open5gs-operator/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ controllerManager:
- ALL
image:
repository: gradiant/open5gs-operator
tag: 1.0.4
tag: 1.0.5
resources:
requests:
cpu: 100m
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/net.gradiant.org_open5gses.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: open5gses.net.gradiant.org
spec:
group: net.gradiant.org
Expand Down
2 changes: 1 addition & 1 deletion config/crd/bases/net.gradiant.org_open5gsusers.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.14.0
controller-gen.kubebuilder.io/version: v0.16.5
name: open5gsusers.net.gradiant.org
spec:
group: net.gradiant.org
Expand Down
2 changes: 1 addition & 1 deletion config/manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ kind: Kustomization
images:
- name: controller
newName: gradiant/open5gs-operator
newTag: 1.0.4
newTag: 1.0.5
89 changes: 6 additions & 83 deletions config/rbac/role.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,58 +4,14 @@ kind: ClusterRole
metadata:
name: manager-role
rules:
- apiGroups:
- apps
resources:
- deployments
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- configmaps
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- persistentvolumeclaims
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- persistentvolumes
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- ""
resources:
- serviceaccounts
- services
verbs:
- create
- delete
Expand All @@ -65,9 +21,9 @@ rules:
- update
- watch
- apiGroups:
- ""
- apps
resources:
- services
- deployments
verbs:
- create
- delete
Expand All @@ -92,6 +48,9 @@ rules:
- net.gradiant.org
resources:
- open5gses
- open5gsusers
- open5gsusers/finalizers
- open5gsusers/status
verbs:
- create
- delete
Expand All @@ -114,39 +73,3 @@ rules:
- get
- patch
- update
- apiGroups:
- net.gradiant.org
resources:
- open5gsusers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- net.gradiant.org
resources:
- open5gsusers/finalizers
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- net.gradiant.org
resources:
- open5gsusers/status
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
2 changes: 1 addition & 1 deletion config/samples/net_v1_open5gs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
open5gsImage: "docker.io/gradiant/open5gs:2.7.5"
webuiImage: "docker.io/gradiant/open5gs-webui:2.7.5"
mongoDBVersion: "bitnami/mongodb:8.0.6-debian-12-r0"
mongoDBVersion: "bitnami/mongodb:latest"
amf:
enabled: true
serviceAccount: true
Expand Down
4 changes: 2 additions & 2 deletions internal/controller/open5gs_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -819,7 +819,7 @@ func (r *Open5GSReconciler) reconcileWebUI(ctx context.Context, req ctrl.Request
serviceAccount = CreateServiceAccount(req.Namespace, open5gs.Name, componentName)
serviceAccountName = serviceAccount.Name
}
deployment := CreateWebUIDeployment(req.Namespace, open5gs.Name, open5gs.Spec.WebUIImage, envVars, serviceAccountName)
deployment := CreateWebUIDeployment(req.Namespace, open5gs.Name, open5gs.Spec.WebUIImage, envVars, serviceAccountName, open5gs.Spec.MongoDBVersion)
return r.reconcileComponent(ctx, open5gs, componentName, logger, configMap, deployment, services, serviceAccount)
}

Expand Down Expand Up @@ -1309,7 +1309,7 @@ func setDefaultValues(open5gs *netv1.Open5GS) {
open5gs.Spec.WebUIImage = "docker.io/gradiant/open5gs-webui:2.7.5"
}
if open5gs.Spec.MongoDBVersion == "" {
open5gs.Spec.MongoDBVersion = "bitnami/mongodb:8.0.6-debian-12-r0"
open5gs.Spec.MongoDBVersion = "bitnami/mongodb:latest"
}
if open5gs.Spec.AMF.ServiceAccount == nil {
defaultAMFServiceAccount := false
Expand Down
6 changes: 3 additions & 3 deletions internal/controller/open5gs_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -832,14 +832,14 @@ if ( cursor.count() == 0 ) {
}
EOF

mongo $DB_URI /tmp/account.js
mongosh $DB_URI /tmp/account.js
rm -f /tmp/account.js
`,
},
}
}

func CreateWebUIDeployment(namespace, open5gsName, image string, envVars []corev1.EnvVar, serviceAccountName string) *appsv1.Deployment {
func CreateWebUIDeployment(namespace, open5gsName, image string, envVars []corev1.EnvVar, serviceAccountName string, mongoDBVersion string) *appsv1.Deployment {
if serviceAccountName == "" {
serviceAccountName = "default"
}
Expand Down Expand Up @@ -920,7 +920,7 @@ func CreateWebUIDeployment(namespace, open5gsName, image string, envVars []corev
InitContainers: []corev1.Container{
{
Name: "init",
Image: "bitnami/mongodb:4.4.1-debian-10-r39",
Image: mongoDBVersion,
Command: []string{
"/bin/bash",
"/add_admin.sh",
Expand Down
2 changes: 1 addition & 1 deletion test/suite_1/samples/net_v1_open5gs-test-1-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
open5gsImage: "docker.io/gradiant/open5gs:2.7.5"
webuiImage: "docker.io/gradiant/open5gs-webui:2.7.5"
mongoDBVersion: "bitnami/mongodb:8.0.6-debian-12-r0"
mongoDBVersion: "bitnami/mongodb:latest"
amf:
enabled: true
serviceAccount: true
Expand Down
2 changes: 1 addition & 1 deletion test/suite_1/samples/net_v1_open5gs-test-1-2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
open5gsImage: "docker.io/gradiant/open5gs:2.7.5"
webuiImage: "docker.io/gradiant/open5gs-webui:2.7.5"
mongoDBVersion: "bitnami/mongodb:8.0.6-debian-12-r0"
mongoDBVersion: "bitnami/mongodb:latest"
amf:
enabled: true
serviceAccount: true
Expand Down
2 changes: 1 addition & 1 deletion test/suite_1/samples/net_v1_open5gs-test-1-3.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
open5gsImage: "docker.io/gradiant/open5gs:2.7.5"
webuiImage: "docker.io/gradiant/open5gs-webui:2.7.5"
mongoDBVersion: "bitnami/mongodb:8.0.6-debian-12-r0"
mongoDBVersion: "bitnami/mongodb:latest"
amf:
enabled: true
serviceAccount: true
Expand Down
2 changes: 1 addition & 1 deletion test/suite_1/samples/net_v1_open5gs-test-1-4.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
open5gsImage: "docker.io/gradiant/open5gs:2.7.5"
webuiImage: "docker.io/gradiant/open5gs-webui:2.7.5"
mongoDBVersion: "bitnami/mongodb:8.0.6-debian-12-r0"
mongoDBVersion: "bitnami/mongodb:latest"
amf:
enabled: true
serviceAccount: true
Expand Down
2 changes: 1 addition & 1 deletion test/suite_1/samples/net_v1_open5gs-test-1-5.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ metadata:
spec:
open5gsImage: "docker.io/gradiant/open5gs:2.7.5"
webuiImage: "docker.io/gradiant/open5gs-webui:2.7.5"
mongoDBVersion: "bitnami/mongodb:8.0.6-debian-12-r0"
mongoDBVersion: "bitnami/mongodb:latest"
amf:
enabled: true
serviceAccount: true
Expand Down