Commit 5648a65d authored by Raphael Defosseux's avatar Raphael Defosseux
Browse files

Merge branch 'helm-charts' into 'master'

CI pipeline for OC deployment and testing with dsTester

See merge request oai/cn5g/oai-cn5g-fed!12
parents ec517f7b ce2d718e
......@@ -2,14 +2,14 @@
## ref: https://hub.docker.com/r/library/mysql/tags/
##
image: "image-registry.openshift-image-registry.svc:5000/oaicicd-tmp/mysql-internal"
imageTag: "TAG"
imageTag: "5.7.30"
strategy:
type: Recreate
busybox:
image: "busybox"
tag: "1.32"
image: "image-registry.openshift-image-registry.svc:5000/oaicicd-5gcn-tmp/busybox-internal"
tag: "latest"
testFramework:
enabled: false
......
This diff is collapsed.
This diff is collapsed.
......@@ -31,9 +31,19 @@ spec:
containers:
- name: tcpdump
image: image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
{{- if .Values.start.tcpdump}}
command:
- /bin/sh
- -c
- /usr/sbin/tcpdump -i any -w /pcap/oai-amf_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
volumeMounts:
- mountPath: "/pcap"
name: cn5g-pv
- name: amf
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
......@@ -49,6 +59,12 @@ spec:
- containerPort: {{ .Values.service.http2Port }}
name: http2
protocol: TCP
{{- if .Values.start.amf}}
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
env:
- name: INSTANCE
valueFrom:
......@@ -180,6 +196,16 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: smfHttpVersion0
- name: SMF_FQDN_0
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: smfFqdn0
- name: SELECTED_0
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: selected0
- name: SMF_INSTANCE_ID_1
valueFrom:
configMapKeyRef:
......@@ -195,6 +221,16 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: smfHttpVersion1
- name: SMF_FQDN_1
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: smfFqdn1
- name: SELECTED_1
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: selected1
- name: NRF_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
......@@ -210,6 +246,11 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: nrfApiVersion
- name: NRF_FQDN
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: nrfFqdn
- name: AUSF_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
......@@ -235,6 +276,11 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: smfSelection
- name: USE_FQDN_DNS
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: useFqdnDns
- name: MYSQL_SERVER
valueFrom:
configMapKeyRef:
......@@ -260,12 +306,13 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: operatorKey
# command: ["/bin/bash","-c"]
# args: ["/openair-amf/bin/entrypoint.sh; /openair-amf/bin/oai_amf -c /openair-amf/etc/amf.conf -o"]
volumes:
- name: cn5g-pv
persistentVolumeClaim:
claimName: cn5g-pvc
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
serviceAccountName: {{ .Values.serviceAccount.name }}
terminationGracePeriodSeconds: 15
nodeName: perse.5glab.nsa.eurecom.fr
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-sa
name: {{ .Chart.Name }}-svc
labels:
{{- include "oai-amf.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
{{- if contains "ClusterIP" .Values.service.type }}
clusterIP: None
{{- end }}
ports:
- name: oai-amf
# Port accessible outside cluster
......
# Default values for oai-spgwc.
# Default values for oai-amf.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
......@@ -22,7 +22,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-amf-sa"
name: "oai-amf-svc"
podSecurityContext:
runAsUser: 0
......@@ -45,7 +45,7 @@ service:
start:
amf: true
#tcpdump: true
tcpdump: true
multus:
ngapIPadd: "192.168.18.177"
......@@ -79,17 +79,23 @@ config:
smfInstanceId0: "1"
smfIpv4Addr0: "0.0.0.0"
smfHttpVersion0: "v1"
smfFqdn0: "oai-amf-svc"
selected0: "true"
smfInstanceId1: "2"
smfIpv4Addr1: "127.0.0.1"
smfHttpVersion1: "v1"
smfFqdn1: "oai-amf-svc"
selected1: "false"
nrfIpv4Addr: "192.168.18.178"
nrfPort: 80
nrfApiVersion: "v1"
nrfFqdn: "oai-nrf-svc"
ausfIpv4Addr: "127.0.0.1"
ausfPort: 80
ausfApiVersion: "v1"
nfRegistration: "no"
nfRegistration: "yes"
smfSelection: "yes"
useFqdnDns: "yes"
mySqlServer: "mysql"
mySqlUser: "root"
mySqlPass: "linux"
......
......@@ -15,8 +15,6 @@ spec:
metadata:
labels:
{{- include "oai-nrf.selectorLabels" . | nindent 8 }}
annotations:
k8s.v1.cni.cncf.io/networks: "{{ .Chart.Name }}-{{ .Values.namespace }}-net1"
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
......@@ -27,9 +25,19 @@ spec:
containers:
- name: tcpdump
image: image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
{{- if .Values.start.tcpdump}}
command:
- /bin/sh
- -c
- /usr/sbin/tcpdump -i any -w /pcap/oai-nrf_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
volumeMounts:
- mountPath: "/pcap"
name: cn5g-pv
- name: nrf
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
......@@ -42,6 +50,12 @@ spec:
- containerPort: {{ .Values.service.http2Port }}
name: http2
protocol: TCP
{{- if .Values.start.nrf}}
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
env:
- name: INSTANCE
valueFrom:
......@@ -73,6 +87,10 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: nrfApiVersion
volumes:
- name: cn5g-pv
persistentVolumeClaim:
claimName: cn5g-pvc
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
......
---
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: {{ .Chart.Name }}-{{ .Values.namespace }}-net1
spec:
config: '{
"cniVersion": "0.3.0",
"type": "macvlan",
"master": "bond0",
"mode": "bridge",
"ipam": {
"type": "static",
"addresses": [
{
"address": {{- cat .Values.config.nrfIpNg "/" .Values.config.nrfNetmaskNg | nospace | quote }}
}
]
}
}'
{{- if .Values.persistence.enabled }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: cn5g-pvc
spec:
accessModes:
- ReadWriteMany
storageClassName: managed-nfs-storage
resources:
requests:
storage: 1Gi
{{- end }}
\ No newline at end of file
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-sa
name: {{ .Chart.Name }}-svc
labels:
{{- include "oai-nrf.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
{{- if contains "ClusterIP" .Values.service.type }}
clusterIP: None
{{- end }}
type: ClusterIP
ports:
- name: http1
# Port accessible outside cluster
......
......@@ -9,7 +9,7 @@ namespace: "PROJECT"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/PROJECT/oai-nrf
version: TAG
version: "TAG"
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
......@@ -47,22 +47,20 @@ service:
start:
nrf: true
#tcpdump: true
tcpdump: true
config:
instance: "0"
pidDirectory: "/var/run"
nrfInterfaceNameForSBI: "net1"
nrfInterfaceNameForSBI: "eth0"
nrfInterfacePortForSBI: "80"
nrfInterfaceHttp2PortForSBI: "9090"
nrfApiVersion: "v1"
nrfIpNg: "192.168.18.178"
nrfNetmaskNg: "24"
persistence:
# make it true for the first time when you want to create persistance volume
# and then false
enabled: false
enabled: true
resources:
# We usually recommend not to specify default resources and to leave this as a conscious
......
......@@ -15,8 +15,10 @@ spec:
metadata:
labels:
{{- include "oai-smf.selectorLabels" . | nindent 8 }}
{{- if .Values.multus.create }}
annotations:
k8s.v1.cni.cncf.io/networks: {{ .Chart.Name }}-{{ .Values.namespace }}-n4-net1
{{- end }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
......@@ -27,9 +29,19 @@ spec:
containers:
- name: tcpdump
image: image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
{{- if .Values.start.tcpdump}}
command:
- /bin/sh
- -c
- /usr/sbin/tcpdump -i any -w /pcap/oai-smf_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
volumeMounts:
- mountPath: "/pcap"
name: cn5g-pv
- name: smf
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
......@@ -42,6 +54,12 @@ spec:
name: http1
- containerPort: {{ .Values.service.http2Port }}
name: http2
{{- if .Values.start.smf}}
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
env:
- name: INSTANCE
valueFrom:
......@@ -98,6 +116,11 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: discoverUpf
- name: USE_FQDN_DNS
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: useFqdnDns
- name: AMF_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
......@@ -113,6 +136,11 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: amfApiVersion
- name: AMF_FQDN
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: amfFqdn
- name: UDM_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
......@@ -128,6 +156,11 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: udmApiVersion
- name: UDM_FQDN
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: udmFqdn
- name: NRF_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
......@@ -143,14 +176,31 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: nrfApiVersion
- name: NRF_FQDN
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: nrfFqdn
- name: UPF_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: upfIpv4Address
#command:
# - /bin/sleep
# - infinity
- name: UPF_FQDN_0
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: upfFqdn0
{{- if .Values.start.smf}}
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
volumes:
- name: cn5g-pv
persistentVolumeClaim:
claimName: cn5g-pvc
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
......
---
{{- if .Values.multus.create }}
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
......@@ -13,9 +14,9 @@ spec:
"type": "static",
"addresses": [
{
"address": {{- cat .Values.multus.n4IPadd "/" .Values.multus.n4Netmask | nospace | quote }},
"gateway": {{- cat .Values.config.n4Gw | nospace | quote }}
"address": {{- cat .Values.multus.n4IPadd "/" .Values.multus.n4Netmask | nospace | quote }}
}
]
}
}'
{{- end }}
apiVersion: v1
kind: Service
metadata:
name: {{ .Chart.Name }}-sa
name: {{ .Chart.Name }}-svc
labels:
{{- include "oai-smf.labels" . | nindent 4 }}
spec:
......
# Default values for oai-spgwc.
# Default values for oai-smf.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
......@@ -9,7 +9,7 @@ namespace: "PROJECT"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/PROJECT/oai-smf
version: TAG
version: "TAG"
#pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
......@@ -48,14 +48,14 @@ start:
tcpdump: true
multus:
n4IPadd: "192.168.101.130"
n4Netmask: "26"
n4Gw: "192.168.101.128"
create: false
n4IPadd: "192.168.18.178"
n4Netmask: "24"
config:
instance: "0"
pidDirectory: "/var/run"
smfInterfaceNameForN4: "net1"
smfInterfaceNameForN4: "eth0"
smfInterfaceNameForSBI: "eth0"
smfInterfacePortForSBI: "80"
smfInterfaceHttp2PortForSBI: "9090"
......@@ -64,17 +64,27 @@ config:
dnsSecIpv4Address: "192.168.18.129"
registerNrf: "yes"
discoverUpf: "yes"
amfIpv4Address: "192.168.18.177"
useFqdnDns: "yes"
amfIpv4Address: "127.0.0.1"
amfPort: "80"
amfApiVersion: "v1"
amfFqdn: "oai-smf-svc"
udmIpv4Address: "127.0.0.1"
udmPort: "80"
udmApiVersion: "v1"
nrfIpv4Address: "192.168.18.178"
udmFqdn: "localhost"
nrfIpv4Address: "127.0.0.1"
nrfPort : "80"
nrfApiVersion: "v1"
upfIpv4Address: "192.168.18.179"
nrfFqdn: "oai-nrf-svc"
upfIpv4Address: "127.0.0.1"
upfFqdn0: "oai-spgwu-tiny-svc"
persistence:
# make it true for the first time when you want to create persistance volume
# and then false
enabled: false
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
......
......@@ -3,14 +3,6 @@ kind: ConfigMap
metadata:
name: {{ .Chart.Name }}-configmap
data:
pidDirectory: {{ .Values.config.pidDirectory }}
sgwS1uIf: {{ .Values.config.sgwS1uIf }}
pgwSgiIf: {{ .Values.config.pgwSgiIf }}
sgwSxIf: {{ .Values.config.sgwSxIf }}
netUeIp: {{ .Values.config.netUeIp }}
netUeNatOption: {{ .Values.config.netUeNatOption | quote }}
spgwc0IpAdd: {{ .Values.config.spgwc0IpAdd | quote }}
nrfIpv4Add: {{ .Values.config.nrfIpv4Add | quote }}
nrfPort: {{ .Values.config.nrfPort | quote }}
nrfApiVersion: {{ .Values.config.nrfApiVersion | quote }}
registerNRF: {{ .Values.config.registerNRF | quote }}
{{- range $key, $val := .Values.config }}
{{ $key }}: {{ $val | quote }}
{{- end }}
......@@ -18,10 +18,8 @@ spec:
annotations:
k8s.v1.cni.cncf.io/networks: >-
[{
"name": "{{ .Chart.Name }}-{{ .Values.namespace }}-net1",
"default-route": ["{{ .Values.config.pgwuSgiGw }}"]
},
{ "name": "{{ .Chart.Name }}-{{ .Values.namespace }}-net2"
"name": "{{ .Chart.Name }}-{{ .Values.namespace }}-s1u-net1",
"default-route": ["{{ .Values.multus.pgwuSgiGw }}"]
}]
spec:
securityContext:
......@@ -33,9 +31,19 @@ spec:
containers:
- name: tcpdump
image: image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
{{- if .Values.start.tcpdump}}
command:
- /bin/sh
- -c
- /usr/sbin/tcpdump -i any -w /pcap/oai-spgwu_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
volumeMounts:
- mountPath: "/pcap"
name: cn5g-pv
- name: spgwu
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
......@@ -48,7 +56,43 @@ spec:
name: s1u
- containerPort: 5001
name: iperf
{{- if .Values.start.spgwu}}
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
env:
- name: GW_ID
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: gwId
- name: MNC03
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: mnc03
- name: MCC
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: mcc
- name: MNC
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: mnc
- name: TAC
valueFrom: