Skip to content

Commit

Permalink
Merge pull request #10 from Gradiant/ueransim
Browse files Browse the repository at this point in the history
Ueransim
  • Loading branch information
cgiraldo authored Jul 21, 2021
2 parents 5b250e9 + e78adb3 commit 5c445b5
Show file tree
Hide file tree
Showing 8 changed files with 445 additions and 0 deletions.
25 changes: 25 additions & 0 deletions charts/ueransim/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
annotations:
category: apps
apiVersion: v2
appVersion: 3.2.2
dependencies:
- name: common
repository: https://charts.bitnami.com/bitnami
tags:
- bitnami-common
version: 1.x.x
description: ueransim for 5G RAN simulation
engine: gotpl
home: https://github.com/aligungr/UERANSIM
icon: https://github.com/aligungr/UERANSIM/raw/master/.github/logo.png
keywords:
- apps
- gradiant
- k8s
maintainers:
- email: [email protected]
name: cgiraldo
name: ueransim
sources:
- https://github.com/aligungr/UERANSIM
version: 0.1.0
69 changes: 69 additions & 0 deletions charts/ueransim/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# ueransim

![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![AppVersion: 3.2.2](https://img.shields.io/badge/AppVersion-3.2.2-informational?style=flat-square)

ueransim for 5G RAN simulation

**Homepage:** <source_url>

## Maintainers

| Name | Email | Url |
| ---- | ------ | --- |
| Gradiant | [email protected] | |

## Source Code

* <source_url>

## Requirements

| Repository | Name | Version |
|------------|------|---------|
| https://charts.bitnami.com/bitnami | common | 1.x.x |

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| UECount | int | `4` | |
| affinity | object | `{}` | |
| amf | string | `"open5gs-amf"` | |
| apn | string | `"internet"` | |
| clusterDomain | string | `"cluster.local"` | |
| commonAnnotations | object | `{}` | |
| commonLabels | object | `{}` | |
| containerSecurityContext.enabled | bool | `false` | |
| extraDeploy | list | `[]` | |
| fullnameOverride | string | `nil` | |
| global.imagePullSecrets | list | `[]` | |
| global.imageRegistry | string | `nil` | |
| global.storageClass | string | `nil` | |
| image.debug | bool | `false` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.pullSecrets | list | `[]` | |
| image.registry | string | `"docker.io"` | |
| image.repository | string | `"openverso/ueransim"` | |
| image.tag | string | `"3.2.2"` | |
| initialMSISDN | string | `"0000000001"` | |
| key | string | `"465B5CE8B199B49FAA5F0A2EE238A6BC"` | |
| kubeVersion | string | `nil` | |
| mcc | string | `"901"` | |
| mnc | string | `"70"` | |
| nameOverride | string | `nil` | |
| nodeSelector | object | `{}` | |
| op | string | `"E8ED289DEBA952E4283B54E88E6183CA"` | |
| opType | string | `"OPC"` | |
| podAnnotations | object | `{}` | |
| podLabels | object | `{}` | |
| podSecurityContext.enabled | bool | `false` | |
| resources.limits | object | `{}` | |
| resources.requests | object | `{}` | |
| sd | int | `1` | |
| sst | int | `1` | |
| tac | string | `"0001"` | |
| tolerations | list | `[]` | |
| updateStrategy.type | string | `"RollingUpdate"` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
23 changes: 23 additions & 0 deletions charts/ueransim/resources/gnb.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
mcc: {{ .Values.mcc }} # Mobile Country Code value
mnc: {{ .Values.mnc }} # Mobile Network Code value (2 or 3 digits)

nci: '0x0000000100' # NR Cell Identity (36-bit)
idLength: 32 # NR gNB ID length in bits [22...32]
tac: {{ .Values.tac }} # Tracking Area Code

linkIp: 127.0.0.1 # gNB's local IP address for Radio Link Simulation (Usually same with local IP)
ngapIp: 0.0.0.0 # gNB's local IP address for N2 Interface (Usually same with local IP)
gtpIp: 0.0.0.0 # gNB's local IP address for N3 Interface (Usually same with local IP)

# List of AMF address information
amfConfigs:
- address: ${AMF_ADDR}
port: 38412

# List of supported S-NSSAIs by this gNB
slices:
- sst: {{ .Values.sst }}
sd: {{ .Values.sd }}

# Indicates whether or not SCTP stream number errors should be ignored.
ignoreStreamIds: true
73 changes: 73 additions & 0 deletions charts/ueransim/resources/ue.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# IMSI number of the UE. IMSI = [MCC|MNC|MSISDN] (In total 15 or 16 digits)
supi: 'imsi-{{ .Values.mcc }}{{ .Values.mnc }}{{ .Values.initialMSISDN }}'
# Mobile Country Code value
mcc: {{ .Values.mcc }}
# Mobile Network Code value (2 or 3 digits)
mnc: {{ .Values.mnc }}

# Permanent subscription key
key: '{{ .Values.key }}'
# Operator code (OP or OPC) of the UE
op: '{{ .Values.op }}'
# This value specifies the OP type and it can be either 'OP' or 'OPC'
opType: '{{ .Values.opType }}'
# Authentication Management Field (AMF) value
amf: '8000'
# IMEI number of the device. It is used if no SUPI is provided
imei: '356938035643803'
# IMEISV number of the device. It is used if no SUPI and IMEI is provided
imeiSv: '4370816125816151'

# List of gNB IP addresses for Radio Link Simulation
gnbSearchList:
- 127.0.0.1

# UAC Access Identities Configuration
uacAic:
mps: false
mcs: false

# UAC Access Control Class
uacAcc:
normalClass: 0
class11: false
class12: false
class13: false
class14: false
class15: false

# Initial PDU sessions to be established
sessions:
- type: 'IPv4'
apn: {{ .Values.apn }}
slice:
sst: {{ .Values.sst }}
sd: {{ .Values.sd }}
emergency: false

# Configured NSSAI for this UE by HPLMN
configured-nssai:
- sst: {{ .Values.sst }}
sd: {{ .Values.sd }}

# Default Configured NSSAI for this UE
default-nssai:
- sst: {{ .Values.sst }}
sd: {{ .Values.sd }}

# Supported encryption algorithms by this UE
integrity:
IA1: true
IA2: true
IA3: true

# Supported integrity algorithms by this UE
ciphering:
EA1: true
EA2: true
EA3: true

# Integrity protection maximum data rate for user plane
integrityMaxRate:
uplink: 'full'
downlink: 'full'
14 changes: 14 additions & 0 deletions charts/ueransim/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@

{{/*
Return the proper ueransim image name
*/}}
{{- define "ueransim.image" -}}
{{ include "common.images.image" (dict "imageRoot" .Values.image "global" .Values.global) }}
{{- end -}}

{{/*
Return the proper Docker Image Registry Secret Names
*/}}
{{- define "ueransim.imagePullSecrets" -}}
{{- include "common.images.pullSecrets" (dict "images" (list .Values.image) "global" .Values.global) -}}
{{- end -}}
19 changes: 19 additions & 0 deletions charts/ueransim/templates/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@

apiVersion: v1
kind: ConfigMap
metadata:
name: {{ include "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: gnb
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
data:
gnb.yaml: |
{{ tpl (.Files.Get "resources/gnb.yaml") . | indent 4 }}
ue.yaml: |
{{ tpl (.Files.Get "resources/ue.yaml") . | indent 4 }}
88 changes: 88 additions & 0 deletions charts/ueransim/templates/statefulset.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@

apiVersion: {{ include "common.capabilities.statefulset.apiVersion" . }}
kind: StatefulSet
metadata:
name: {{ template "common.names.fullname" . }}
namespace: {{ .Release.Namespace | quote }}
labels: {{- include "common.labels.standard" . | nindent 4 }}
app.kubernetes.io/component: gnb
{{- if .Values.commonLabels }}
{{- include "common.tplvalues.render" ( dict "value" .Values.commonLabels "context" $ ) | nindent 4 }}
{{- end }}
{{- if .Values.commonAnnotations }}
annotations: {{- include "common.tplvalues.render" ( dict "value" .Values.commonAnnotations "context" $ ) | nindent 4 }}
{{- end }}
spec:
replicas: 1
selector:
matchLabels: {{ include "common.labels.matchLabels" . | nindent 6 }}
app.kubernetes.io/component: gnb
serviceName: {{ template "common.names.fullname" . }}
{{- if .Values.updateStrategy }}
updateStrategy: {{- toYaml .Values.updateStrategy | nindent 4 }}
{{- end }}
template:
metadata:
{{- if .Values.podAnnotations }}
annotations: {{- include "common.tplvalues.render" (dict "value" .Values.podAnnotations "context" $) | nindent 8 }}
{{- end }}
labels: {{- include "common.labels.standard" . | nindent 8 }}
app.kubernetes.io/component: gnb
{{- if .Values.podLabels }}
{{- include "common.tplvalues.render" (dict "value" .Values.podLabels "context" $) | nindent 8 }}
{{- end }}
spec:
{{- include "ueransim.imagePullSecrets" . | nindent 6 }}
{{- if .Values.affinity }}
affinity: {{- include "common.tplvalues.render" ( dict "value" .Values.affinity "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.nodeSelector }}
nodeSelector: {{- include "common.tplvalues.render" ( dict "value" .Values.nodeSelector "context" $) | nindent 8 }}
{{- end }}
{{- if .Values.tolerations }}
tolerations: {{- include "common.tplvalues.render" (dict "value" .Values.tolerations "context" .) | nindent 8 }}
{{- end }}
{{- if .Values.podSecurityContext.enabled }}
securityContext: {{- omit .Values.podSecurityContext "enabled" | toYaml | nindent 8 }}
{{- end }}
containers:
- name: gnodeb
image: {{ template "ueransim.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.containerSecurityContext.enabled }}
securityContext: {{- omit .Values.containerSecurityContext "enabled" | toYaml | nindent 12 }}
{{- end }}
args:
- gnb
env:
- name: AMF_HOSTNAME
value: {{ .Values.amf }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/ueransim/gnb.yaml
subPath: "gnb.yaml"
- name: ues
image: {{ template "ueransim.image" . }}
imagePullPolicy: {{ .Values.image.pullPolicy }}
securityContext:
privileged: true
capabilities:
add: ["NET_ADMIN"]
args:
- ue
- -n
- {{ .Values.UECount | quote }}
{{- if .Values.resources }}
resources: {{- toYaml .Values.resources | nindent 12 }}
{{- end }}
volumeMounts:
- name: config
mountPath: /etc/ueransim/ue.yaml
subPath: "ue.yaml"
volumes:
- name: config
configMap:
name: {{ include "common.names.fullname" . }}
Loading

0 comments on commit 5c445b5

Please sign in to comment.