diff --git a/charts/open5gs/Chart.yaml b/charts/open5gs/Chart.yaml index 7e01b839c..dd44887e3 100644 --- a/charts/open5gs/Chart.yaml +++ b/charts/open5gs/Chart.yaml @@ -10,7 +10,7 @@ maintainers: - email: cgiraldo@gradiant.org name: cgiraldo name: open5gs -version: 0.2.0 +version: 0.2.1 keywords: - epc - ngc diff --git a/charts/open5gs/README.md b/charts/open5gs/README.md index 431922842..40929f881 100644 --- a/charts/open5gs/README.md +++ b/charts/open5gs/README.md @@ -1,6 +1,6 @@ # open5gs -![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![AppVersion: 2.2.3](https://img.shields.io/badge/AppVersion-2.2.3-informational?style=flat-square) +![Version: 0.2.1](https://img.shields.io/badge/Version-0.2.1-informational?style=flat-square) ![AppVersion: 2.2.3](https://img.shields.io/badge/AppVersion-2.2.3-informational?style=flat-square) Helm chart to deploy Open5gs services on Kubernetes. @@ -20,6 +20,7 @@ Helm chart to deploy Open5gs services on Kubernetes. | Repository | Name | Version | |------------|------|---------| +| https://charts.bitnami.com/bitnami | common | 1.x.x | | https://charts.bitnami.com/bitnami | mongodb | ~9.2.2 | ## Values @@ -27,11 +28,12 @@ Helm chart to deploy Open5gs services on Kubernetes. | Key | Type | Default | Description | |-----|------|---------|-------------| | amf.logger.level | string | `"info"` | | -| amf.mcc | string | `"001"` | | -| amf.mnc | string | `"01"` | | +| amf.mcc | string | `"901"` | | +| amf.mnc | string | `"70"` | | | amf.parameter | object | `{}` | | | amf.region | string | `"2"` | | | amf.resources | object | `{}` | | +| amf.sd | string | `"1"` | | | amf.set | string | `"1"` | | | amf.sst | string | `"1"` | | | amf.tac | string | `"0001"` | | @@ -44,9 +46,14 @@ Helm chart to deploy Open5gs services on Kubernetes. | image.registry | string | `"docker.io"` | | | image.repository | string | `"openverso/open5gs"` | | | image.tag | string | `"2.2.3"` | | +| mme.externalService.enabled | bool | `true` | | +| mme.externalService.externalTrafficPolicy | string | `"Local"` | | +| mme.externalService.loadBalancerIP | string | `nil` | | +| mme.externalService.loadBalancerSourceRanges | list | `[]` | | +| mme.externalService.type | string | `"LoadBalancer"` | | | mme.logger.level | string | `"info"` | | -| mme.mcc | string | `"001"` | | -| mme.mnc | string | `"01"` | | +| mme.mcc | string | `"901"` | | +| mme.mnc | string | `"70"` | | | mme.parameter | object | `{}` | | | mme.resources | object | `{}` | | | mme.tac | string | `"0001"` | | @@ -70,6 +77,12 @@ Helm chart to deploy Open5gs services on Kubernetes. | sgwc.parameter.no_ipv6 | bool | `true` | | | sgwc.pool | object | `{}` | | | sgwc.resources | object | `{}` | | +| sgwu.externalService.advertiseDomain | string | `"ext.openverso.org"` | | +| sgwu.externalService.enabled | bool | `true` | | +| sgwu.externalService.externalTrafficPolicy | string | `"Local"` | | +| sgwu.externalService.loadBalancerIP | string | `nil` | | +| sgwu.externalService.loadBalancerSourceRanges | list | `[]` | | +| sgwu.externalService.type | string | `"LoadBalancer"` | | | sgwu.logger.level | string | `"info"` | | | sgwu.max | object | `{}` | | | sgwu.parameter.no_ipv6 | bool | `true` | | @@ -95,8 +108,8 @@ Helm chart to deploy Open5gs services on Kubernetes. | webui.image.tag | string | `"2.2.3"` | | | webui.ingress.annotations | object | `{}` | | | webui.ingress.certManager | bool | `false` | | -| webui.ingress.enabled | bool | `false` | | -| webui.ingress.hostname | string | `"open5gs.local"` | | +| webui.ingress.enabled | bool | `true` | | +| webui.ingress.hostname | string | `"open5gs.ingress.openverso.org"` | | | webui.ingress.path | string | `"/"` | | | webui.ingress.pathType | string | `"ImplementationSpecific"` | | | webui.ingress.tls | bool | `false` | | diff --git a/charts/open5gs/resources/config/amf.yaml b/charts/open5gs/resources/config/amf.yaml index 9cc6ce9be..956cf71ed 100644 --- a/charts/open5gs/resources/config/amf.yaml +++ b/charts/open5gs/resources/config/amf.yaml @@ -24,28 +24,29 @@ amf: ngap: dev: eth0 guami: - plmn_id: - mcc: {{ .Values.amf.mcc }} - mnc: {{ .Values.amf.mnc }} - amf_id: - region: {{ .Values.amf.region }} - set: {{ .Values.amf.set }} + - plmn_id: + mcc: {{ .Values.amf.mcc }} + mnc: {{ .Values.amf.mnc }} + amf_id: + region: {{ .Values.amf.region }} + set: {{ .Values.amf.set }} tai: - plmn_id: - mcc: {{ .Values.amf.mcc }} - mnc: {{ .Values.amf.mnc }} - tac: {{ .Values.amf.tac }} + - plmn_id: + mcc: {{ .Values.amf.mcc }} + mnc: {{ .Values.amf.mnc }} + tac: {{ .Values.amf.tac }} plmn_support: - plmn_id: - mcc: {{ .Values.amf.mcc }} - mnc: {{ .Values.amf.mnc }} - s_nssai: - sst: {{ .Values.amf.sst }} + - plmn_id: + mcc: {{ .Values.amf.mcc }} + mnc: {{ .Values.amf.mnc }} + s_nssai: + - sst: {{ .Values.amf.sst }} + sd: {{ .Values.amf.sd }} security: integrity_order : [ NIA2, NIA1, NIA0 ] ciphering_order : [ NEA0, NEA1, NEA2 ] network_name: - full: Open5GS + full: Gradiant amf_name: open5gs-amf0 nrf: diff --git a/charts/open5gs/resources/config/sgwu.yaml b/charts/open5gs/resources/config/sgwu.yaml index 1d6419684..fce4783ad 100644 --- a/charts/open5gs/resources/config/sgwu.yaml +++ b/charts/open5gs/resources/config/sgwu.yaml @@ -18,6 +18,13 @@ pool: sgwu: gtpu: dev: eth0 + {{- if .Values.sgwu.externalService.enabled }} + {{- if .Values.sgwu.externalService.advertise }} + advertise: {{ .Values.sgwu.advertise }} + {{- else }} + advertise: {{ include "common.names.fullname" . }}-sgwu-ext.{{ .Release.Namespace }}.{{ .Values.sgwu.externalService.advertiseDomain }} + {{- end }} + {{- end }} pfcp: dev: eth0 diff --git a/charts/open5gs/templates/amf-svc.yaml b/charts/open5gs/templates/amf-svc.yaml index 679ce0f1c..cb8aaa721 100644 --- a/charts/open5gs/templates/amf-svc.yaml +++ b/charts/open5gs/templates/amf-svc.yaml @@ -11,7 +11,7 @@ spec: protocol: TCP - name: ngap port: 38412 - protocol: UDP + protocol: SCTP publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} diff --git a/charts/open5gs/templates/mme-svc.yaml b/charts/open5gs/templates/mme-svc.yaml index 0707cd8f7..9217dd3d5 100644 --- a/charts/open5gs/templates/mme-svc.yaml +++ b/charts/open5gs/templates/mme-svc.yaml @@ -18,3 +18,32 @@ spec: publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: mme +--- +{{- if .Values.mme.externalService.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.names.fullname" . }}-mme-ext + labels: {{- include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: mme +spec: + type: {{ .Values.mme.externalService.type }} + sessionAffinity: {{ default "None" .Values.mme.externalService.sessionAffinity }} + {{- if and .Values.mme.externalService.clusterIP (eq .Values.mme.externalService.type "ClusterIP") }} + clusterIP: {{ .Values.mme.externalService.clusterIP }} + {{- end }} + {{- if and .Values.mme.externalService.loadBalancerIP (eq .Values.mme.externalService.type "LoadBalancer") }} + loadBalancerIP: {{ .Values.mme.externalService.loadBalancerIP }} + {{- end }} + {{- if and (eq .Values.mme.externalService.type "LoadBalancer") .Values.mme.externalService.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.mme.externalService.externalTrafficPolicy }} + {{- end }} + + ports: + - name: s1ap + port: 36412 + protocol: SCTP + publishNotReadyAddresses: true + selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + app.kubernetes.io/component: mme +{{- end }} \ No newline at end of file diff --git a/charts/open5gs/templates/sgwc-svc.yaml b/charts/open5gs/templates/sgwc-svc.yaml index 6e7a65e85..9af4e19b6 100644 --- a/charts/open5gs/templates/sgwc-svc.yaml +++ b/charts/open5gs/templates/sgwc-svc.yaml @@ -5,14 +5,13 @@ metadata: labels: {{- include "common.labels.standard" . | nindent 4 }} app.kubernetes.io/component: sgwc spec: - clusterIP: None - # ports: - # - name: gtp-c - # port: 2123 - # protocol: UDP - # - name: pfcp - # port: 8805 - # protocol: UDP + ports: + - name: gtp-c + port: 2123 + protocol: UDP + - name: pfcp + port: 8805 + protocol: UDP publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: sgwc diff --git a/charts/open5gs/templates/sgwu-svc.yaml b/charts/open5gs/templates/sgwu-svc.yaml index 69f53e699..92bf2f3ef 100644 --- a/charts/open5gs/templates/sgwu-svc.yaml +++ b/charts/open5gs/templates/sgwu-svc.yaml @@ -5,14 +5,41 @@ metadata: labels: {{- include "common.labels.standard" . | nindent 4 }} app.kubernetes.io/component: sgwu spec: - clusterIP: None - # ports: - # - name: gtp-u - # port: 2152 - # protocol: UDP - # - name: pfcp - # port: 8805 - # protocol: UDP + ports: + - name: gtp-u + port: 2152 + protocol: UDP + - name: pfcp + port: 8805 + protocol: UDP publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: sgwu +--- +{{- if .Values.sgwu.externalService.enabled }} +apiVersion: v1 +kind: Service +metadata: + name: {{ include "common.names.fullname" . }}-sgwu-ext + labels: {{- include "common.labels.standard" . | nindent 4 }} + app.kubernetes.io/component: sgwu +spec: + type: {{ .Values.sgwu.externalService.type }} + sessionAffinity: {{ default "None" .Values.sgwu.externalService.sessionAffinity }} + {{- if and .Values.sgwu.externalService.clusterIP (eq .Values.sgwu.externalService.type "ClusterIP") }} + clusterIP: {{ .Values.sgwu.externalService.clusterIP }} + {{- end }} + {{- if and .Values.sgwu.externalService.loadBalancerIP (eq .Values.sgwu.externalService.type "LoadBalancer") }} + loadBalancerIP: {{ .Values.sgwu.externalService.loadBalancerIP }} + {{- end }} + {{- if and (eq .Values.sgwu.externalService.type "LoadBalancer") .Values.sgwu.externalService.externalTrafficPolicy }} + externalTrafficPolicy: {{ .Values.sgwu.externalService.externalTrafficPolicy }} + {{- end }} + ports: + - name: gtp-u + port: 2152 + protocol: UDP + publishNotReadyAddresses: true + selector: {{- include "common.labels.matchLabels" . | nindent 4 }} + app.kubernetes.io/component: sgwu +{{- end }} diff --git a/charts/open5gs/templates/smf-svc.yaml b/charts/open5gs/templates/smf-svc.yaml index 1cfe238db..83efca343 100644 --- a/charts/open5gs/templates/smf-svc.yaml +++ b/charts/open5gs/templates/smf-svc.yaml @@ -5,20 +5,19 @@ metadata: labels: {{- include "common.labels.standard" . | nindent 4 }} app.kubernetes.io/component: smf spec: - clusterIP: None - # ports: - # - name: gtp-c - # port: 2123 - # protocol: UDP - # - name: pfcp - # port: 8805 - # protocol: UDP - # - name: s6a - # port: 3868 - # protocol: SCTP - # - name: sbi - # port: 7777 - # protocol: TCP + ports: + - name: gtp-c + port: 2123 + protocol: UDP + - name: pfcp + port: 8805 + protocol: UDP + - name: s6a + port: 3868 + protocol: SCTP + - name: sbi + port: 7777 + protocol: TCP publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: smf diff --git a/charts/open5gs/templates/upf-svc.yaml b/charts/open5gs/templates/upf-svc.yaml index 95c9969a0..21ae9b599 100644 --- a/charts/open5gs/templates/upf-svc.yaml +++ b/charts/open5gs/templates/upf-svc.yaml @@ -5,14 +5,13 @@ metadata: labels: {{- include "common.labels.standard" . | nindent 4 }} app.kubernetes.io/component: upf spec: - clusterIP: None -# ports: -# - name: gtp-u -# port: 2152 -# protocol: UDP -# - name: pfcp -# port: 8805 -# protocol: UDP + ports: + - name: gtp-u + port: 2152 + protocol: UDP + - name: pfcp + port: 8805 + protocol: UDP publishNotReadyAddresses: true selector: {{- include "common.labels.matchLabels" . | nindent 4 }} app.kubernetes.io/component: upf diff --git a/charts/open5gs/templates/webui-deployment.yaml b/charts/open5gs/templates/webui-deployment.yaml index 37d0d49b9..ed21b7e55 100644 --- a/charts/open5gs/templates/webui-deployment.yaml +++ b/charts/open5gs/templates/webui-deployment.yaml @@ -30,12 +30,18 @@ spec: - name: http containerPort: 3000 protocol: TCP + readinessProbe: + httpGet: + path: / + port: http + initialDelaySeconds: 30 + periodSeconds: 10 livenessProbe: httpGet: path: / port: http - initialDelaySeconds: 60 - periodSeconds: 30 + initialDelaySeconds: 30 + periodSeconds: 10 resources: {{ toYaml .Values.webui.resources | indent 10 }} terminationGracePeriodSeconds: 30 diff --git a/charts/open5gs/values.yaml b/charts/open5gs/values.yaml index 0cccb4404..99988861c 100644 --- a/charts/open5gs/values.yaml +++ b/charts/open5gs/values.yaml @@ -26,6 +26,7 @@ image: # password: # email: + webui: image: registry: docker.io @@ -46,7 +47,7 @@ webui: ## Set to true to enable ingress record generation ## - enabled: false + enabled: true ## Set this to true in order to add the corresponding annotations for cert-manager ## @@ -58,7 +59,7 @@ webui: ## When the ingress is enabled, a host pointing to this will be created ## - hostname: open5gs.local + hostname: open5gs.ingress.openverso.org ## The Path to open5gs webui. You may need to set this to '/*' in order to use this ## with ALB ingress controllers. @@ -90,9 +91,27 @@ mme: logger: level: info parameter: {} - mcc: "001" - mnc: "01" + mcc: "901" + mnc: "70" tac: "0001" + externalService: + enabled: false + type: LoadBalancer + ## @param service.loadBalancerSourceRanges Restricts access for LoadBalancer (only with `service.type: LoadBalancer`) + ## e.g: + ## loadBalancerSourceRanges: + ## - 0.0.0.0/0 + ## + loadBalancerSourceRanges: [] + ## @param service.loadBalancerIP loadBalancerIP for the MME Service (optional, cloud specific) + ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer + loadBalancerIP: + # external advertise name or IP + # Due to the implementation ofLoadBalancer, the source IP seen in the target container + # is not the original source IP of the client with default "Cluster" policy. + # To enable preservation of the client IP set this to "Local". + externalTrafficPolicy: Local + sgwc: resources: {} @@ -113,16 +132,39 @@ sgwu: no_ipv6: true max: {} pool: {} + externalService: + enabled: false + # set domain or ip accessible from enodeb. + # If not set, it is automagically set to SVC_NAME-ext.NAMESPACE.advertiseDomain + # advertise: "sgwu.openverso.org" + advertiseDomain: "ext.openverso.org" + type: LoadBalancer + ## @param service.loadBalancerSourceRanges Restricts access for LoadBalancer (only with `service.type: LoadBalancer`) + ## e.g: + ## loadBalancerSourceRanges: + ## - 0.0.0.0/0 + ## + loadBalancerSourceRanges: [] + ## @param service.loadBalancerIP loadBalancerIP for the SGWU Service (optional, cloud specific) + ## ref: http://kubernetes.io/docs/user-guide/services/#type-loadbalancer + loadBalancerIP: + # external advertise name or IP + # Due to the implementation ofLoaBalancer, the source IP seen in the target container + # is not the original source IP of the client with default "Cluster" policy. + # To enable preservation of the client IP set this to "Local". + externalTrafficPolicy: Local + amf: resources: {} logger: level: info parameter: {} - mcc: "001" - mnc: "01" + mcc: "901" + mnc: "70" tac: "0001" sst: "1" + sd: "1" region: "2" set: "1"