-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from lyz508/upgrade-free5gc-v341-rebase
Upgrade free5gc v3.4.2
- Loading branch information
Showing
60 changed files
with
797 additions
and
69 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# | ||
# Software Name : free5gc-helm | ||
# | ||
apiVersion: v2 | ||
name: free5gc-chf | ||
description: A Helm chart to deploy the free5GC CHF | ||
type: application | ||
version: 0.1.0 | ||
appVersion: latest | ||
maintainers: | ||
- email: [email protected] | ||
name: YANG-ZHE, LIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
# | ||
# Software Name : free5gc-helm | ||
# | ||
{{- with .Values.chf }} | ||
1. Get the application URL by running these commands: | ||
{{- if .ingress.enabled }} | ||
{{- range $host := .ingress.hosts }} | ||
{{- range .paths }} | ||
http{{ if $.ingress.tls }}s{{ end }}://{{ $host.host }}{{ .path }} | ||
{{- end }} | ||
{{- end }} | ||
{{- else if contains "NodePort" .service.type }} | ||
export NODE_PORT=$(kubectl get --namespace {{ $.Release.Namespace }} -o jsonpath="{.spec.ports[0].nodePort}" services {{ .service.name }}) | ||
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" .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 {{ .service.name }}' | ||
export SERVICE_IP=$(kubectl get svc --namespace {{ $.Release.Namespace }} {{ .service.name }} --template "{{"{{ range (index .status.loadBalancer.ingress 0) }}{{.}}{{ end }}"}}") | ||
echo http://$SERVICE_IP:{{ .service.port }} | ||
{{- else if contains "ClusterIP" .service.type }} | ||
export POD_NAME=$(kubectl get pods --namespace {{ $.Release.Namespace }} -l "app.kubernetes.io/name={{ include "free5gc-chf.name" $ }},app.kubernetes.io/instance={{ $.Release.Name }}" -o jsonpath="{.items[0].metadata.name}") | ||
export CONTAINER_PORT=$(kubectl get pod --namespace {{ $.Release.Namespace }} $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}") | ||
echo "Visit http://127.0.0.1:8080 to use your application" | ||
kubectl --namespace {{ $.Release.Namespace }} port-forward $POD_NAME 8080:$CONTAINER_PORT | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
# | ||
# Software Name : free5gc-helm | ||
# | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "free5gc-chf.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 "free5gc-chf.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 "free5gc-chf.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "free5gc-chf.labels" -}} | ||
helm.sh/chart: {{ include "free5gc-chf.chart" . }} | ||
{{ include "free5gc-chf.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "free5gc-chf.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "free5gc-chf.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
CHF Pod Annotations | ||
*/}} | ||
{{- define "free5gc-chf.chfAnnotations" -}} | ||
{{- with .Values.chf }} | ||
{{- if .podAnnotations }} | ||
{{- toYaml .podAnnotations }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} |
67 changes: 67 additions & 0 deletions
67
charts/free5gc/charts/free5gc-chf/templates/chf-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# | ||
# Software Name : free5gc-helm | ||
# | ||
{{- with .Values.chf }} | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "free5gc-chf.fullname" $ }}-configmap | ||
labels: | ||
app: {{ $.Values.global.projectName }} | ||
data: | ||
chfcfg.yaml: | | ||
info: | ||
version: 1.0.3 | ||
description: CHF initial local configuration | ||
configuration: | ||
chfName: CHF # the name of this CHF | ||
sbi: # Service-based interface information | ||
scheme: {{ $.Values.global.sbi.scheme }} # the protocol for sbi (http or https) | ||
registerIPv4: {{ include "free5gc-chf.fullname" $ }}-service # IP used to register to NRF | ||
bindingIPv4: 0.0.0.0 # IP used to bind the service | ||
port: {{ .service.port }} # port used to bind the service | ||
tls: # the local path of TLS key | ||
pem: ./cert/chf.pem # CHF TLS Certificate | ||
key: ./cert/chf.key # CHF TLS Private key | ||
nrfUri: {{ $.Values.global.sbi.scheme }}://{{ $.Values.global.nrf.service.name }}:{{ $.Values.global.nrf.service.port }} # a valid URI of NRF | ||
nrfCertPem: ./nrf-cert/nrf.pem # NRF Certificate | ||
serviceNameList: # the SBI services provided by this CHF, refer to TS 32.291 | ||
{{- .configuration.serviceNameList | nindent 8 }} | ||
mongodb: # the mongodb connected by this CHF | ||
name: free5gc # name of the mongodb | ||
url: mongodb://{{ $.Values.mongodb.service.name }}:{{ $.Values.mongodb.service.port }} # a valid URL of the mongodb | ||
quotaValidityTime: 10000 | ||
volumeLimit: 50000 | ||
volumeLimitPDU: 10000 | ||
volumeThresholdRate: 0.8 | ||
cgf: | ||
hostIPv4: {{ $.Values.global.webui.service.name }} | ||
port: {{ $.Values.global.webui.service.port }} | ||
listenPort: {{ $.Values.global.cgf.service.port }} | ||
tls: | ||
pem: ./cert/chf.pem | ||
key: ./cert/chf.key | ||
cdrFilePath: /tmp | ||
abmfDiameter: | ||
protocol: tcp | ||
hostIPv4: 0.0.0.0 | ||
port: 3868 | ||
tls: | ||
pem: ./cert/chf.pem | ||
key: ./cert/chf.key | ||
rfDiameter: | ||
protocol: tcp | ||
hostIPv4: 0.0.0.0 | ||
port: 3869 | ||
tls: | ||
pem: ./cert/chf.pem # CHF TLS Certificate | ||
key: ./cert/chf.key # CHF TLS Private key | ||
logger: # log output setting | ||
{{- toYaml .configuration.logger | nindent 6 }} | ||
{{- end }} |
Oops, something went wrong.