$ROOT_DIR/prepare-common-templates
-COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice"}
+COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice enrichmentservice"}
echo "Packaging NONRTRIC components [$COMPONENTS]"
for component in $COMPONENTS; do
done < <(find $ROOT_DIR/../ -maxdepth 5 -name Chart.yaml -printf '%h\0')
echo "***************************************"
-
+echo "Remove nonrtric parent chart from linting as its a conceptual visualization of Nonrtric components. This chart doesn't contain any templates & it's primarily
+used for grouping of all Nonrtric components in deployment"
for dir in "${CHART_ARRAY[@]}"
do
+ if [[ $dir == *"/helm/nonrtric"* ]]; then
+ echo "Skip Nonrtric Parent chart"
+ else
echo "Update chart dependency for directory $dir"
helm dep up $dir
# Lint clearly marks errors; e.g., [ERROR]
sleep 1
egrep -n '%!.\(.*=.*\)' /tmp/output && echo "Error: Type mismatch." && exit 1
echo "***************************************************************************************************************"
+ fi
done
}
}
}
-
+enrichmentservice:
+ enrichmentservice:
+ imagePullPolicy: IfNotPresent
+ image:
+ registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+ name: 'nonrtric-enrichment-coordinator-service'
+ tag: 1.0.0
+ service:
+ allowHttp: true
+ httpName: http
+ internalPort1: 9082
+ targetPort1: 8083
+ externalPort1: 30095
+ httpsName: https
+ internalPort2: 9083
+ targetPort2: 8434
+ externalPort2: 30096
+ liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ persistence:
+ enabled: true
+ volumeReclaimPolicy: Retain
+ accessMode: ReadWriteOnce
+ size: 2Gi
+ mountPath: /dockerdata-nfs
+ mountSubPath: nonrtric/enrichmentservice
\ No newline at end of file
NONRTRIC_NAMESPACE=$(echo "$NAMESPACE_BLOCK" | awk '/^ *nonrtric:/{print $2}')
RELEASE_PREFIX=$(echo "$COMMON_BLOCK" | awk '/^ *releasePrefix:/{print $2}')
PARENT_CHART=$(cat $OVERRIDEYAML | awk '/^ *component:/{print $2}')
-COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice nonrtric"}
+COMPONENTS=${LIST_OF_COMPONENTS:-"controlpanel a1controller a1simulator policymanagementservice enrichmentservice nonrtric"}
echo "Chart name- $PARENT_CHART"
if ! kubectl get ns ${NONRTRIC_NAMESPACE:-nonrtric}> /dev/null 2>&1; then
################################################################################
-COMPONENTS="controlpanel a1controller a1simulator policymanagementservice"
+COMPONENTS="controlpanel a1controller a1simulator policymanagementservice enrichmentservice"
RECIPE_NAMESPACE=$(kubectl get cm --all-namespaces | grep nonrtric-recipe | awk '{print $1}')
kubectl get configmap -n $RECIPE_NAMESPACE nonrtric-recipe -o jsonpath='{.data.recipe}' > /tmp/recipe.yaml
--- /dev/null
+# 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
+*~
+# Various IDEs
+.project
+.idea/
+*.tmproj
+.vscode/
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+apiVersion: v1
+appVersion: "1.0.0"
+description: A Helm chart for Enrichment Coordinator Service
+name: enrichmentservice
+version: 1.0.0
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+dependencies:
+ - name: nonrtric-common
+ version: ^2.0.0
+ repository: "@local"
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+spring:
+ profiles:
+ active: prod
+ main:
+ allow-bean-definition-overriding: true
+ aop:
+ auto: false
+management:
+ endpoints:
+ web:
+ exposure:
+ include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+logging:
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.data: ERROR
+ org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ org.oransc.enrichment: INFO
+ file:
+ name: /var/log/enrichment-coordinator-service/application.log
+server:
+ port : 8434
+ http-port: 8083
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: /opt/app/enrichment-coordinator-service/etc/cert/keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+app:
+ filepath: /opt/app/enrichment-coordinator-service/data/application_configuration.json
+ webclient:
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: /opt/app/enrichment-coordinator-service/etc/cert/truststore.jks
+ vardata-directory: /var/enrichment-coordinator-service
\ No newline at end of file
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.name.enrichmentservice" . }}-configmap
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+data:
+{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
\ No newline at end of file
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+kind: Deployment
+apiVersion: apps/v1
+metadata:
+ name: {{ include "common.name.enrichmentservice" . }}
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ generation: 1
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+ annotations:
+ deployment.kubernetes.io/revision: '1'
+spec:
+ replicas: 1
+ selector:
+ matchLabels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ release: {{ .Release.Name }}
+ template:
+ metadata:
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ release: {{ .Release.Name }}
+ spec:
+ hostname: {{ include "common.name.enrichmentservice" . }}
+ containers:
+ - name: {{ include "common.container.enrichmentservice" . }}
+ image: {{ .Values.enrichmentservice.image.registry }}/{{ .Values.enrichmentservice.image.name }}:{{ .Values.enrichmentservice.image.tag }}
+ imagePullPolicy: {{ .Values.enrichmentservice.imagePullPolicy }}
+ ports:
+ - containerPort: {{ .Values.enrichmentservice.service.targetPort1 }}
+ protocol: TCP
+ - containerPort: {{ .Values.enrichmentservice.service.targetPort2 }}
+ protocol: TCP
+ readinessProbe:
+ tcpSocket:
+ port: {{ .Values.enrichmentservice.service.targetPort1 }}
+ initialDelaySeconds: {{ .Values.enrichmentservice.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.enrichmentservice.liveness.periodSeconds }}
+ livenessProbe:
+ httpGet:
+ path: /status
+ port: {{ .Values.enrichmentservice.service.targetPort1 }}
+ initialDelaySeconds: {{ .Values.enrichmentservice.liveness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.enrichmentservice.liveness.periodSeconds }}
+ volumeMounts:
+ - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config
+ mountPath: /opt/app/enrichment-coordinator-service/config
+ - name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol
+ mountPath: /var/enrichment-coordinator-service/database
+ volumes:
+ - name: {{ include "common.name.enrichmentservice" . }}-enrichment-config
+ configMap:
+ name: {{ include "common.name.enrichmentservice" . }}-configmap
+ - name: {{ include "common.name.enrichmentservice" . }}-ei-jobs-vol
+ persistentVolumeClaim:
+ claimName: {{ include "common.name.enrichmentservice" . }}-pvc
\ No newline at end of file
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+kind: PersistentVolume
+apiVersion: v1
+metadata:
+ name: {{ include "common.name.enrichmentservice" . }}
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+ name: {{ include "common.name.enrichmentservice" . }}
+spec:
+ capacity:
+ storage: {{ .Values.enrichmentservice.persistence.size}}
+ accessModes:
+ - {{ .Values.enrichmentservice.persistence.accessMode }}
+ persistentVolumeReclaimPolicy: {{ .Values.enrichmentservice.persistence.volumeReclaimPolicy }}
+ hostPath:
+ path: {{ .Values.enrichmentservice.persistence.mountPath }}/{{ .Values.enrichmentservice.persistence.mountSubPath }}
+ storageClassName: "{{ include "common.name.enrichmentservice" . }}"
\ No newline at end of file
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+kind: PersistentVolumeClaim
+apiVersion: v1
+metadata:
+ name: {{ include "common.name.enrichmentservice" . }}-pvc
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ accessModes:
+ - {{ .Values.enrichmentservice.persistence.accessMode }}
+ resources:
+ requests:
+ storage: {{ .Values.enrichmentservice.persistence.size}}
+ storageClassName: "{{ include "common.name.enrichmentservice" . }}"
\ No newline at end of file
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+kind: Service
+apiVersion: v1
+metadata:
+ name: {{ include "common.name.enrichmentservice" . }}
+ namespace: {{ include "common.namespace.nonrtric" . }}
+ labels:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ release: {{ .Release.Name }}
+ heritage: {{ .Release.Service }}
+spec:
+ ports:
+ {{if eq .Values.enrichmentservice.service.allowHttp true -}}
+ - name: {{ index .Values.enrichmentservice.service.httpName }}
+ port: {{ .Values.enrichmentservice.service.internalPort1 }}
+ targetPort: {{ .Values.enrichmentservice.service.targetPort1 }}
+ nodePort: {{ .Values.enrichmentservice.service.externalPort1 }}
+ protocol: TCP
+ {{- end }}
+ - name: {{ index .Values.enrichmentservice.service.httpsName }}
+ port: {{ .Values.enrichmentservice.service.internalPort2 }}
+ targetPort: {{ .Values.enrichmentservice.service.targetPort2 }}
+ nodePort: {{ .Values.enrichmentservice.service.externalPort2 }}
+ protocol: TCP
+ selector:
+ app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.enrichmentservice" . }}
+ release: {{ .Release.Name }}
+ type: NodePort
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+# Default values for Enrichment Coordinate Service.
+# This is a YAML-formatted file.
+# Declare variables to be passed into your templates.
+
+enrichmentservice:
+ imagePullPolicy: IfNotPresent
+ image:
+ registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+ name: 'nonrtric-enrichment-coordinator-service'
+ tag: 1.0.0
+ service:
+ allowHttp: true
+ httpName: http
+ internalPort1: 9082
+ targetPort1: 8083
+ externalPort1: 30095
+ httpsName: https
+ internalPort2: 9083
+ targetPort2: 8434
+ externalPort2: 30096
+ liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+ persistence:
+ volumeReclaimPolicy: Retain
+ accessMode: ReadWriteOnce
+ size: 2Gi
+ mountPath: /dockerdata-nfs
+ mountSubPath: nonrtric/enrichmentservice
+
- name: policymanagementservice
version: ~2.0.0
repository: "@local"
+ - name: enrichmentservice
+ version: ~1.0.0
+ repository: "@local"
- name: nonrtric-common
version: ^2.0.0
repository: "@local"
--- /dev/null
+################################################################################
+# Copyright (c) 2020 Nordix Foundation. #
+# #
+# Licensed under the Apache License, Version 2.0 (the "License"); #
+# you may not use this file except in compliance with the License. #
+# You may obtain a copy of the License at #
+# #
+# http://www.apache.org/licenses/LICENSE-2.0 #
+# #
+# Unless required by applicable law or agreed to in writing, software #
+# distributed under the License is distributed on an "AS IS" BASIS, #
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
+# See the License for the specific language governing permissions and #
+# limitations under the License. #
+################################################################################
+
+{{- define "common.name.enrichmentservice" -}}
+ {{- printf "enrichmentservice" -}}
+{{- end -}}
+
+{{- define "common.container.enrichmentservice" -}}
+ {{- $name := ( include "common.name.enrichmentservice" . ) -}}
+ {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}