Commit 07f8096e authored by arora's avatar arora 🎤
Browse files

Helm chart tutorial

parent 728a70eb
......@@ -13,5 +13,4 @@ icon: https://www.mysql.com/common/logos/logo-mysql-170x115.png
sources:
- https://github.com/kubernetes/charts
- https://github.com/docker-library/mysql
deprecated: true
engine: gotpl
engine: gotpl
\ No newline at end of file
# mysql image version
## ref: https://hub.docker.com/r/library/mysql/tags/
##
image: "image-registry.openshift-image-registry.svc:5000/oaicicd-tmp/mysql-internal"
image: "mysql-internal"
imageTag: "5.7.30"
strategy:
type: Recreate
busybox:
image: "image-registry.openshift-image-registry.svc:5000/oaicicd-5gcn-tmp/busybox-internal"
tag: "latest"
image: "busybox"
tag: "1.32"
testFramework:
enabled: false
......@@ -338,8 +338,14 @@ initializationFiles:
LOCK TABLES `users` WRITE;
/*!40000 ALTER TABLE `users` DISABLE KEYS */;
INSERT INTO `users` VALUES ('20834123456789','380561234567','35609204079300',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,'+ÖEŸ‚ų\0•,IHÿH',0,0,00000000000000000096,'Px¼X \Z1¡Éx™ß','^œ¤K¬îòˆÕØFeUÿ—à'),('20810000001234','33611123456','35609204079299',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000281454575616225,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','ç4øs@ÖÅÎz€ž~œ'),('31002890832150','33638060059','35611302209414',NULL,'PURGED',120,40000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012416,'`ÏF®Ý†ôéD¢¼Ï›‰Á¼','ç4øs@ÖÅÎz€ž~œ'),('001010123456789','33600101789','35609204079298',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'\0 \n\r',1,0,00000000000000000351,'\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0','L‹*\\º”›±^Ýù]ö '),('208930000000001','33638030001','35609204079301',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208950000000002','33638050002','35609204079502',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000020471,'\0 \n\r','ç4øs@ÖÅÎz€ž~œ'),('208950000000003','33638050003','35609204079503',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012343,'\0 \n\r','ç4øs@ÖÅÎz€ž~œ'),('208950000000004','33638050004','35609204079504',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000005','33638050005','35609204079505',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000001','33638050001','35609204079501',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208950000000006','33638050006','35609204079506',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000007','33638050007','35609204079507',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208930000000002','33638030002','35609204079302',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000003','33638030003','35609204079303',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000004','33638030004','35609204079304',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000005','33638030005','35609204079305',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000006','33638030006','35609204079306',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208930000000007','33638030007','35609204079307',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000007','33638040007','35609204079407',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000006','33638040006','35609204079406',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000005','33638040005','35609204079405',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000004','33638040004','35609204079404',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000003','33638040003','35609204079403',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000002','33638040002','35609204079402',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208940000000001','33638040001','35609204079401',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ëÐwq¬ègzW®Ð²áZ]','ç4øs@ÖÅÎz€ž~œ'),('208920100001100','33638020001','35609204079201',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001101','33638020001','35609204079201',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204937234,'\0 \n\r','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001102','33638020002','35609204079202',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001103','33638020003','35609204079203',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001104','33638020004','35609204079204',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001105','33638020005','35609204079205',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001106','33638020006','35609204079206',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000000000000006103,'ebd07771ace8677a','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001107','33638020007','35609204079207',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001108','33638020008','35609204079208',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001109','33638020009','35609204079209',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208920100001110','33638020010','35609204079210',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208930100001111','33638030011','35609304079211',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208930100001112','33638030012','35609304079212',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006103,'ebd07771ace8677a','ç4øs@ÖÅÎz€ž~œ'),('208930100001113','33638030013','35609304079213',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000006263,'¦SNÜ’’Ivãèe¯6','ç4øs@ÖÅÎz€ž~œ'),('208950000000008','33638050008','35609204079508',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000009','33638050009','35609204079509',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000010','33638050010','35609204079510',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000011','33638050011','35609204079511',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000012','33638050012','35609204079512',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000013','33638050013','35609204079513',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000014','33638050014','35609204079514',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000012215,'56f0261d9d051063','ç4øs@ÖÅÎz€ž~œ'),('208950000000015','33638050015','35609204079515',NULL,'PURGED',120,50000000,100000000,47,0000000000,1,'‹¯G?/Д‡ÌË× |hb',1,0,00000000000000000000,'3536663032363164','ç4øs@ÖÅÎz€ž~œ'),('208920100001118','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204934762,'~?03îu-%ÞeyÖyý','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001121','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204935293,'&”‚@xg€]ÿôÄ\nœÛVp','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001119','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204935293,'269482407867805d','Ä$I6;ºÐ+fÑkÉu×|Á'),('208920100001120','33638020010','35609204079210',NULL,'NOT_PURGED',120,50000000,100000000,47,0000000000,1,'þÈk¦ëp~Љu{´K',1,0,00000281044204935293,'3236393438323430','Ä$I6;ºÐ+fÑkÉu×|Á');
INSERT INTO `users` VALUES ('208950000000030','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
INSERT INTO `users` VALUES ('208950000000031','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
INSERT INTO `users` VALUES ('208950000000032','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
INSERT INTO `users` VALUES ('208950000000033','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
INSERT INTO `users` VALUES ('208950000000034','380561234567','55000000000001',NULL,'PURGED',50,40000000,100000000,47,0000000000,1,0x0C0A34601D4F07677303652C0462535B,0,0,0x40,'ebd07771ace8677a',0x63bfa50ee6523365ff14c1f45f88737d);
--
-- Add a new user entry here using use above insert statement as template
--
/*!40000 ALTER TABLE `users` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
......
apiVersion: v2
apiVersion: v1
name: oai-amf
description: A Helm chart for AMF network function
description: Helm chart for AMF network function
# 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.0
version: 1.1.0
# 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: 0.1.0
appVersion: 1.1.0
keywords:
- 5GCN
......@@ -28,7 +16,6 @@ keywords:
sources:
- https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-amf
- https://github.com/OPENAIRINTERFACE/openair-k8s
maintainers:
- name: OPENAIRINTERFACE
......
......@@ -10,6 +10,4 @@
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-amf.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 }}
......@@ -15,42 +15,50 @@ spec:
metadata:
labels:
{{- include "oai-amf.selectorLabels" . | nindent 8 }}
{{- if .Values.multus.create }}
annotations:
k8s.v1.cni.cncf.io/networks: >-
[{
"name": "{{ .Chart.Name }}-{{ .Values.namespace }}-ngap-net1",
"default-route": ["{{ .Values.multus.ngapGateway }}"]
"name": "{{ .Chart.Name }}-{{ .Values.namespace }}-n1-net1",
"default-route": ["{{ .Values.multus.n1Gateway }}"]
}]
{{- end }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: tcpdump
image: image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
image: corfr/tcpdump: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
- /usr/sbin/tcpdump -i any -w /pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
{{- if .Values.persistent.sharedvolume}}
volumeMounts:
- mountPath: "/pcap"
name: cn5g-pv
{{- end}}
- name: amf
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.resources.define}}
resources:
requests:
memory: {{ .Values.resources.requests.memory | quote }}
cpu: {{ .Values.resources.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.limits.memory | quote }}
cpu: {{ .Values.resources.limits.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
- containerPort: {{ .Values.service.sctpPort }}
- containerPort: {{ .Values.service.n1Port }}
name: oai-amf
protocol: SCTP
- containerPort: {{ .Values.service.http1Port }}
......@@ -201,11 +209,6 @@ spec:
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:
......@@ -226,11 +229,6 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: smfFqdn1
- name: SELECTED_1
valueFrom:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: selected1
- name: NRF_IPV4_ADDRESS
valueFrom:
configMapKeyRef:
......@@ -306,13 +304,19 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: operatorKey
{{- if .Values.persistent.sharedvolume}}
volumes:
- name: cn5g-pv
persistentVolumeClaim:
claimName: cn5g-pvc
{{- end }}
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
serviceAccountName: {{ .Values.serviceAccount.name }}
terminationGracePeriodSeconds: 15
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.nodeSelector}}
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 4 }}
{{- end }}
{{- if .Values.nodeName}}
nodeName: {{ .Values.nodeName }}
{{- end }}
\ No newline at end of file
---
{{- if .Values.multus.create }}
apiVersion: "k8s.cni.cncf.io/v1"
kind: NetworkAttachmentDefinition
metadata:
name: {{ .Chart.Name }}-{{ .Values.namespace }}-ngap-net1
name: {{ .Chart.Name }}-{{ .Values.namespace }}-n1-net1
spec:
config: '{
"cniVersion": "0.3.0",
......@@ -13,8 +14,9 @@ spec:
"type": "static",
"addresses": [
{
"address": {{- cat .Values.multus.ngapIPadd "/" .Values.multus.ngapNetmask | nospace | quote }}
"address": {{- cat .Values.multus.n1IPadd "/" .Values.multus.n1Netmask | nospace | quote }}
}
]
}
}'
{{- end }}
\ No newline at end of file
......@@ -7,7 +7,7 @@ rules:
- apiGroups:
- security.openshift.io
resourceNames:
- privileged
- anyuid
resources:
- securitycontextconstraints
verbs:
......
# Default values for oai-amf.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 1
namespace: "PROJECT"
namespace: "oai"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/PROJECT/oai-amf
version: "TAG"
repository: oai-amf # image name either locally present or in a public/private repository
version: v1.1.0 # image tag
# pullPolicy: IfNotPresent or Never or Always
pullPolicy: Always
imagePullSecrets: []
serviceAccount:
# Specifies whether a service account should be created
create: true
......@@ -22,35 +19,33 @@ 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-svc"
name: "oai-amf-sa"
podSecurityContext:
runAsUser: 0
runAsGroup: 0
securityContext:
privileged: true
# capabilities:
# drop:
# - ALL
# readOnlyRootFilesystem: true
# runAsNonRoot: true
# runAsUser: 1000
privileged: false
service:
type: ClusterIP
sctpPort: 38412
n1Port: 38412
http1Port: 80
http2Port: 9090
start:
amf: true
tcpdump: true
tcpdump: false #start tcpdump collection to analyse but beware it will take a lot of space in the container/persistent volume
### In case your gNB or emulator is outside of the cluster then you need an extra interface to communicate with gNB
## This interface will be for N1/N2/NGAP
multus:
ngapIPadd: "192.168.18.177"
ngapNetmask: "24"
ngapGateway: "192.168.18.129"
create: false
n1IPadd: "192.168.18.177"
n1Netmask: "24"
n1Gateway: "192.168.18.129"
config:
instance: "0"
......@@ -72,55 +67,50 @@ config:
plmnSupportTac: "0xa000"
sst0: "222"
sd0: "123"
sst1: "1"
sd1: "12"
amfInterfaceNameForNGAP: "net1"
amfInterfaceNameForN11: "eth0"
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"
sst1: "111"
sd1: "124"
amfInterfaceNameForNGAP: "net1" # If multus creation is true then net1 else eth0
amfInterfaceNameForN11: "eth0" # Service based interface
smfInstanceId0: "1" # Only configure if not using NRF
smfIpv4Addr0: "0.0.0.0" # Only configure if not using NRF
smfHttpVersion0: "v1" # Only configure if not using NRF
smfFqdn0: "localhost" # Only configure if not using NRF
smfInstanceId1: "2" # Currently disabled in the amf.conf no need to configure
smfIpv4Addr1: "0.0.0.0" # Currently disabled in the amf.conf no need to configure
smfHttpVersion1: "v1" # Currently disabled in the amf.conf no need to configure
smfFqdn1: "localhost" # Currently disabled in the amf.conf no need to configure
nrfIpv4Addr: "0.0.0.0"
nrfPort: 80
nrfApiVersion: "v1"
nrfFqdn: "oai-nrf-svc"
ausfIpv4Addr: "127.0.0.1"
nrfFqdn: "oai-nrf-svc" # amf communicates using FQDN
ausfIpv4Addr: "127.0.0.1" # configure only if there is an external AUSF else it will communicate with mysql directly
ausfPort: 80
ausfApiVersion: "v1"
nfRegistration: "yes"
smfSelection: "yes"
useFqdnDns: "yes"
mySqlServer: "mysql"
mySqlUser: "root"
mySqlPass: "linux"
mySqlDb: "oai_db"
operatorKey: "63bfa50ee6523365ff14c1f45f88737d"
nfRegistration: "yes"
smfSelection: "yes"
useFqdnDns: "yes" # Important to avoid mentioning any static ip-address
mySqlServer: "mysql" # used only if not using AUSF
mySqlUser: "root" # used only if not using AUSF
mySqlPass: "linux" # used only if not using AUSF
mySqlDb: "oai_db" # used only if not using AUSF
operatorKey: "63bfa50ee6523365ff14c1f45f88737d" # should be same as in susbcriber database
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
# 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:
sharedvolume: false
volumneName: managed-nfs-storage
size: 1Gi
resources:
define: false
limits:
cpu: 100m
memory: 256Mi
memory: 128Mi
requests:
cpu: 100m
memory: 256Mi
nodeSelector: {}
terminationGracePeriodSeconds: 30
tolerations: []
nodeSelector: {}
affinity: {}
nodeName:
apiVersion: v2
apiVersion: v1
name: oai-nrf
description: A Helm chart for NRF network function
# 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.0
version: 1.1.0
# 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: 0.1.0
appVersion: 1.1.0
keywords:
- 5GCN
......@@ -28,7 +16,6 @@ keywords:
sources:
- https://gitlab.eurecom.fr/oai/cn5g/oai-cn5g-nrf
- https://github.com/OPENAIRINTERFACE/openair-k8s
maintainers:
- name: OPENAIRINTERFACE
......
......@@ -10,6 +10,4 @@
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-nrf.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 }}
......@@ -15,32 +15,42 @@ spec:
metadata:
labels:
{{- include "oai-nrf.selectorLabels" . | nindent 8 }}
{{- if .Values.multus.create }}
annotations:
k8s.v1.cni.cncf.io/networks: "{{ .Chart.Name }}-{{ .Values.namespace }}-net1"
{{- end }}
spec:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
{{- if .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
containers:
- name: tcpdump
image: image-registry.openshift-image-registry.svc:5000/oai/tcpdump-internal:latest
image: corfr/tcpdump: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
- /usr/sbin/tcpdump -i any -w /pcap/{{ .Chart.Name }}_`date +%Y-%m-%d_%H_%M-%S-%Z`.pcap
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
{{- if .Values.persistence.sharedvolume}}
volumeMounts:
- mountPath: "/pcap"
name: cn5g-pv
{{- end}}
- name: nrf
image: "{{ .Values.image.repository }}:{{ .Values.image.version }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if .Values.resources.define}}
resources:
requests:
memory: {{ .Values.resources.requests.memory | quote }}
cpu: {{ .Values.resources.requests.cpu | quote }}
limits:
memory: {{ .Values.resources.limits.memory | quote }}
cpu: {{ .Values.resources.limits.cpu | quote }}
{{- end}}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
ports:
......@@ -50,12 +60,6 @@ spec:
- containerPort: {{ .Values.service.http2Port }}
name: http2
protocol: TCP
{{- if .Values.start.nrf}}
{{- else}}
command:
- /bin/sleep
- infinity
{{- end}}
env:
- name: INSTANCE
valueFrom:
......@@ -87,13 +91,20 @@ spec:
configMapKeyRef:
name: {{ .Chart.Name }}-configmap
key: nrfApiVersion
{{- if .Values.persistence.sharedvolume}}
volumes:
- name: cn5g-pv
persistentVolumeClaim:
claimName: cn5g-pvc
{{- end }}
dnsPolicy: ClusterFirst
restartPolicy: Always
schedulerName: default-scheduler
serviceAccountName: {{ .Values.serviceAccount.name }}
terminationGracePeriodSeconds: 15
terminationGracePeriodSeconds: {{ .Values.terminationGracePeriodSeconds }}
{{- if .Values.nodeSelector}}
nodeSelector: {{- toYaml .Values.nodeSelector | nindent 4 }}
{{- end }}
{{- if .Values.nodeName}}
nodeName: {{ .Values.nodeName }}
{{- end }}
---
{{- if .Values.multus.create }}
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 }}
}
]
}
}'
{{- end }}
\ No newline at end of file
{{- if .Values.persistence.enabled }}
{{- if .Values.persistent.sharedvolume }}
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
......@@ -6,8 +6,8 @@ metadata:
spec:
accessModes:
- ReadWriteMany
storageClassName: managed-nfs-storage
storageClassName: {{ .Values.persistent.volumneName }}
resources:
requests:
storage: 1Gi
{{- end }}
\ No newline at end of file
storage: {{ .Values.persistent.size }}
{{- end }}
......@@ -6,7 +6,7 @@ rules:
- apiGroups:
- security.openshift.io
resourceNames:
- privileged
- anyuid
resources:
- securitycontextconstraints
verbs:
......
......@@ -5,7 +5,7 @@ metadata:
labels:
{{- include "oai-nrf.labels" . | nindent 4 }}
spec:
type: ClusterIP
type: {{ .Values.service.type }}
ports:
- name: http1
# Port accessible outside cluster
......
......@@ -4,25 +4,18 @@
replicaCount: 1
namespace: "PROJECT"
namespace: "oai"
image:
registry: local
repository: image-registry.openshift-image-registry.svc:5000/PROJECT/oai-nrf
version: "TAG"
repository: oai-nrf
version: v1.1.0
# 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-nrf-sa"
......@@ -32,13 +25,7 @@ podSecurityContext:
runAsGroup: 0
securityContext:
privileged: true
# capabilities: