diff --git a/charts/physims/charts/dlsim.100rb+tm2/Chart.yaml b/charts/physims/charts/dlsim.100rb+tm2/Chart.yaml new file mode 100644 index 0000000000..4d7cea8e23 --- /dev/null +++ b/charts/physims/charts/dlsim.100rb+tm2/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-dlsim-100rb-tm2 +description: A Helm subchart for dlsim network function ("100rb+tm2" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - dlsim + - RAN + - 4G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/dlsim.100rb+tm2/templates/NOTES.txt b/charts/physims/charts/dlsim.100rb+tm2/templates/NOTES.txt new file mode 100644 index 0000000000..89f5185499 --- /dev/null +++ b/charts/physims/charts/dlsim.100rb+tm2/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-dlsim-100rb-tm2.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-dlsim-100rb-tm2.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-dlsim-100rb-tm2.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-dlsim-100rb-tm2.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/dlsim.100rb+tm2/templates/_helpers.tpl b/charts/physims/charts/dlsim.100rb+tm2/templates/_helpers.tpl new file mode 100644 index 0000000000..ee2418aee1 --- /dev/null +++ b/charts/physims/charts/dlsim.100rb+tm2/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-dlsim-100rb-tm2.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-dlsim-100rb-tm2.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-dlsim-100rb-tm2.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-dlsim-100rb-tm2.labels" -}} +helm.sh/chart: {{ include "oai-dlsim-100rb-tm2.chart" . }} +{{ include "oai-dlsim-100rb-tm2.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-dlsim-100rb-tm2.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-dlsim-100rb-tm2.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-dlsim-100rb-tm2.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-dlsim-100rb-tm2.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/dlsim.100rb+tm2/templates/deployment.yaml b/charts/physims/charts/dlsim.100rb+tm2/templates/deployment.yaml new file mode 100644 index 0000000000..1339f4dcc0 --- /dev/null +++ b/charts/physims/charts/dlsim.100rb+tm2/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-dlsim-100rb-tm2.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-dlsim-100rb-tm2.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-dlsim-100rb-tm2.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-dlsim-100rb + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "dlsim.100rb+tm2" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/dlsim.100rb+tm2/templates/service.yaml b/charts/physims/charts/dlsim.100rb+tm2/templates/service.yaml new file mode 100644 index 0000000000..377e567c9a --- /dev/null +++ b/charts/physims/charts/dlsim.100rb+tm2/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-dlsim-100rb-tm2.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-dlsim-100rb-tm2 + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-dlsim-100rb-tm2.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/dlsim.100rb+tm2/values.yaml b/charts/physims/charts/dlsim.100rb+tm2/values.yaml new file mode 100644 index 0000000000..9b60e29f30 --- /dev/null +++ b/charts/physims/charts/dlsim.100rb+tm2/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-dlsim-100rb+tm2 +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-dlsim-100rb-tm2" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/dlsim/Chart.yaml b/charts/physims/charts/dlsim.basic/Chart.yaml similarity index 92% rename from charts/physims/charts/dlsim/Chart.yaml rename to charts/physims/charts/dlsim.basic/Chart.yaml index de7f5958b2..8fadf3e6b2 100644 --- a/charts/physims/charts/dlsim/Chart.yaml +++ b/charts/physims/charts/dlsim.basic/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-dlsim -description: A Helm subchart for dlsim network function +name: oai-dlsim-basic +description: A Helm subchart for dlsim network function ("basic" tests) # A chart can be either an 'application' or a 'library' chart. # diff --git a/charts/physims/charts/dlsim/templates/NOTES.txt b/charts/physims/charts/dlsim.basic/templates/NOTES.txt similarity index 74% rename from charts/physims/charts/dlsim/templates/NOTES.txt rename to charts/physims/charts/dlsim.basic/templates/NOTES.txt index 75b79e3dd4..1111598300 100644 --- a/charts/physims/charts/dlsim/templates/NOTES.txt +++ b/charts/physims/charts/dlsim.basic/templates/NOTES.txt @@ -1,15 +1,15 @@ 1. Get the application URL by running these commands: {{- if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-dlsim.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-dlsim-basic.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-dlsim.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-dlsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-dlsim-basic.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-dlsim-basic.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-dlsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-dlsim-basic.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 {{- end }} diff --git a/charts/physims/charts/nr-pbchsim/templates/_helpers.tpl b/charts/physims/charts/dlsim.basic/templates/_helpers.tpl similarity index 73% rename from charts/physims/charts/nr-pbchsim/templates/_helpers.tpl rename to charts/physims/charts/dlsim.basic/templates/_helpers.tpl index 0e31033343..d6dac8be45 100644 --- a/charts/physims/charts/nr-pbchsim/templates/_helpers.tpl +++ b/charts/physims/charts/dlsim.basic/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "oai-nr-pbchsim.name" -}} +{{- define "oai-dlsim-basic.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "oai-nr-pbchsim.fullname" -}} +{{- define "oai-dlsim-basic.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "oai-nr-pbchsim.chart" -}} +{{- define "oai-dlsim-basic.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "oai-nr-pbchsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-pbchsim.chart" . }} -{{ include "oai-nr-pbchsim.selectorLabels" . }} +{{- define "oai-dlsim-basic.labels" -}} +helm.sh/chart: {{ include "oai-dlsim-basic.chart" . }} +{{ include "oai-dlsim-basic.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "oai-nr-pbchsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-pbchsim.name" . }} +{{- define "oai-dlsim-basic.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-dlsim-basic.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "oai-nr-pbchsim.serviceAccountName" -}} +{{- define "oai-dlsim-basic.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-pbchsim.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-dlsim-basic.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/charts/physims/charts/dlsim/templates/deployment.yaml b/charts/physims/charts/dlsim.basic/templates/deployment.yaml similarity index 81% rename from charts/physims/charts/dlsim/templates/deployment.yaml rename to charts/physims/charts/dlsim.basic/templates/deployment.yaml index 554e550290..168b58748a 100644 --- a/charts/physims/charts/dlsim/templates/deployment.yaml +++ b/charts/physims/charts/dlsim.basic/templates/deployment.yaml @@ -3,18 +3,18 @@ kind: Deployment metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-dlsim.labels" . | nindent 4 }} + {{- include "oai-dlsim-basic.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "oai-dlsim.selectorLabels" . | nindent 6 }} + {{- include "oai-dlsim-basic.selectorLabels" . | nindent 6 }} strategy: type: Recreate template: metadata: labels: - {{- include "oai-dlsim.selectorLabels" . | nindent 8 }} + {{- include "oai-dlsim-basic.selectorLabels" . | nindent 8 }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -30,14 +30,14 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} ports: - containerPort: 80 - name: oai-dlsim + name: oai-dlsim-basic env: - name: OPENAIR_DIR value: /opt/oai-physim command: ["/bin/sh", "-c"] args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "dlsim" -d bin/ && + - > + cmake_targets/autotests/run_exec_autotests.bash -g "dlsim.basic" -d bin/ && echo "FINISHED" && sleep infinity dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/charts/physims/charts/dlsim/templates/service.yaml b/charts/physims/charts/dlsim.basic/templates/service.yaml similarity index 72% rename from charts/physims/charts/dlsim/templates/service.yaml rename to charts/physims/charts/dlsim.basic/templates/service.yaml index 6aeb0dbf53..27e22a31d9 100644 --- a/charts/physims/charts/dlsim/templates/service.yaml +++ b/charts/physims/charts/dlsim.basic/templates/service.yaml @@ -3,18 +3,18 @@ kind: Service metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-dlsim.labels" . | nindent 4 }} + {{- include "oai-dlsim-basic.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} {{- if contains "ClusterIP" .Values.service.type }} clusterIP: None {{- end }} ports: - - name: oai-dlsim + - name: oai-dlsim-basic # Port accessible outside cluster port: {{ .Values.service.port }} # Port to forward to inside the pod targetPort: {{ .Values.service.Port }} protocol: TCP selector: - {{- include "oai-dlsim.selectorLabels" . | nindent 4 }} + {{- include "oai-dlsim-basic.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-ulsim/values.yaml b/charts/physims/charts/dlsim.basic/values.yaml similarity index 95% rename from charts/physims/charts/nr-ulsim/values.yaml rename to charts/physims/charts/dlsim.basic/values.yaml index 71c455b69c..bb63644c2b 100644 --- a/charts/physims/charts/nr-ulsim/values.yaml +++ b/charts/physims/charts/dlsim.basic/values.yaml @@ -1,4 +1,4 @@ -# Default values for oai-nr-ulsim. +# Default values for oai-dlsim-basic # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -25,7 +25,7 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-ulsim-sa" + name: "oai-dlsim-basic" podSecurityContext: runAsUser: 0 diff --git a/charts/physims/charts/nr-dlsim/Chart.yaml b/charts/physims/charts/nr-dlsim.basic/Chart.yaml similarity index 91% rename from charts/physims/charts/nr-dlsim/Chart.yaml rename to charts/physims/charts/nr-dlsim.basic/Chart.yaml index 2ec4b7eabd..b2a090a4b2 100644 --- a/charts/physims/charts/nr-dlsim/Chart.yaml +++ b/charts/physims/charts/nr-dlsim.basic/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-nr-dlsim -description: A Helm subchart for nr-dlsim network function +name: oai-nr-dlsim-basic +description: A Helm subchart for nr-dlsim network function ("basic" tests) # A chart can be either an 'application' or a 'library' chart. # diff --git a/charts/physims/charts/nr-dlsim/templates/NOTES.txt b/charts/physims/charts/nr-dlsim.basic/templates/NOTES.txt similarity index 73% rename from charts/physims/charts/nr-dlsim/templates/NOTES.txt rename to charts/physims/charts/nr-dlsim.basic/templates/NOTES.txt index 79027454cf..c8a7bbfd1b 100644 --- a/charts/physims/charts/nr-dlsim/templates/NOTES.txt +++ b/charts/physims/charts/nr-dlsim.basic/templates/NOTES.txt @@ -1,15 +1,15 @@ 1. Get the application URL by running these commands: {{- if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim-basic.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim-basic.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim-basic.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim-basic.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 {{- end }} diff --git a/charts/physims/charts/nr-dlsim.basic/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.basic/templates/_helpers.tpl new file mode 100644 index 0000000000..733a367061 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.basic/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-dlsim-basic.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-dlsim-basic.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-dlsim-basic.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-dlsim-basic.labels" -}} +helm.sh/chart: {{ include "oai-nr-dlsim-basic.chart" . }} +{{ include "oai-nr-dlsim-basic.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-dlsim-basic.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-dlsim-basic.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-dlsim-basic.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-dlsim-basic.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.basic/templates/deployment.yaml b/charts/physims/charts/nr-dlsim.basic/templates/deployment.yaml new file mode 100644 index 0000000000..2337ad98fd --- /dev/null +++ b/charts/physims/charts/nr-dlsim.basic/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-basic.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-dlsim-basic.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-dlsim-basic.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-dlsim-ba + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.basic" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-dlsim.basic/templates/service.yaml b/charts/physims/charts/nr-dlsim.basic/templates/service.yaml new file mode 100644 index 0000000000..5bf3baf772 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.basic/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-basic.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-dlsim-basic + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-dlsim-basic.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-dlsim.basic/values.yaml b/charts/physims/charts/nr-dlsim.basic/values.yaml new file mode 100644 index 0000000000..9829ecf256 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.basic/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-dlsim-basic +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-dlsim-basic" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/Chart.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/Chart.yaml new file mode 100644 index 0000000000..c5f51341c4 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.dmrs+ptrs/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-dlsim-dmrs-ptrs +description: A Helm subchart for nr-dlsim network function ("dmrs+ptrs" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-dlsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/NOTES.txt b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/NOTES.txt new file mode 100644 index 0000000000..5e8f9ba046 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim-dmrs-ptrs.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim-dmrs-ptrs.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim-dmrs-ptrs.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim-dmrs-ptrs.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/_helpers.tpl new file mode 100644 index 0000000000..85bf9e860c --- /dev/null +++ b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-dlsim-dmrs-ptrs.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-dlsim-dmrs-ptrs.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-dlsim-dmrs-ptrs.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-dlsim-dmrs-ptrs.labels" -}} +helm.sh/chart: {{ include "oai-nr-dlsim-dmrs-ptrs.chart" . }} +{{ include "oai-nr-dlsim-dmrs-ptrs.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-dlsim-dmrs-ptrs.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-dlsim-dmrs-ptrs.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-dlsim-dmrs-ptrs.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-dlsim-dmrs-ptrs.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/deployment.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/deployment.yaml new file mode 100644 index 0000000000..dc3ebb34d6 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-dmrs-ptrs.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-dlsim-dmrs-ptrs.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-dlsim-dmrs-ptrs.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-dlsim-dm + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.dmrs+ptrs" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/service.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/service.yaml new file mode 100644 index 0000000000..b2c3a43b55 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.dmrs+ptrs/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-dmrs-ptrs.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-dlsim-dmrs-ptrs + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-dlsim-dmrs-ptrs.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-dlsim.dmrs+ptrs/values.yaml b/charts/physims/charts/nr-dlsim.dmrs+ptrs/values.yaml new file mode 100644 index 0000000000..c414d58132 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.dmrs+ptrs/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-dlsim-dmrs+ptrs +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-dlsim-dmrs-ptrs" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/Chart.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/Chart.yaml new file mode 100644 index 0000000000..55ea194f07 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.mcs+mimo/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-dlsim-mcs-mimo +description: A Helm subchart for nr-dlsim network function ("mcs+mimo" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-dlsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/NOTES.txt b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/NOTES.txt new file mode 100644 index 0000000000..34e88d2136 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim-mcs-mimo.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim-mcs-mimo.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim-mcs-mimo.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim-mcs-mimo.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/_helpers.tpl new file mode 100644 index 0000000000..246383d370 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-dlsim-mcs-mimo.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-dlsim-mcs-mimo.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-dlsim-mcs-mimo.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-dlsim-mcs-mimo.labels" -}} +helm.sh/chart: {{ include "oai-nr-dlsim-mcs-mimo.chart" . }} +{{ include "oai-nr-dlsim-mcs-mimo.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-dlsim-mcs-mimo.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-dlsim-mcs-mimo.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-dlsim-mcs-mimo.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-dlsim-mcs-mimo.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/deployment.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/deployment.yaml new file mode 100644 index 0000000000..5d38cf21c0 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-mcs-mimo.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-dlsim-mcs-mimo.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-dlsim-mcs-mimo.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-dlsim-mc + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.mcs+mimo" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/templates/service.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/service.yaml new file mode 100644 index 0000000000..c1552fc314 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.mcs+mimo/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-mcs-mimo.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-dlsim-mcs-mimo + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-dlsim-mcs-mimo.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-dlsim.mcs+mimo/values.yaml b/charts/physims/charts/nr-dlsim.mcs+mimo/values.yaml new file mode 100644 index 0000000000..cdc58817d9 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.mcs+mimo/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-dlsim-mcs-mimo +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-dlsim-mcs-mimo" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-dlsim.offset/Chart.yaml b/charts/physims/charts/nr-dlsim.offset/Chart.yaml new file mode 100644 index 0000000000..e4fa9a4100 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.offset/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-dlsim-offset +description: A Helm subchart for nr-dlsim network function ("offset" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-dlsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-dlsim.offset/templates/NOTES.txt b/charts/physims/charts/nr-dlsim.offset/templates/NOTES.txt new file mode 100644 index 0000000000..9a7d8f6013 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.offset/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-dlsim-offset.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-dlsim-offset.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-dlsim-offset.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-dlsim-offset.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-dlsim.offset/templates/_helpers.tpl b/charts/physims/charts/nr-dlsim.offset/templates/_helpers.tpl new file mode 100644 index 0000000000..74417c21d9 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.offset/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-dlsim-offset.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-dlsim-offset.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-dlsim-offset.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-dlsim-offset.labels" -}} +helm.sh/chart: {{ include "oai-nr-dlsim-offset.chart" . }} +{{ include "oai-nr-dlsim-offset.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-dlsim-offset.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-dlsim-offset.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-dlsim-offset.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-dlsim-offset.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-dlsim/templates/deployment.yaml b/charts/physims/charts/nr-dlsim.offset/templates/deployment.yaml similarity index 82% rename from charts/physims/charts/nr-dlsim/templates/deployment.yaml rename to charts/physims/charts/nr-dlsim.offset/templates/deployment.yaml index c9b9880748..b952654c93 100644 --- a/charts/physims/charts/nr-dlsim/templates/deployment.yaml +++ b/charts/physims/charts/nr-dlsim.offset/templates/deployment.yaml @@ -3,18 +3,18 @@ kind: Deployment metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-nr-dlsim.labels" . | nindent 4 }} + {{- include "oai-nr-dlsim-offset.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "oai-nr-dlsim.selectorLabels" . | nindent 6 }} + {{- include "oai-nr-dlsim-offset.selectorLabels" . | nindent 6 }} strategy: type: Recreate template: metadata: labels: - {{- include "oai-nr-dlsim.selectorLabels" . | nindent 8 }} + {{- include "oai-nr-dlsim-offset.selectorLabels" . | nindent 8 }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -30,14 +30,13 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} ports: - containerPort: 80 - name: oai-nr-dlsim env: - name: OPENAIR_DIR value: /opt/oai-physim command: ["/bin/sh", "-c"] args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim" -d bin/ && + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_dlsim.offset" -d bin/ && echo "FINISHED" && sleep infinity dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/charts/physims/charts/nr-dlsim.offset/templates/service.yaml b/charts/physims/charts/nr-dlsim.offset/templates/service.yaml new file mode 100644 index 0000000000..dfcbc675a9 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.offset/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-dlsim-offset.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-dlsim-offset + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-dlsim-offset.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-dlsim.offset/values.yaml b/charts/physims/charts/nr-dlsim.offset/values.yaml new file mode 100644 index 0000000000..2c15b20410 --- /dev/null +++ b/charts/physims/charts/nr-dlsim.offset/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-dlsim-offset +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-dlsim-offset" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-pbchsim/Chart.yaml b/charts/physims/charts/nr-pbchsim.106rb/Chart.yaml similarity index 91% rename from charts/physims/charts/nr-pbchsim/Chart.yaml rename to charts/physims/charts/nr-pbchsim.106rb/Chart.yaml index 6d8359598d..ea93f8da58 100644 --- a/charts/physims/charts/nr-pbchsim/Chart.yaml +++ b/charts/physims/charts/nr-pbchsim.106rb/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-nr-pbchsim -description: A Helm subchart for nr-pbchsim network function +name: oai-nr-pbchsim-106rb +description: A Helm subchart for nr-pbchsim network function ("106rb" tests) # A chart can be either an 'application' or a 'library' chart. # diff --git a/charts/physims/charts/nr-pbchsim/templates/NOTES.txt b/charts/physims/charts/nr-pbchsim.106rb/templates/NOTES.txt similarity index 73% rename from charts/physims/charts/nr-pbchsim/templates/NOTES.txt rename to charts/physims/charts/nr-pbchsim.106rb/templates/NOTES.txt index cee233d4f3..2e0d2ef627 100644 --- a/charts/physims/charts/nr-pbchsim/templates/NOTES.txt +++ b/charts/physims/charts/nr-pbchsim.106rb/templates/NOTES.txt @@ -1,15 +1,15 @@ 1. Get the application URL by running these commands: {{- if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pbchsim.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pbchsim-106rb.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pbchsim.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pbchsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pbchsim-106rb.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pbchsim-106rb.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pbchsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pbchsim-106rb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 {{- end }} diff --git a/charts/physims/charts/nr-pbchsim.106rb/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.106rb/templates/_helpers.tpl new file mode 100644 index 0000000000..1ea88a4681 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.106rb/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-pbchsim-106rb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-pbchsim-106rb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-pbchsim-106rb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-pbchsim-106rb.labels" -}} +helm.sh/chart: {{ include "oai-nr-pbchsim-106rb.chart" . }} +{{ include "oai-nr-pbchsim-106rb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-pbchsim-106rb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-pbchsim-106rb.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-pbchsim-106rb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-pbchsim-106rb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim/templates/deployment.yaml b/charts/physims/charts/nr-pbchsim.106rb/templates/deployment.yaml similarity index 82% rename from charts/physims/charts/nr-pbchsim/templates/deployment.yaml rename to charts/physims/charts/nr-pbchsim.106rb/templates/deployment.yaml index 7d22f18dce..b9c5cfdd79 100644 --- a/charts/physims/charts/nr-pbchsim/templates/deployment.yaml +++ b/charts/physims/charts/nr-pbchsim.106rb/templates/deployment.yaml @@ -3,18 +3,18 @@ kind: Deployment metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-nr-pbchsim.labels" . | nindent 4 }} + {{- include "oai-nr-pbchsim-106rb.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "oai-nr-pbchsim.selectorLabels" . | nindent 6 }} + {{- include "oai-nr-pbchsim-106rb.selectorLabels" . | nindent 6 }} strategy: type: Recreate template: metadata: labels: - {{- include "oai-nr-pbchsim.selectorLabels" . | nindent 8 }} + {{- include "oai-nr-pbchsim-106rb.selectorLabels" . | nindent 8 }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -36,8 +36,8 @@ spec: value: /opt/oai-physim command: ["/bin/sh", "-c"] args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim" -d bin/ && + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.106rb" -d bin/ && echo "FINISHED" && sleep infinity dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/charts/physims/charts/nr-pbchsim.106rb/templates/service.yaml b/charts/physims/charts/nr-pbchsim.106rb/templates/service.yaml new file mode 100644 index 0000000000..da62687827 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.106rb/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-pbchsim-106rb.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-pbchsim-106rb + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-pbchsim-106rb.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-pbchsim.106rb/values.yaml b/charts/physims/charts/nr-pbchsim.106rb/values.yaml new file mode 100644 index 0000000000..5a3846b2de --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.106rb/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-pbchsim-106rb +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-pbchsim-106rb" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-pbchsim.217rb/Chart.yaml b/charts/physims/charts/nr-pbchsim.217rb/Chart.yaml new file mode 100644 index 0000000000..74561a42e9 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.217rb/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-pbchsim-217rb +description: A Helm subchart for nr-pbchsim network function ("217rb" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-pbchsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pbchsim.217rb/templates/NOTES.txt b/charts/physims/charts/nr-pbchsim.217rb/templates/NOTES.txt new file mode 100644 index 0000000000..3e9e91db9b --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.217rb/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pbchsim-217rb.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pbchsim-217rb.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pbchsim-217rb.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pbchsim-217rb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-pbchsim.217rb/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.217rb/templates/_helpers.tpl new file mode 100644 index 0000000000..28bb7fa4a0 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.217rb/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-pbchsim-217rb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-pbchsim-217rb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-pbchsim-217rb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-pbchsim-217rb.labels" -}} +helm.sh/chart: {{ include "oai-nr-pbchsim-217rb.chart" . }} +{{ include "oai-nr-pbchsim-217rb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-pbchsim-217rb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-pbchsim-217rb.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-pbchsim-217rb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-pbchsim-217rb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim.217rb/templates/deployment.yaml b/charts/physims/charts/nr-pbchsim.217rb/templates/deployment.yaml new file mode 100644 index 0000000000..81f23745bd --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.217rb/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-pbchsim-217rb.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-pbchsim-217rb.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-pbchsim-217rb.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-pbchsim + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.217rb" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-pbchsim.217rb/templates/service.yaml b/charts/physims/charts/nr-pbchsim.217rb/templates/service.yaml new file mode 100644 index 0000000000..696c889d15 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.217rb/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-pbchsim-217rb.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-pbchsim-217rb + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-pbchsim-217rb.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-pbchsim.217rb/values.yaml b/charts/physims/charts/nr-pbchsim.217rb/values.yaml new file mode 100644 index 0000000000..b23186f267 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.217rb/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-pbchsim-217rb +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-pbchsim-217rb" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-pbchsim.273rb/Chart.yaml b/charts/physims/charts/nr-pbchsim.273rb/Chart.yaml new file mode 100644 index 0000000000..6fab0faad8 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.273rb/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-pbchsim-273rb +description: A Helm subchart for nr-pbchsim network function ("273rb" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-pbchsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-pbchsim.273rb/templates/NOTES.txt b/charts/physims/charts/nr-pbchsim.273rb/templates/NOTES.txt new file mode 100644 index 0000000000..999186deb2 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.273rb/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-pbchsim-273rb.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-pbchsim-273rb.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-pbchsim-273rb.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-pbchsim-273rb.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-pbchsim.273rb/templates/_helpers.tpl b/charts/physims/charts/nr-pbchsim.273rb/templates/_helpers.tpl new file mode 100644 index 0000000000..2682e2f699 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.273rb/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-pbchsim-273rb.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-pbchsim-273rb.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-pbchsim-273rb.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-pbchsim-273rb.labels" -}} +helm.sh/chart: {{ include "oai-nr-pbchsim-273rb.chart" . }} +{{ include "oai-nr-pbchsim-273rb.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-pbchsim-273rb.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-pbchsim-273rb.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-pbchsim-273rb.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-pbchsim-273rb.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-pbchsim.273rb/templates/deployment.yaml b/charts/physims/charts/nr-pbchsim.273rb/templates/deployment.yaml new file mode 100644 index 0000000000..d0eb02d1f8 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.273rb/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-pbchsim-273rb.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-pbchsim-273rb.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-pbchsim-273rb.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-pbchsim + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_pbchsim.273rb" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-pbchsim.273rb/templates/service.yaml b/charts/physims/charts/nr-pbchsim.273rb/templates/service.yaml new file mode 100644 index 0000000000..4106d1a12f --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.273rb/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-pbchsim-273rb.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-pbchsim-273rb + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-pbchsim-273rb.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-pbchsim.273rb/values.yaml b/charts/physims/charts/nr-pbchsim.273rb/values.yaml new file mode 100644 index 0000000000..a17d3297d8 --- /dev/null +++ b/charts/physims/charts/nr-pbchsim.273rb/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-pbchsim-273rb +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-pbchsim-273rb" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/charts/nr-ulsim/Chart.yaml b/charts/physims/charts/nr-ulsim.3gpp/Chart.yaml similarity index 92% rename from charts/physims/charts/nr-ulsim/Chart.yaml rename to charts/physims/charts/nr-ulsim.3gpp/Chart.yaml index ede87ea7e4..e2de26c5e8 100644 --- a/charts/physims/charts/nr-ulsim/Chart.yaml +++ b/charts/physims/charts/nr-ulsim.3gpp/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v1 -name: oai-nr-ulsim -description: A Helm subchart for nr-ulsim network function +name: oai-nr-ulsim-3gpp +description: A Helm subchart for nr-ulsim network function ("3gpp" tests) # A chart can be either an 'application' or a 'library' chart. # diff --git a/charts/physims/charts/nr-ulsim/templates/NOTES.txt b/charts/physims/charts/nr-ulsim.3gpp/templates/NOTES.txt similarity index 73% rename from charts/physims/charts/nr-ulsim/templates/NOTES.txt rename to charts/physims/charts/nr-ulsim.3gpp/templates/NOTES.txt index 6865eeaedf..aea103922e 100644 --- a/charts/physims/charts/nr-ulsim/templates/NOTES.txt +++ b/charts/physims/charts/nr-ulsim.3gpp/templates/NOTES.txt @@ -1,15 +1,15 @@ 1. Get the application URL by running these commands: {{- if contains "NodePort" .Values.service.type }} - export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim.fullname" . }}) + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim-3gpp.fullname" . }}) export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") echo http://$NODE_IP:$NODE_PORT {{- else if contains "LoadBalancer" .Values.service.type }} NOTE: It may take a few minutes for the LoadBalancer IP to be available. - You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim.fullname" . }}' - export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim-3gpp.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim-3gpp.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") echo http://$SERVICE_IP:{{ .Values.service.port }} {{- else if contains "ClusterIP" .Values.service.type }} - export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim-3gpp.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") echo "Visit http://127.0.0.1:8080 to use your application" kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 {{- end }} diff --git a/charts/physims/charts/nr-ulsim/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.3gpp/templates/_helpers.tpl similarity index 77% rename from charts/physims/charts/nr-ulsim/templates/_helpers.tpl rename to charts/physims/charts/nr-ulsim.3gpp/templates/_helpers.tpl index 90f0bd0e36..4655516f35 100644 --- a/charts/physims/charts/nr-ulsim/templates/_helpers.tpl +++ b/charts/physims/charts/nr-ulsim.3gpp/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "oai-nr-ulsim.name" -}} +{{- define "oai-nr-ulsim-3gpp.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "oai-nr-ulsim.fullname" -}} +{{- define "oai-nr-ulsim-3gpp.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "oai-nr-ulsim.chart" -}} +{{- define "oai-nr-ulsim-3gpp.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "oai-nr-ulsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-ulsim.chart" . }} -{{ include "oai-nr-ulsim.selectorLabels" . }} +{{- define "oai-nr-ulsim-3gpp.labels" -}} +helm.sh/chart: {{ include "oai-nr-ulsim-3gpp.chart" . }} +{{ include "oai-nr-ulsim-3gpp.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,15 +46,15 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "oai-nr-ulsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-ulsim.name" . }} +{{- define "oai-nr-ulsim-3gpp.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-ulsim-3gpp.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "oai-nr-ulsim.serviceAccountName" -}} +{{- define "oai-nr-ulsim-3gpp.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} {{- else -}} diff --git a/charts/physims/charts/nr-ulsim/templates/deployment.yaml b/charts/physims/charts/nr-ulsim.3gpp/templates/deployment.yaml similarity index 81% rename from charts/physims/charts/nr-ulsim/templates/deployment.yaml rename to charts/physims/charts/nr-ulsim.3gpp/templates/deployment.yaml index 26bc45936d..801252e0ea 100644 --- a/charts/physims/charts/nr-ulsim/templates/deployment.yaml +++ b/charts/physims/charts/nr-ulsim.3gpp/templates/deployment.yaml @@ -3,18 +3,18 @@ kind: Deployment metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-nr-ulsim.labels" . | nindent 4 }} + {{- include "oai-nr-ulsim-3gpp.labels" . | nindent 4 }} spec: replicas: {{ .Values.replicaCount }} selector: matchLabels: - {{- include "oai-nr-ulsim.selectorLabels" . | nindent 6 }} + {{- include "oai-nr-ulsim-3gpp.selectorLabels" . | nindent 6 }} strategy: type: Recreate template: metadata: labels: - {{- include "oai-nr-ulsim.selectorLabels" . | nindent 8 }} + {{- include "oai-nr-ulsim-3gpp.selectorLabels" . | nindent 8 }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -30,14 +30,14 @@ spec: {{- toYaml .Values.securityContext | nindent 12 }} ports: - containerPort: 80 - name: oai-nr-ulsim + name: oai-nr-ulsim-3g env: - name: OPENAIR_DIR value: /opt/oai-physim command: ["/bin/sh", "-c"] args: - - > - cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim" -d bin/ && + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.3gpp" -d bin/ && echo "FINISHED" && sleep infinity dnsPolicy: ClusterFirst restartPolicy: Always diff --git a/charts/physims/charts/nr-dlsim/templates/service.yaml b/charts/physims/charts/nr-ulsim.3gpp/templates/service.yaml similarity index 71% rename from charts/physims/charts/nr-dlsim/templates/service.yaml rename to charts/physims/charts/nr-ulsim.3gpp/templates/service.yaml index c58433f3b2..fc5ce516ad 100644 --- a/charts/physims/charts/nr-dlsim/templates/service.yaml +++ b/charts/physims/charts/nr-ulsim.3gpp/templates/service.yaml @@ -3,18 +3,18 @@ kind: Service metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-nr-dlsim.labels" . | nindent 4 }} + {{- include "oai-nr-ulsim-3gpp.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} {{- if contains "ClusterIP" .Values.service.type }} clusterIP: None {{- end }} ports: - - name: oai-nr-dlsim + - name: oai-nr-ulsim-3gpp # Port accessible outside cluster port: {{ .Values.service.port }} # Port to forward to inside the pod targetPort: {{ .Values.service.Port }} protocol: TCP selector: - {{- include "oai-nr-dlsim.selectorLabels" . | nindent 4 }} + {{- include "oai-nr-ulsim-3gpp.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-pbchsim/values.yaml b/charts/physims/charts/nr-ulsim.3gpp/values.yaml similarity index 95% rename from charts/physims/charts/nr-pbchsim/values.yaml rename to charts/physims/charts/nr-ulsim.3gpp/values.yaml index 9a25d2810d..ab68afd712 100644 --- a/charts/physims/charts/nr-pbchsim/values.yaml +++ b/charts/physims/charts/nr-ulsim.3gpp/values.yaml @@ -1,4 +1,4 @@ -# Default values for oai-nr-pbchsim. +# Default values for oai-nr-ulsim-3gpp # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -25,7 +25,7 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-pbchsim-sa" + name: "oai-nr-ulsim-3gpp" podSecurityContext: runAsUser: 0 diff --git a/charts/physims/charts/nr-ulsim.mimo/Chart.yaml b/charts/physims/charts/nr-ulsim.mimo/Chart.yaml new file mode 100644 index 0000000000..b4a691f14a --- /dev/null +++ b/charts/physims/charts/nr-ulsim.mimo/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-ulsim-mimo +description: A Helm subchart for nr-ulsim network function ("mimo" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-ulsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.mimo/templates/NOTES.txt b/charts/physims/charts/nr-ulsim.mimo/templates/NOTES.txt new file mode 100644 index 0000000000..46436c61f0 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.mimo/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim-mimo.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim-mimo.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim-mimo.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim-mimo.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-dlsim/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.mimo/templates/_helpers.tpl similarity index 73% rename from charts/physims/charts/nr-dlsim/templates/_helpers.tpl rename to charts/physims/charts/nr-ulsim.mimo/templates/_helpers.tpl index 1dd7fbd3fd..ead3e5ca41 100644 --- a/charts/physims/charts/nr-dlsim/templates/_helpers.tpl +++ b/charts/physims/charts/nr-ulsim.mimo/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "oai-nr-dlsim.name" -}} +{{- define "oai-nr-ulsim-mimo.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "oai-nr-dlsim.fullname" -}} +{{- define "oai-nr-ulsim-mimo.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "oai-nr-dlsim.chart" -}} +{{- define "oai-nr-ulsim-mimo.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "oai-nr-dlsim.labels" -}} -helm.sh/chart: {{ include "oai-nr-dlsim.chart" . }} -{{ include "oai-nr-dlsim.selectorLabels" . }} +{{- define "oai-nr-ulsim-mimo.labels" -}} +helm.sh/chart: {{ include "oai-nr-ulsim-mimo.chart" . }} +{{ include "oai-nr-ulsim-mimo.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "oai-nr-dlsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-nr-dlsim.name" . }} +{{- define "oai-nr-ulsim-mimo.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-ulsim-mimo.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "oai-nr-dlsim.serviceAccountName" -}} +{{- define "oai-nr-ulsim-mimo.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-nr-dlsim.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/charts/physims/charts/nr-ulsim.mimo/templates/deployment.yaml b/charts/physims/charts/nr-ulsim.mimo/templates/deployment.yaml new file mode 100644 index 0000000000..c21b151ad1 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.mimo/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-ulsim-mimo.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-ulsim-mimo.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-ulsim-mimo.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-ulsim-mi + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.mimo" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-pbchsim/templates/service.yaml b/charts/physims/charts/nr-ulsim.mimo/templates/service.yaml similarity index 71% rename from charts/physims/charts/nr-pbchsim/templates/service.yaml rename to charts/physims/charts/nr-ulsim.mimo/templates/service.yaml index 35faf3c33d..6a2465cbbe 100644 --- a/charts/physims/charts/nr-pbchsim/templates/service.yaml +++ b/charts/physims/charts/nr-ulsim.mimo/templates/service.yaml @@ -3,18 +3,18 @@ kind: Service metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-nr-pbchsim.labels" . | nindent 4 }} + {{- include "oai-nr-ulsim-mimo.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} {{- if contains "ClusterIP" .Values.service.type }} clusterIP: None {{- end }} ports: - - name: oai-nr-pbchsim + - name: oai-nr-ulsim-mimo # Port accessible outside cluster port: {{ .Values.service.port }} # Port to forward to inside the pod targetPort: {{ .Values.service.Port }} protocol: TCP selector: - {{- include "oai-nr-pbchsim.selectorLabels" . | nindent 4 }} + {{- include "oai-nr-ulsim-mimo.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-dlsim/values.yaml b/charts/physims/charts/nr-ulsim.mimo/values.yaml similarity index 95% rename from charts/physims/charts/nr-dlsim/values.yaml rename to charts/physims/charts/nr-ulsim.mimo/values.yaml index 2a35912fee..6eab0521e1 100644 --- a/charts/physims/charts/nr-dlsim/values.yaml +++ b/charts/physims/charts/nr-ulsim.mimo/values.yaml @@ -1,4 +1,4 @@ -# Default values for oai-nr-dlsim. +# Default values for oai-nr-ulsim-mimo # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -25,7 +25,7 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-nr-dlsim-sa" + name: "oai-nr-ulsim-mimo" podSecurityContext: runAsUser: 0 diff --git a/charts/physims/charts/nr-ulsim.misc/Chart.yaml b/charts/physims/charts/nr-ulsim.misc/Chart.yaml new file mode 100644 index 0000000000..6770f26b76 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.misc/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-ulsim-misc +description: A Helm subchart for nr-ulsim network function ("misc" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-ulsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.misc/templates/NOTES.txt b/charts/physims/charts/nr-ulsim.misc/templates/NOTES.txt new file mode 100644 index 0000000000..8f882b73a3 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.misc/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim-misc.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim-misc.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim-misc.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim-misc.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/dlsim/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.misc/templates/_helpers.tpl similarity index 72% rename from charts/physims/charts/dlsim/templates/_helpers.tpl rename to charts/physims/charts/nr-ulsim.misc/templates/_helpers.tpl index 7ae142b671..6b5906a8e7 100644 --- a/charts/physims/charts/dlsim/templates/_helpers.tpl +++ b/charts/physims/charts/nr-ulsim.misc/templates/_helpers.tpl @@ -2,7 +2,7 @@ {{/* Expand the name of the chart. */}} -{{- define "oai-dlsim.name" -}} +{{- define "oai-nr-ulsim-misc.name" -}} {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} {{- end -}} @@ -11,7 +11,7 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "oai-dlsim.fullname" -}} +{{- define "oai-nr-ulsim-misc.fullname" -}} {{- if .Values.fullnameOverride -}} {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} {{- else -}} @@ -27,16 +27,16 @@ If release name contains chart name it will be used as a full name. {{/* Create chart name and version as used by the chart label. */}} -{{- define "oai-dlsim.chart" -}} +{{- define "oai-nr-ulsim-misc.chart" -}} {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} {{- end -}} {{/* Common labels */}} -{{- define "oai-dlsim.labels" -}} -helm.sh/chart: {{ include "oai-dlsim.chart" . }} -{{ include "oai-dlsim.selectorLabels" . }} +{{- define "oai-nr-ulsim-misc.labels" -}} +helm.sh/chart: {{ include "oai-nr-ulsim-misc.chart" . }} +{{ include "oai-nr-ulsim-misc.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -46,17 +46,17 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "oai-dlsim.selectorLabels" -}} -app.kubernetes.io/name: {{ include "oai-dlsim.name" . }} +{{- define "oai-nr-ulsim-misc.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-ulsim-misc.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end -}} {{/* Create the name of the service account to use */}} -{{- define "oai-dlsim.serviceAccountName" -}} +{{- define "oai-nr-ulsim-misc.serviceAccountName" -}} {{- if .Values.serviceAccount.create -}} - {{ default (include "oai-dlsim.fullname" .) .Values.serviceAccount.name }} + {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} {{- else -}} {{ default "default" .Values.serviceAccount.name }} {{- end -}} diff --git a/charts/physims/charts/nr-ulsim.misc/templates/deployment.yaml b/charts/physims/charts/nr-ulsim.misc/templates/deployment.yaml new file mode 100644 index 0000000000..0987e041e0 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.misc/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-ulsim-misc.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-ulsim-misc.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-ulsim-misc.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-ulsim-mi + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.misc" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-ulsim/templates/service.yaml b/charts/physims/charts/nr-ulsim.misc/templates/service.yaml similarity index 71% rename from charts/physims/charts/nr-ulsim/templates/service.yaml rename to charts/physims/charts/nr-ulsim.misc/templates/service.yaml index 95f198d1b1..d7e93fba72 100644 --- a/charts/physims/charts/nr-ulsim/templates/service.yaml +++ b/charts/physims/charts/nr-ulsim.misc/templates/service.yaml @@ -3,18 +3,18 @@ kind: Service metadata: name: {{ .Chart.Name }} labels: - {{- include "oai-nr-ulsim.labels" . | nindent 4 }} + {{- include "oai-nr-ulsim-misc.labels" . | nindent 4 }} spec: type: {{ .Values.service.type }} {{- if contains "ClusterIP" .Values.service.type }} clusterIP: None {{- end }} ports: - - name: oai-nr-ulsim + - name: oai-nr-ulsim-misc # Port accessible outside cluster port: {{ .Values.service.port }} # Port to forward to inside the pod targetPort: {{ .Values.service.Port }} protocol: TCP selector: - {{- include "oai-nr-ulsim.selectorLabels" . | nindent 4 }} + {{- include "oai-nr-ulsim-misc.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/dlsim/values.yaml b/charts/physims/charts/nr-ulsim.misc/values.yaml similarity index 95% rename from charts/physims/charts/dlsim/values.yaml rename to charts/physims/charts/nr-ulsim.misc/values.yaml index 7f45b42f72..e45dc95be5 100644 --- a/charts/physims/charts/dlsim/values.yaml +++ b/charts/physims/charts/nr-ulsim.misc/values.yaml @@ -1,4 +1,4 @@ -# Default values for oai-dlsim. +# Default values for oai-nr-ulsim-misc # This is a YAML-formatted file. # Declare variables to be passed into your templates. @@ -25,7 +25,7 @@ serviceAccount: annotations: {} # The name of the service account to use. # If not set and create is true, a name is generated using the fullname template - name: "oai-dlsim-sa" + name: "oai-nr-ulsim-misc" podSecurityContext: runAsUser: 0 diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/Chart.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/Chart.yaml new file mode 100644 index 0000000000..c4460cd6a0 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.sc-fdma/Chart.yaml @@ -0,0 +1,36 @@ +apiVersion: v1 +name: oai-nr-ulsim-sc-fdma +description: A Helm subchart for nr-ulsim network function ("sc-fdma" tests) + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +icon: http://www.openairinterface.org/wp-content/uploads/2015/06/cropped-oai_final_logo.png + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. +appVersion: v1 + +keywords: + - Physical Simulator + - nr-ulsim + - RAN + - 5G + +sources: + - https://gitlab.eurecom.fr/oai/openairinterface5g + +maintainers: + - name: OPENAIRINTERFACE + email: contact@openairinterface.org diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/templates/NOTES.txt b/charts/physims/charts/nr-ulsim.sc-fdma/templates/NOTES.txt new file mode 100644 index 0000000000..1874b502a2 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.sc-fdma/templates/NOTES.txt @@ -0,0 +1,15 @@ +1. Get the application URL by running these commands: +{{- if contains "NodePort" .Values.service.type }} + export NODE_PORT=$(kubectl get --namespace {{ .Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ include "oai-nr-ulsim-sc-fdma.fullname" . }}) + export NODE_IP=$(kubectl get nodes --namespace {{ .Release.Namespace }} -o jsonpath="{.items[0].status.addresses[0].address}") + echo http://$NODE_IP:$NODE_PORT +{{- else if contains "LoadBalancer" .Values.service.type }} + NOTE: It may take a few minutes for the LoadBalancer IP to be available. + You can watch the status of by running 'kubectl get --namespace {{ .Release.Namespace }} svc -w {{ include "oai-nr-ulsim-sc-fdma.fullname" . }}' + export SERVICE_IP=$(kubectl get svc --namespace {{ .Release.Namespace }} {{ include "oai-nr-ulsim-sc-fdma.fullname" . }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") + echo http://$SERVICE_IP:{{ .Values.service.port }} +{{- else if contains "ClusterIP" .Values.service.type }} + export POD_NAME=$(kubectl get pods --namespace {{ .Release.Namespace }} -l "app.kubernetes.io/name={{ include "oai-nr-ulsim-sc-fdma.name" . }},app.kubernetes.io/instance={{ .Release.Name }}" -o jsonpath="{.items[0].metadata.name}") + echo "Visit http://127.0.0.1:8080 to use your application" + kubectl --namespace {{ .Release.Namespace }} port-forward $POD_NAME 8080:80 +{{- end }} diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/templates/_helpers.tpl b/charts/physims/charts/nr-ulsim.sc-fdma/templates/_helpers.tpl new file mode 100644 index 0000000000..b608389dc8 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.sc-fdma/templates/_helpers.tpl @@ -0,0 +1,63 @@ +{{/* vim: set filetype=mustache: */}} +{{/* +Expand the name of the chart. +*/}} +{{- define "oai-nr-ulsim-sc-fdma.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "oai-nr-ulsim-sc-fdma.fullname" -}} +{{- if .Values.fullnameOverride -}} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- $name := default .Chart.Name .Values.nameOverride -}} +{{- if contains $name .Release.Name -}} +{{- .Release.Name | trunc 63 | trimSuffix "-" -}} +{{- else -}} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" -}} +{{- end -}} +{{- end -}} +{{- end -}} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "oai-nr-ulsim-sc-fdma.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} +{{- end -}} + +{{/* +Common labels +*/}} +{{- define "oai-nr-ulsim-sc-fdma.labels" -}} +helm.sh/chart: {{ include "oai-nr-ulsim-sc-fdma.chart" . }} +{{ include "oai-nr-ulsim-sc-fdma.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end -}} + +{{/* +Selector labels +*/}} +{{- define "oai-nr-ulsim-sc-fdma.selectorLabels" -}} +app.kubernetes.io/name: {{ include "oai-nr-ulsim-sc-fdma.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end -}} + +{{/* +Create the name of the service account to use +*/}} +{{- define "oai-nr-ulsim-sc-fdma.serviceAccountName" -}} +{{- if .Values.serviceAccount.create -}} + {{ default (include "oai-nr-ulsim.fullname" .) .Values.serviceAccount.name }} +{{- else -}} + {{ default "default" .Values.serviceAccount.name }} +{{- end -}} +{{- end -}} diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/templates/deployment.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/templates/deployment.yaml new file mode 100644 index 0000000000..5e48777020 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.sc-fdma/templates/deployment.yaml @@ -0,0 +1,46 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-ulsim-sc-fdma.labels" . | nindent 4 }} +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + {{- include "oai-nr-ulsim-sc-fdma.selectorLabels" . | nindent 6 }} + strategy: + type: Recreate + template: + metadata: + labels: + {{- include "oai-nr-ulsim-sc-fdma.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + {{- if .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: physim + image: "{{ .Values.global.image.repository }}:{{ .Values.global.image.version }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + securityContext: + {{- toYaml .Values.securityContext | nindent 12 }} + ports: + - containerPort: 80 + name: oai-nr-ulsim-sc + env: + - name: OPENAIR_DIR + value: /opt/oai-physim + command: ["/bin/sh", "-c"] + args: + - > + cmake_targets/autotests/run_exec_autotests.bash -g "nr_ulsim.sc-fdma" -d bin/ && + echo "FINISHED" && sleep infinity + dnsPolicy: ClusterFirst + restartPolicy: Always + schedulerName: default-scheduler + serviceAccountName: {{ .Values.global.serviceAccountName }} + terminationGracePeriodSeconds: 30 diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/templates/service.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/templates/service.yaml new file mode 100644 index 0000000000..5653ae5ad2 --- /dev/null +++ b/charts/physims/charts/nr-ulsim.sc-fdma/templates/service.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ .Chart.Name }} + labels: + {{- include "oai-nr-ulsim-sc-fdma.labels" . | nindent 4 }} +spec: + type: {{ .Values.service.type }} +{{- if contains "ClusterIP" .Values.service.type }} + clusterIP: None +{{- end }} + ports: + - name: oai-nr-ulsim-sc-fdma + # Port accessible outside cluster + port: {{ .Values.service.port }} + # Port to forward to inside the pod + targetPort: {{ .Values.service.Port }} + protocol: TCP + selector: + {{- include "oai-nr-ulsim-sc-fdma.selectorLabels" . | nindent 4 }} diff --git a/charts/physims/charts/nr-ulsim.sc-fdma/values.yaml b/charts/physims/charts/nr-ulsim.sc-fdma/values.yaml new file mode 100644 index 0000000000..e75785772b --- /dev/null +++ b/charts/physims/charts/nr-ulsim.sc-fdma/values.yaml @@ -0,0 +1,65 @@ +# Default values for oai-nr-ulsim-sc-fdma +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicaCount: 1 + +namespace: "OAICICD_PROJECT" + +image: + registry: local + repository: image-registry.openshift-image-registry.svc:5000/OAICICD_PROJECT/oai-physim + version: temp + # pullPolicy: IfNotPresent or Never or Always + pullPolicy: Always + +imagePullSecrets: [] + +nameOverride: "" +fullnameOverride: "" + +serviceAccount: + # Specifies whether a service account should be created + create: true + # Annotations to add to the service account + annotations: {} + # The name of the service account to use. + # If not set and create is true, a name is generated using the fullname template + name: "oai-nr-ulsim-sc-fdma" + +podSecurityContext: + runAsUser: 0 + runAsGroup: 0 + +securityContext: + privileged: true + capabilities: + add: + - SYS_CAP_PTRACE + # drop: + # - ALL + # readOnlyRootFilesystem: true + # runAsNonRoot: true + # runAsUser: 1000 + +service: + type: ClusterIP + port: 80 + +resources: {} + # We usually recommend not to specify default resources and to leave this as a conscious + # choice for the user. This also increases chances charts run on environments with little + # resources, such as Minikube. If you do want to specify resources, uncomment the following + # lines, adjust them as necessary, and remove the curly braces after 'resources:'. + # limits: + # cpu: 100m + # memory: 128Mi + # requests: + # cpu: 100m + # memory: 128Mi + +nodeSelector: {} + +tolerations: [] + +affinity: {} diff --git a/charts/physims/values.yaml b/charts/physims/values.yaml index d5253c7812..a4581465f1 100644 --- a/charts/physims/values.yaml +++ b/charts/physims/values.yaml @@ -11,7 +11,13 @@ global: ## Declaring values specific to coressponding physim to overwrite -dlsim: +dlsim.basic: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +dlsim.100rb+tm2: replicaCount: 1 service: type: ClusterIP @@ -35,13 +41,43 @@ polartest: type: ClusterIP port: 80 -nr-pbchsim: +nr-pbchsim.106rb: replicaCount: 1 service: type: ClusterIP port: 80 -nr-dlsim: +nr-pbchsim.217rb: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-pbchsim.273rb: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-dlsim.basic: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-dlsim.dmrs+ptrs: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-dlsim.mcs+mimo: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-dlsim.offset: replicaCount: 1 service: type: ClusterIP @@ -71,7 +107,25 @@ nr-pucchsim: type: ClusterIP port: 80 -nr-ulsim: +nr-ulsim.3gpp: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-ulsim.mimo: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-ulsim.misc: + replicaCount: 1 + service: + type: ClusterIP + port: 80 + +nr-ulsim.sc-fdma: replicaCount: 1 service: type: ClusterIP