From: John Keeney Date: Fri, 14 Jan 2022 11:07:52 +0000 (+0000) Subject: Merge "Add ORU ODU helm charts to nonrtric deployement" X-Git-Tag: f-release~18 X-Git-Url: https://gerrit.o-ran-sc.org/r/gitweb?a=commitdiff_plain;h=3d3672fbb1f20e168f33bf6511b5120f3fcc04fe;hp=f5c959cfbd1c8101730d25ba857075514a72f6b0;p=it%2Fdep.git Merge "Add ORU ODU helm charts to nonrtric deployement" --- diff --git a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml index e856e8ea..510ecb22 100644 --- a/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml +++ b/nonrtric/RECIPE_EXAMPLE/example_recipe.yaml @@ -38,14 +38,15 @@ nonrtric: # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning) size: 2Gi storageClassName: pms-storage + hostPath: /var/nonrtric/pms-storage volume2: # Set the size to 0 if you do not need the volume (if you are using Dynamic Volume Provisioning) size: 2Gi storageClassName: ics-storage + hostPath: /var/nonrtric/ics-storage volume3: size: 1Gi storageClassName: helmmanager-storage - common: releasePrefix: r3-dev-nonrtric # Do not change the namespace diff --git a/nonrtric/helm/nonrtric/templates/pv1.yaml b/nonrtric/helm/nonrtric/templates/pv1.yaml index c9ba128a..27426e46 100644 --- a/nonrtric/helm/nonrtric/templates/pv1.yaml +++ b/nonrtric/helm/nonrtric/templates/pv1.yaml @@ -29,7 +29,7 @@ spec: - ReadWriteMany persistentVolumeReclaimPolicy: Retain hostPath: - path: /dockerdata-nfs/nonrtric/volume1 + path: {{ .Values.nonrtric.volume1.hostPath }} storageClassName: {{ .Values.nonrtric.volume1.storageClassName }} {{- end }} diff --git a/nonrtric/helm/nonrtric/templates/pv2.yaml b/nonrtric/helm/nonrtric/templates/pv2.yaml index 6fd313cc..0058780e 100644 --- a/nonrtric/helm/nonrtric/templates/pv2.yaml +++ b/nonrtric/helm/nonrtric/templates/pv2.yaml @@ -29,7 +29,7 @@ spec: - ReadWriteMany persistentVolumeReclaimPolicy: Retain hostPath: - path: /dockerdata-nfs/nonrtric/volume2 + path: {{ .Values.nonrtric.volume2.hostPath }} storageClassName: {{ .Values.nonrtric.volume2.storageClassName }} {{- end }} diff --git a/nonrtric/helm/nonrtric/values.yaml b/nonrtric/helm/nonrtric/values.yaml index d33f23bc..983ca346 100644 --- a/nonrtric/helm/nonrtric/values.yaml +++ b/nonrtric/helm/nonrtric/values.yaml @@ -31,9 +31,11 @@ nonrtric: volume1: size: 1Gi storageClassName: volume1 + hostPath: /dockerdata-nfs/nonrtric/volume1 volume2: size: 1Gi storageClassName: volume2 + hostPath: /dockerdata-nfs/nonrtric/volume2 volume3: size: 1Gi storageClassName: volume3 \ No newline at end of file diff --git a/nonrtric/helm/policymanagementservice/resources/config/application.yaml b/nonrtric/helm/policymanagementservice/resources/config/application.yaml index 5fc5051e..0294e378 100644 --- a/nonrtric/helm/policymanagementservice/resources/config/application.yaml +++ b/nonrtric/helm/policymanagementservice/resources/config/application.yaml @@ -53,7 +53,7 @@ server: app: # Location of the component configuration file. The file will only be used if the Consul database is not used; # configuration from the Consul will override the file. - filepath: /opt/app/policy-agent/data/application_configuration.json + filepath: /var/policy-management-service/application_configuration.json webclient: # Configuration of the trust store used for the HTTP client (outgoing requests) # The file location and the password for the truststore is only relevant if trust-store-used == true @@ -67,3 +67,6 @@ app: http.proxy-port: 0 # path where the service can store data vardata-directory: /var/policy-management-service + # the config-file-schema-path referres to a location in the jar file. If this property is empty or missing, + # no schema validation will be executed. + config-file-schema-path: /application_configuration_schema.json diff --git a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml index 3ef28260..0930d074 100644 --- a/nonrtric/helm/policymanagementservice/templates/statefulset.yaml +++ b/nonrtric/helm/policymanagementservice/templates/statefulset.yaml @@ -41,6 +41,21 @@ spec: release: {{ .Release.Name }} spec: hostname: {{ include "common.name.policymanagementservice" . }} + initContainers: + - name: copy + image: busybox:1.28 + command: + - /bin/sh + - -c + - FILE=/var/policy-management-service/application_configuration.json; + if [ ! -f $FILE ]; then + cp /etc/app/policy-management-service/initialdata/application_configuration.json $FILE; + fi + volumeMounts: + - name: {{ include "common.name.policymanagementservice" . }}-vardata + mountPath: "/var/policy-management-service" + - name: {{ include "common.name.policymanagementservice" . }}-policy-data + mountPath: /etc/app/policy-management-service/initialdata containers: - name: {{ include "common.container.policymanagementservice" . }} image: {{ .Values.policymanagementservice.image.registry }}/{{ .Values.policymanagementservice.image.name }}:{{ .Values.policymanagementservice.image.tag }} @@ -67,7 +82,7 @@ spec: - name: {{ include "common.name.policymanagementservice" . }}-policy-config mountPath: /opt/app/policy-agent/config - name: {{ include "common.name.policymanagementservice" . }}-policy-data - mountPath: /opt/app/policy-agent/data + mountPath: /etc/app/policy-management-service/initialdata volumes: - name: {{ include "common.name.policymanagementservice" . }}-policy-config configMap: