ingressClassName: kong
informationservice:
- informationservice:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
- size: 2Gi
- storageClassName: ics-storage
- ingress:
- enabled: true
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
+ size: 2Gi
+ storageClassName: ics-storage
+ ingress:
+ enabled: true
# Need to check the external port Availability
policymanagementservice:
- policymanagementservice:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
- size: 2Gi
- storageClassName: pms-storage
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
+ size: 2Gi
+ storageClassName: pms-storage
ingress:
enabled: true
enabled: true
helmmanager:
- helmmanager:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed si>
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be f>
- storageClassName: helmmanager-storage
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed si>
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be f>
+ storageClassName: helmmanager-storage
controlpanel:
- controlpanel:
- ingress:
- enabled: false
+ ingress:
+ enabled: false
oru-app:
simulators:
ingressClassName: kong
informationservice:
- informationservice:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
- size: 2Gi
- storageClassName: ics-storage
- ingress:
- enabled: true
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
+ size: 2Gi
+ storageClassName: ics-storage
+ ingress:
+ enabled: true
# Need to check the external port Availability
policymanagementservice:
- policymanagementservice:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
- size: 2Gi
- storageClassName: pms-storage
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
+ size: 2Gi
+ storageClassName: pms-storage
ingress:
enabled: true
enabled: true
helmmanager:
- helmmanager:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed si>
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be f>
- storageClassName: helmmanager-storage
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed si>
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be f>
+ storageClassName: helmmanager-storage
controlpanel:
- controlpanel:
- ingress:
- enabled: false
+ ingress:
+ enabled: false
oru-app:
simulators:
ingressClassName: kong
informationservice:
- informationservice:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
- size: 2Gi
- storageClassName: ics-storage
- ingress:
- enabled: true
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be for instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
+ size: 2Gi
+ storageClassName: ics-storage
+ ingress:
+ enabled: true
# Need to check the external port Availability
policymanagementservice:
- policymanagementservice:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
- size: 2Gi
- storageClassName: pms-storage
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed size should be the same.
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be fon instance 'standard' or 'gluster-fs' (depeneds on which classes that are available)
+ size: 2Gi
+ storageClassName: pms-storage
ingress:
enabled: true
enabled: true
helmmanager:
- helmmanager:
- persistence:
- # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed si>
- # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be f>
- storageClassName: helmmanager-storage
+ persistence:
+ # Either refer to a volume created under the nonrtric by storageClassName. Then the claimed si>
+ # The alternative use a dynamic volume provisioner in the cluster. Storage class can then be f>
+ storageClassName: helmmanager-storage
controlpanel:
- controlpanel:
- ingress:
- enabled: false
+ ingress:
+ enabled: false
oru-app:
simulators:
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ repository: "@local"
kind: Deployment
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.a1controller" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- replicas: {{ .Values.a1controller.replicaCount }}
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
- release: {{ .Release.Name }}
+ replicas: {{ .Values.replicaCount }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.a1controller" . }}
+ hostname: {{ include "common.name" . }}
containers:
- - name: {{ include "common.containername.a1controller" . }}
- image: {{ .Values.a1controller.image.registry }}/{{ .Values.a1controller.image.name }}:{{ .Values.a1controller.image.tag }}
- imagePullPolicy: {{ .Values.a1controller.imagePullPolicy }}
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
command:
- /opt/onap/sdnc/bin/startODL.sh
- ports:
- - containerPort: {{ .Values.a1controller.service.targetPort1 }}
- protocol: TCP
- - containerPort: {{ .Values.a1controller.service.targetPort2 }}
- protocol: TCP
+ ports: {{- include "common.containerPorts" . | nindent 10 }}
+ {{- include "common.tcpsocketProbes" . | nindent 10 }}
env:
- name: MYSQL_ROOT_PASSWORD
value: 'itsASecret'
value: 'a1adapter'
- name: AAI_TRUSTSTORE_PASSWORD
value: 'changeit'
- readinessProbe:
- tcpSocket:
- port: {{ .Values.a1controller.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.a1controller.readiness.initialDelaySeconds }}
- periodSeconds: {{ .Values.a1controller.readiness.periodSeconds }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.a1controller.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.a1controller.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.a1controller.liveness.periodSeconds }}
---
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: db
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: db
+metadata: {{- include "common.resourceMetadata" (dict "suffix" "db" "dot" . ) | nindent 2 }}
+{{ $selectorsCtx := dict "matchLabels" (dict "app.kubernetes.io/component" "db") "dot" . }}
+{{ $templateMetadataCtx := dict "labels" (dict "app.kubernetes.io/component" "db") "dot" . }}
spec:
- selector:
- matchLabels:
- app: db
+ selector: {{- include "common.selectors" $selectorsCtx | nindent 4 }}
template:
- metadata:
- labels:
- app: db
+ metadata: {{- include "common.templateMetadata" $templateMetadataCtx | nindent 6 }}
spec:
containers:
- name: sdnc-db-container
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.a1controller" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- type: ClusterIP
- ports:
- {{if eq .Values.a1controller.service.allowHttp true -}}
- - name: {{ index .Values.a1controller.service.httpName }}
- port: {{ .Values.a1controller.service.internalPort1 }}
- targetPort: {{ .Values.a1controller.service.targetPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.a1controller.service.httpsName }}
- port: {{ .Values.a1controller.service.internalPort2 }}
- targetPort: {{ .Values.a1controller.service.targetPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.a1controller" . }}
- release: {{ .Release.Name }}
----
-apiVersion: v1
-kind: Service
-metadata:
- name: dbhost
- namespace: {{ include "common.namespace.nonrtric" . }}
-spec:
- ports:
- - port: 3306
- targetPort: 3306
- selector:
- app: db
----
-apiVersion: v1
-kind: Service
-metadata:
- name: sdnctldb01
- namespace: {{ include "common.namespace.nonrtric" . }}
-spec:
- ports:
- - port: 3306
- targetPort: 3306
- selector:
- app: db
+{{ include "common.service" . }}
# Default values for a1controller.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-a1controller:
- imagePullPolicy: IfNotPresent
- image:
- registry: 'nexus3.onap.org:10002/onap'
- name: sdnc-image
- tag: 2.1.6
- replicaCount: 1
- service:
- allowHttp: true
- httpName: http
- internalPort1: 8282
- targetPort1: 8181
- httpsName: https
- internalPort2: 8383
- targetPort2: 8443
- liveness:
- initialDelaySeconds: 300
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 60
- periodSeconds: 10
+imagePullPolicy: IfNotPresent
+image:
+ registry: 'nexus3.onap.org:10002/onap'
+ name: sdnc-image
+ tag: 2.1.6
+replicaCount: 1
+service:
+ type: ClusterIP
+ ports:
+ - name: http
+ internalPort: 8282
+ targetPort: 8181
+ name_tls: https
+ internalPort_tls: 8383
+ targetPort_tls: 8443
+liveness:
+ initialDelaySeconds: 300
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 60
+ periodSeconds: 10
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ repository: "@local"
{{- end -}}
{{- end -}}
{{- end -}}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
# limitations under the License.
*/}}
-{{/*
- Resolve the namespace to apply to a chart. The default namespace suffix
- is the name of the chart. This can be overridden if necessary (eg. for subcharts)
- using the following value:
-
- - .Values.nsPrefix : override namespace prefix
-*/}}
{{- define "common.namespace" -}}
- {{- default .Release.Namespace .Values.nsPrefix -}}
+{{- .Release.Namespace -}}
{{- end -}}
{{- define "common.servicename" -}}
{{- $name := default .Chart.Name .Values.nameOverride -}}
{{- default $name .Values.service.name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
\ No newline at end of file
+{{- end -}}
apiVersion: v1
kind: ConfigMap
metadata:
- name: {{ include "common.name.controlpanel" . }}-configmap
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
+ {{ include "common.resourceMetadata" (dict "suffix" "configmap" "dot" . ) | nindent 2 }}
data:
-{{ if eq .Values.controlpanel.ingress.enabled false }}
+{{ if eq .Values.ingress.enabled false }}
{{ tpl (.Files.Glob "resources-ngw/*").AsConfig . | indent 2 }}
{{ else }}
{{ tpl (.Files.Glob "resources-ing/*").AsConfig . | indent 2 }}
kind: Deployment
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.controlpanel" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- replicas: {{ .Values.controlpanel.replicaCount }}
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }}
- release: {{ .Release.Name }}
+ replicas: {{ .Values.replicaCount }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.controlpanel" . }}
+ hostname: {{ include "common.name" . }}
containers:
- - name: {{ include "common.containername.controlpanel" . }}
- image: {{ .Values.controlpanel.image.registry }}/{{ .Values.controlpanel.image.name }}:{{ .Values.controlpanel.image.tag }}
- imagePullPolicy: {{ .Values.controlpanel.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.controlpanel.service.targetPort1 }}
- protocol: TCP
- - containerPort: {{ .Values.controlpanel.service.targetPort2 }}
- protocol: TCP
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 10 }}
+ {{- include "common.tcpsocketProbes" . | nindent 10 }}
volumeMounts:
- name: configmap
mountPath: /etc/nginx/nginx.conf
subPath: nginx.conf
readOnly: true
- readinessProbe:
- tcpSocket:
- port: {{ .Values.controlpanel.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.controlpanel.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.controlpanel.liveness.periodSeconds }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.controlpanel.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.controlpanel.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.controlpanel.liveness.periodSeconds }}
volumes:
- name: configmap
configMap:
- name: {{ include "common.name.controlpanel" . }}-configmap
\ No newline at end of file
+ name: {{ include "common.name" . }}-configmap
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.controlpanel" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- type: NodePort
- ports:
- {{if eq .Values.controlpanel.service.allowHttp true -}}
- - name: {{ index .Values.controlpanel.service.httpName }}
- port: {{ .Values.controlpanel.service.internalPort1 }}
- targetPort: {{ .Values.controlpanel.service.targetPort1 }}
- nodePort: {{ .Values.controlpanel.service.externalPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.controlpanel.service.httpsName }}
- port: {{ .Values.controlpanel.service.internalPort2 }}
- targetPort: {{ .Values.controlpanel.service.targetPort2 }}
- nodePort: {{ .Values.controlpanel.service.externalPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.controlpanel" . }}
- release: {{ .Release.Name }}
\ No newline at end of file
+{{ include "common.service" . }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-controlpanel:
- imagePullPolicy: IfNotPresent
- image:
- registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
- name: nonrtric-controlpanel
- tag: 2.5.0
- replicaCount: 1
- service:
- allowHttp: true
- httpName: http
- internalPort1: 8182
- targetPort1: 8080
- externalPort1: 30091
- httpsName: https
- internalPort2: 8082
- targetPort2: 8082
- externalPort2: 30092
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
+imagePullPolicy: IfNotPresent
+image:
+ registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+ name: nonrtric-controlpanel
+ tag: 2.5.0
+replicaCount: 1
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
- ingress:
- enabled: true
+service:
+ type: NodePort
+ ports:
+ - name: http
+ internalPort: "8182"
+ targetPort: "8080"
+ nodePort: "30091"
+ name_tls: https
+ internalPort_tls: "8082"
+ targetPort_tls: "8082"
+ nodePort_tls: "30092"
+
+
+ingress:
+ enabled: true
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ repository: "@local"
+++ /dev/null
-################################################################################
-# Copyright (c) 2021 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:
- # Enabling of springboot actuator features. See springboot documentation.
- include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
-springdoc:
- show-actuator: true
-logging:
- # Configuration of logging
- level:
- ROOT: ERROR
- org.springframework: ERROR
- org.springframework.data: ERROR
- org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
- org.oran.dmaapadapter: DEBUG
- file:
- name: /var/log/dmaap-adapter-service/application.log
-server:
- # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
- # See springboot documentation.
- port : 8435
- http-port: 8084
- ssl:
- key-store-type: JKS
- key-store-password: policy_agent
- key-store: /opt/app/dmaap-adapter-service/etc/cert/keystore.jks
- key-password: policy_agent
- key-alias: policy_agent
-app:
- 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
- # Note that the same keystore as for the server is used.
- trust-store-used: false
- trust-store-password: policy_agent
- trust-store: /opt/app/dmaap-adapter-service/etc/cert/truststore.jks
- # Configuration of usage of HTTP Proxy for the southbound accesses.
- # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
- http.proxy-host:
- http.proxy-port: 0
- ics-base-url: https://informationservice.nonrtric:9083
- # 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.
- configuration-filepath: /opt/app/dmaap-adapter-service/data/application_configuration.json
- dmaap-base-url: http://message-router.onap:3904
- # The url used to adress this component. This is used as a callback url sent to other components.
- dmaap-adapter-base-url: https://dmaapadapterservice.nonrtric:9088
- # KAFKA boostrap server. This is only needed if there are Information Types that uses a kafkaInputTopic
- kafka:
- bootstrap-servers: message-router-kafka.onap:9092
- # If the file name is empty, no authorization token is used
- auth-token-file:
- pm-files-path: /tmp
- zip-output: false
- s3:
- endpointOverride: http://localhost:9000
- accessKeyId: minio
- secretAccessKey: miniostorage
- locksBucket: ropfilelocks
- bucket: ropfiles
\ No newline at end of file
+++ /dev/null
-{
- "types": [
- {
- "id": "ExampleInformationType",
- "dmaapTopicUrl": "/events/unauthenticated.dmaapadp.json/dmaapadapterproducer/msgs?timeout=15000&limit=100",
- "useHttpProxy": false
- },
- {
- "id": "ExampleInformationTypeKafka",
- "kafkaInputTopic": "unauthenticated.dmaapadp_kafka.text",
- "useHttpProxy": false
- }
- ]
- }
################################################################################
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.name.dmaapadapterservice" . }}-configmap-config
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+{{ include "common.applicationConfigmap" . }}
---
apiVersion: v1
kind: ConfigMap
-metadata:
- name: {{ include "common.name.dmaapadapterservice" . }}-configmap-data
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
+metadata: {{ include "common.resourceMetadata" (dict "suffix" "type-configmap" "dot" . ) | nindent 2 }}
data:
-{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }}
+ type_config.json: |
+ {{- (dict "types" .Values.types) | toRawJson | nindent 4 }}
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.dmaapadapterservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- {{if eq .Values.dmaapadapterservice.service.allowHttp true -}}
- - name: {{ index .Values.dmaapadapterservice.service.httpName }}
- port: {{ .Values.dmaapadapterservice.service.internalPort1 }}
- targetPort: {{ .Values.dmaapadapterservice.service.targetPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.dmaapadapterservice.service.httpsName }}
- port: {{ .Values.dmaapadapterservice.service.internalPort2 }}
- targetPort: {{ .Values.dmaapadapterservice.service.targetPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- release: {{ .Release.Name }}
- type: ClusterIP
+{{ include "common.service" . }}
kind: StatefulSet
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.dmaapadapterservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- serviceName: {{ include "common.name.dmaapadapterservice" . }}
+ serviceName: {{ include "common.name" . }}
replicas: 1
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- release: {{ .Release.Name }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapadapterservice" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.dmaapadapterservice" . }}
+ hostname: {{ include "common.name" . }}
containers:
- - name: {{ include "common.container.dmaapadapterservice" . }}
- image: {{ .Values.dmaapadapterservice.image.registry }}/{{ .Values.dmaapadapterservice.image.name }}:{{ .Values.dmaapadapterservice.image.tag }}
- imagePullPolicy: {{ .Values.dmaapadapterservice.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.dmaapadapterservice.service.targetPort1 }}
- protocol: TCP
- - containerPort: {{ .Values.dmaapadapterservice.service.targetPort2 }}
- protocol: TCP
- readinessProbe:
- tcpSocket:
- port: {{ .Values.dmaapadapterservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.dmaapadapterservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.dmaapadapterservice.liveness.periodSeconds }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.dmaapadapterservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.dmaapadapterservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.dmaapadapterservice.liveness.periodSeconds }}
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 8 }}
+ {{- include "common.tcpsocketProbes" . | nindent 8 }}
volumeMounts:
- - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-config
+ - name: {{ include "common.applicationConfigMountName" . }}
mountPath: /opt/app/dmaap-adapter-service/config
- - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-data
+ - name: {{ include "common.name" . }}-dmaapadapter-data
mountPath: /opt/app/dmaap-adapter-service/data
volumes:
- - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-config
+ {{- include "common.applicationConfigVolume" . | nindent 8 }}
+ - name: {{ include "common.name" . }}-dmaapadapter-data
configMap:
- name: {{ include "common.name.dmaapadapterservice" . }}-configmap-config
- - name: {{ include "common.name.dmaapadapterservice" . }}-dmaapadapter-data
- configMap:
- name: {{ include "common.name.dmaapadapterservice" . }}-configmap-data
+ name: {{ include "common.name" . }}-type-configmap
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-dmaapadapterservice:
- imagePullPolicy: IfNotPresent
- image:
- registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
- name: "nonrtric-plt-dmaapadapter"
- tag: 1.3.0
- service:
- allowHttp: true
- httpName: http
- internalPort1: 9087
- targetPort1: 8084
- httpsName: https
- internalPort2: 9088
- targetPort2: 8435
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
+imagePullPolicy: IfNotPresent
+image:
+ registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+ name: "nonrtric-plt-dmaapadapter"
+ tag: 1.3.0
+service:
+ type: ClusterIP
+ ports:
+ - name: http
+ internalPort: 9087
+ targetPort: 8084
+ name_tls: https
+ internalPort_tls: 9088
+ targetPort_tls: 8435
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+
+types:
+ - id: "ExampleInformationType"
+ dmaapTopicUrl: "/events/unauthenticated.dmaapadp.json/dmaapadapterproducer/msgs?timeout=15000&limit=100"
+ useHttpProxy: false
+ - id: "ExampleInformationTypeKafka"
+ kafkaInputTopic: "unauthenticated.dmaapadp_kafka.text"
+ useHttpProxy: false
+
+application:
+ spring:
+ profiles:
+ active: prod
+ main:
+ allow-bean-definition-overriding: true
+ aop:
+ auto: false
+ management:
+ endpoints:
+ web:
+ exposure:
+ # Enabling of springboot actuator features. See springboot documentation.
+ include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+ springdoc:
+ show-actuator: true
+ logging:
+ # Configuration of logging
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.data: ERROR
+ org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ org.oran.dmaapadapter: DEBUG
+ file:
+ name: /var/log/dmaap-adapter-service/application.log
+ server:
+ # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
+ # See springboot documentation.
+ port : 8435
+ http-port: 8084
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: /opt/app/dmaap-adapter-service/etc/cert/keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+ app:
+ 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
+ # Note that the same keystore as for the server is used.
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: /opt/app/dmaap-adapter-service/etc/cert/truststore.jks
+ # Configuration of usage of HTTP Proxy for the southbound accesses.
+ # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
+ http.proxy-host:
+ http.proxy-port: 0
+ ics-base-url: https://informationservice.nonrtric:9083
+ # 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.
+ configuration-filepath: /opt/app/dmaap-adapter-service/data/application_configuration.json
+ dmaap-base-url: http://message-router.onap:3904
+ # The url used to adress this component. This is used as a callback url sent to other components.
+ dmaap-adapter-base-url: https://dmaapadapterservice.nonrtric:9088
+ # KAFKA boostrap server. This is only needed if there are Information Types that uses a kafkaInputTopic
+ kafka:
+ bootstrap-servers: message-router-kafka.onap:9092
+ # If the file name is empty, no authorization token is used
+ auth-token-file:
+ pm-files-path: /tmp
+ zip-output: false
+ s3:
+ endpointOverride: http://localhost:9000
+ accessKeyId: minio
+ secretAccessKey: miniostorage
+ locksBucket: ropfilelocks
+ bucket: ropfiles
+++ /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
-{
- "types":
- [
- {
- "id": "STD_Fault_Messages",
- "dmaapTopicUrl": "/events/unauthenticated.dmaapmed.json/dmaapmediatorproducer/STD_Fault_Messages?timeout=15000&limit=100"
- },
- {
- "id": "VES_Fault_Messages",
- "dmaapTopicUrl": "/events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/VES_Fault_Messages?timeout=15000&limit=100"
- }
- ]
- }
+#!/bin/sh
################################################################################
-# Copyright (c) 2021 Nordix Foundation. #
+# Copyright (c) 2024 NYCU WINLab. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# limitations under the License. #
################################################################################
-{{- define "common.name.helmmanager" -}}
- {{- printf "helmmanager" -}}
-{{- end -}}
+topics='{{ .Values.dmaapTopicInit.topics | toRawJson }}'
-{{- define "common.container.helmmanager" -}}
- {{- $name := ( include "common.name.helmmanager" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+echo $topics | jq -c '.[]' | while read -r obj; do
+ curl -X POST -H "Content-Type: application/json" -d "$obj" {{ .Values.dmaapTopicInit.dmaapMrAddr }}/topics/create
+ response=$?
+ if [ $response -ne 0 ]; then
+ echo "Failed to create topic $obj"
+ exit 1
+ fi
+done
+{{/*
################################################################################
-# Copyright (c) 2020 Nordix Foundation. #
+# Copyright (c) 2024 NYCU WINLab. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
+*/}}
-{{- define "common.name.a1simulator" -}}
- {{- printf "a1simulator" -}}
+{{- define "dmaapTopic.initContainer" -}}
+- name: dmaap-topic-init
+ image: alpine:3.19.1
+ command:
+ - sh
+ - -c
+ - apk add --no-cache curl jq; sh /app/dmaap-topic-init.sh;
+ volumeMounts:
+ - name: dmaap-topic-init
+ mountPath: /app
{{- end -}}
-{{- define "common.fullname.a1simulator" -}}
- {{- $name := ( include "common.name.a1simulator" . ) -}}
- {{- $namespace := ( include "common.namespace.nonrtric" . ) -}}
- {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+{{- define "dmaapTopic.initConfigMap" -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.name" . }}-dmaap-topic-init
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+data:
+ dmaap-topic-init.sh: |
+ {{- tpl (.Files.Get "resources/dmaap-topic-init.sh") . | nindent 4 }}
+{{- end }}
-{{- define "common.containername.a1simulator" -}}
- {{- $name := ( include "common.fullname.a1simulator" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+{{- define "dmaapTopic.initVolume" -}}
+- name: dmaap-topic-init
+ configMap:
+ name: {{ include "common.name" . }}-dmaap-topic-init
+{{- end }}
apiVersion: v1
kind: ConfigMap
-metadata:
- name: {{ include "common.name.dmaapmediatorservice" . }}-configmap-data
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapmediatorservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
+metadata: {{ include "common.resourceMetadata" (dict "suffix" "type-configmap" "dot" . ) | nindent 2 }}
data:
-{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }}
+ type_config.json: |
+ {{- (dict "types" .Values.types) | toRawJson | nindent 4 }}
+---
+{{ if .Values.dmaapTopicInit.enabled -}}
+{{ include "dmaapTopic.initConfigMap" . }}
+---
+{{- end -}}
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.dmaapmediatorservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapmediatorservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- {{if eq .Values.dmaapmediatorservice.service.allowHttp true -}}
- - name: {{ index .Values.dmaapmediatorservice.service.httpName }}
- port: {{ .Values.dmaapmediatorservice.service.internalPort1 }}
- targetPort: {{ .Values.dmaapmediatorservice.service.targetPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.dmaapmediatorservice.service.httpsName }}
- port: {{ .Values.dmaapmediatorservice.service.internalPort2 }}
- targetPort: {{ .Values.dmaapmediatorservice.service.targetPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapmediatorservice" . }}
- release: {{ .Release.Name }}
- type: ClusterIP
+{{ include "common.service" . }}
-################################################################################\r
-# Copyright (c) 2021 Nordix Foundation. #\r
-# #\r
-# Licensed under the Apache License, Version 2.0 (the "License"); #\r
-# you may not use this file except in compliance with the License. #\r
-# You may obtain a copy of the License at #\r
-# #\r
-# http://www.apache.org/licenses/LICENSE-2.0 #\r
-# #\r
-# Unless required by applicable law or agreed to in writing, software #\r
-# distributed under the License is distributed on an "AS IS" BASIS, #\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\r
-# See the License for the specific language governing permissions and #\r
-# limitations under the License. #\r
-################################################################################\r
-\r
-kind: StatefulSet\r
-apiVersion: apps/v1\r
-metadata:\r
- name: {{ include "common.name.dmaapmediatorservice" . }}\r
- namespace: {{ include "common.namespace.nonrtric" . }}\r
- generation: 1\r
- labels:\r
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapmediatorservice" . }}\r
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}\r
- release: {{ .Release.Name }}\r
- heritage: {{ .Release.Service }}\r
- annotations:\r
- deployment.kubernetes.io/revision: '1'\r
-spec:\r
- serviceName: {{ include "common.name.dmaapmediatorservice" . }}\r
- replicas: 1\r
- selector:\r
- matchLabels:\r
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapmediatorservice" . }}\r
- release: {{ .Release.Name }}\r
- template:\r
- metadata:\r
- labels:\r
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.dmaapmediatorservice" . }}\r
- release: {{ .Release.Name }}\r
- spec:\r
- hostname: {{ include "common.name.dmaapmediatorservice" . }}\r
- containers:\r
- - name: {{ include "common.container.dmaapmediatorservice" . }}\r
- image: {{ .Values.dmaapmediatorservice.image.registry }}/{{ .Values.dmaapmediatorservice.image.name }}:{{ .Values.dmaapmediatorservice.image.tag }}\r
- imagePullPolicy: {{ .Values.dmaapmediatorservice.imagePullPolicy }}\r
- ports:\r
- - containerPort: {{ .Values.dmaapmediatorservice.service.targetPort1 }}\r
- protocol: TCP\r
- - containerPort: {{ .Values.dmaapmediatorservice.service.targetPort2 }}\r
- protocol: TCP\r
- readinessProbe:\r
- tcpSocket:\r
- port: {{ .Values.dmaapmediatorservice.service.targetPort2 }}\r
- initialDelaySeconds: {{ .Values.dmaapmediatorservice.liveness.initialDelaySeconds }}\r
- periodSeconds: {{ .Values.dmaapmediatorservice.liveness.periodSeconds }}\r
- livenessProbe:\r
- tcpSocket:\r
- port: {{ .Values.dmaapmediatorservice.service.targetPort2 }}\r
- initialDelaySeconds: {{ .Values.dmaapmediatorservice.liveness.initialDelaySeconds }}\r
- periodSeconds: {{ .Values.dmaapmediatorservice.liveness.periodSeconds }}\r
- volumeMounts:\r
- - name: {{ include "common.name.dmaapmediatorservice" . }}-dmaapmediator-data\r
- mountPath: /configs/type_config.json\r
- subPath: type_config.json\r
-\r
- env:\r
- - name: INFO_PRODUCER_HOST\r
- value: https://{{ include "common.name.dmaapmediatorservice" . }}\r
- - name: INFO_PRODUCER_PORT\r
- value: "{{ .Values.dmaapmediatorservice.service.internalPort2 }}"\r
- - name: INFO_COORD_ADDR\r
- value: https://informationservice:9083\r
- - name: DMAAP_MR_ADDR\r
- value: http://message-router.onap:3904\r
- - name: LOG_LEVEL\r
- value: Info\r
- volumes:\r
- - name: {{ include "common.name.dmaapmediatorservice" . }}-dmaapmediator-data\r
- configMap:\r
- name: {{ include "common.name.dmaapmediatorservice" . }}-configmap-data\r
+################################################################################
+# Copyright (c) 2021 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: StatefulSet
+apiVersion: apps/v1
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
+spec:
+ serviceName: {{ include "common.name" . }}
+ replicas: 1
+ selector: {{- include "common.selectors" . | nindent 4 }}
+ template:
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+ spec:
+ hostname: {{ include "common.name" . }}
+ {{- if .Values.dmaapTopicInit.enabled }}
+ initContainers: {{- include "dmaapTopic.initContainer" . | nindent 6 }}
+ {{- end }}
+ containers:
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 8 }}
+ {{- /* Only the info producer port is active */ -}}
+ {{- include "common.tcpsocketProbes" (dict "port" ((first .Values.service.ports).internalPort_tls) "dot" .) | nindent 8 }}
+ volumeMounts:
+ - name: {{ include "common.name" . }}-dmaapmediator-data
+ mountPath: /configs/type_config.json
+ subPath: type_config.json
+ env:
+ - name: INFO_PRODUCER_HOST
+ value: "{{ default (print "https://" ( include "common.name" . )) .Values.infoProducerHost }}"
+ - name: INFO_PRODUCER_PORT
+ value: "{{ default (first .Values.service.ports).internalPort_tls .Values.infoProducerPort }}"
+ - name: INFO_COORD_ADDR
+ value: "{{ .Values.infoCoordinatorAddr }}"
+ - name: DMAAP_MR_ADDR
+ value: "{{ .Values.dmaapMrAddr }}"
+ - name: LOG_LEVEL
+ value: "{{ .Values.logLevel }}"
+ volumes:
+ - name: {{ include "common.name" . }}-dmaapmediator-data
+ configMap:
+ name: {{ include "common.name" . }}-type-configmap
+ {{- if .Values.dmaapTopicInit.enabled -}}
+ {{- include "dmaapTopic.initVolume" . | nindent 8 }}
+ {{- end }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-dmaapmediatorservice:
- imagePullPolicy: IfNotPresent
- image:
- registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
- name: "nonrtric-plt-dmaapmediatorproducer"
- tag: 1.2.0
- service:
- allowHttp: true
- httpName: http
- internalPort1: 8085
- targetPort1: 8085
- httpsName: https
- internalPort2: 8185
- targetPort2: 8185
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
+imagePullPolicy: IfNotPresent
+image:
+ registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+ name: "nonrtric-plt-dmaapmediatorproducer"
+ tag: 1.2.0
+service:
+ type: ClusterIP
+ ports:
+ - name: http
+ internalPort: 8085
+ targetPort: 8085
+ name_tls: https
+ internalPort_tls: 8185
+ targetPort_tls: 8185
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+
+logLevel: INFO
+dmaapMrAddr: http://message-router.onap:3904
+infoCoordinatorAddr: https://informationservice:9083
+
+types:
+ - id: STD_Fault_Messages
+ dmaapTopicUrl: "/events/unauthenticated.dmaapmed.json/dmaapmediatorproducer/STD_Fault_Messages?timeout=15000&limit=100"
+ - id: VES_Fault_Messages
+ dmaapTopicUrl: "/events/unauthenticated.SEC_FAULT_OUTPUT/dmaapmediatorproducer/VES_Fault_Messages?timeout=15000&limit=100"
+
+dmaapTopicInit:
+ enabled: true
+ dmaapMrAddr: http://message-router.onap:3904
+ topics:
+ - topicName: unauthenticated.dmaapmed.json
+ topicDescription: STD_Fault_Messages
+ partitionCount: 1
+ replicationCount: 1
+ - topicName: unauthenticated.SEC_FAULT_OUTPUT
+ topicDescription: VES_Fault_Messages
+ partitionCount: 1
+ replicationCount: 1
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ repository: "@local"
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.helmmanager" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.helmmanager" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- - name: {{ index .Values.helmmanager.service.httpName }}
- port: {{ .Values.helmmanager.service.internalPort1 }}
- targetPort: {{ .Values.helmmanager.service.targetPort1 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.helmmanager" . }}
- release: {{ .Release.Name }}
- type: ClusterIP
+
+{{ include "common.service" . }}
apiVersion: v1
kind: ServiceAccount
metadata:
- name: {{ include "common.namespace.nonrtric" . }}-helm-manager-sa
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.helmmanager" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
-
+ name: {{ include "common.namespace" . }}-helm-manager-sa
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
- name: {{ include "common.namespace.nonrtric" . }}-helm-manager-sa-clusterrolebinding
- namespace: {{ include "common.namespace.nonrtric" . }}
+ name: {{ include "common.namespace" . }}-helm-manager-sa-clusterrolebinding
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
subjects:
- kind: ServiceAccount
- name: {{ include "common.namespace.nonrtric" . }}-helm-manager-sa
- namespace: {{ include "common.namespace.nonrtric" . }}
+ name: {{ include "common.namespace" . }}-helm-manager-sa
+ namespace: {{ include "common.namespace" . }}
roleRef:
kind: ClusterRole
- name: {{ .Values.helmmanager.clusterRoleName }}
+ name: {{ .Values.clusterRoleName }}
apiGroup: rbac.authorization.k8s.io
kind: StatefulSet
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.helmmanager" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.helmmanager" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
-
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- serviceName: {{ include "common.name.helmmanager" . }}
+ serviceName: {{ include "common.name" . }}
replicas: 1
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.helmmanager" . }}
- release: {{ .Release.Name }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.helmmanager" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.helmmanager" . }}
+ hostname: {{ include "common.name" . }}
containers:
- - name: {{ include "common.container.helmmanager" . }}
- image: {{ .Values.helmmanager.image.registry }}/{{ .Values.helmmanager.image.name }}:{{ .Values.helmmanager.image.tag }}
- imagePullPolicy: {{ .Values.helmmanager.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.helmmanager.service.targetPort1 }}
- protocol: TCP
- readinessProbe:
- tcpSocket:
- port: {{ .Values.helmmanager.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.helmmanager.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.helmmanager.liveness.periodSeconds }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.helmmanager.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.helmmanager.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.helmmanager.liveness.periodSeconds }}
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 8 }}
+ {{- include "common.tcpsocketProbes" . | nindent 8 }}
volumeMounts:
- - name: {{ include "common.name.helmmanager" . }}-vardata
+ - name: {{ include "common.vardataMountName" . }}
mountPath: "/var/helm-manager-service"
- volumeClaimTemplates:
- - metadata:
- name: {{ include "common.name.helmmanager" . }}-vardata
- spec:
- accessModes:
- - ReadWriteOnce
- storageClassName: "{{ .Values.helmmanager.persistence.storageClassName }}"
- resources:
- requests:
- storage: "{{ .Values.helmmanager.persistence.size }}"
+ volumeClaimTemplates: {{- include "common.vardataVolumeClaimTemplate" . | nindent 4 }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-helmmanager:
- clusterRoleName: cluster-admin
- imagePullPolicy: IfNotPresent
- image:
- registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
- name: "nonrtric-plt-helmmanager"
- tag: 1.3.0
- service:
- httpName: http
- internalPort1: 8112
- targetPort1: 8083
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
- persistence:
- size: 1Gi
- storageClassName: standard
+clusterRoleName: cluster-admin
+imagePullPolicy: IfNotPresent
+image:
+ registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+ name: "nonrtric-plt-helmmanager"
+ tag: 1.3.0
+service:
+ type: ClusterIP
+ ports:
+ - name: http
+ internalPort: "8112"
+ targetPort: "8083"
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+persistence:
+ size: 1Gi
+ storageClassName: standard
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ 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.information: INFO
- file:
- name: /var/log/information-coordinator-service/application.log
-server:
- port : 8434
- http-port: 8083
- ssl:
- key-store-type: JKS
- key-store-password: policy_agent
- key-store: /opt/app/information-coordinator-service/etc/cert/keystore.jks
- key-password: policy_agent
- key-alias: policy_agent
-app:
- filepath: /opt/app/information-coordinator-service/data/application_configuration.json
- webclient:
- trust-store-used: false
- trust-store-password: policy_agent
- trust-store: /opt/app/information-coordinator-service/etc/cert/truststore.jks
- # Configuration of usage of HTTP Proxy for the southbound accesses.
- # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
- http.proxy-host:
- http.proxy-port: 0
- vardata-directory: /var/information-coordinator-service
# limitations under the License. #
################################################################################
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.name.informationservice" . }}-configmap
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.informationservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+{{ include "common.applicationConfigmap" . }}
################################################################################
*/}}
-{{- if .Values.informationservice.ingress.enabled -}}
+{{- if (include "common.ingressEnabled" .) -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
-metadata:
- name: {{ include "common.name.informationservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
-
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
ingressClassName: {{ include "common.ingressClassName" . }}
rules:
- path: "/data-producer"
backend:
service:
- name: {{ include "common.name.informationservice" . }}
+ name: {{ include "common.name" . }}
port:
- number: {{ .Values.informationservice.service.internalPort1 }}
+ number: {{ (first .Values.service.ports).internalPort }}
pathType: Prefix
- path: "/data-consumer"
backend:
service:
- name: {{ include "common.name.informationservice" . }}
+ name: {{ include "common.name" . }}
port:
- number: {{ .Values.informationservice.service.internalPort1 }}
+ number: {{ (first .Values.service.ports).internalPort }}
pathType: Prefix
{{- end -}}
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.informationservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.informationservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- {{if eq .Values.informationservice.service.allowHttp true -}}
- - name: {{ index .Values.informationservice.service.httpName }}
- port: {{ .Values.informationservice.service.internalPort1 }}
- targetPort: {{ .Values.informationservice.service.targetPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.informationservice.service.httpsName }}
- port: {{ .Values.informationservice.service.internalPort2 }}
- targetPort: {{ .Values.informationservice.service.targetPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.informationservice" . }}
- release: {{ .Release.Name }}
- type: ClusterIP
+{{ include "common.service" . }}
kind: StatefulSet
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.informationservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.informationservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- serviceName: {{ include "common.name.informationservice" . }}
+ serviceName: {{ include "common.name" . }}
replicas: 1
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.informationservice" . }}
- release: {{ .Release.Name }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.informationservice" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.informationservice" . }}
+ hostname: {{ include "common.name" . }}
+ initContainers:
+ - name: fix-permission
+ command:
+ - sh
+ - -c
+ - mkdir /var/information-coordinator-service/database;
+ chown -R 1000:1000 /var/information-coordinator-service;
+ image: busybox:1.28
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ volumeMounts:
+ - name: {{ include "common.vardataMountName" . }}
+ mountPath: /var/information-coordinator-service
containers:
- - name: {{ include "common.container.informationservice" . }}
- image: {{ .Values.informationservice.image.registry }}/{{ .Values.informationservice.image.name }}:{{ .Values.informationservice.image.tag }}
- imagePullPolicy: {{ .Values.informationservice.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.informationservice.service.targetPort1 }}
- protocol: TCP
- - containerPort: {{ .Values.informationservice.service.targetPort2 }}
- protocol: TCP
- readinessProbe:
- tcpSocket:
- port: {{ .Values.informationservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.informationservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.informationservice.liveness.periodSeconds }}
- livenessProbe:
- httpGet:
- path: /status
- port: {{ .Values.informationservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.informationservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.informationservice.liveness.periodSeconds }}
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 8 }}
+ {{- include "common.tcpsocketReadinessProbe" . | nindent 8 }}
+ {{- include "common.httpLiveProbe" . | nindent 8 }}
volumeMounts:
- - name: {{ include "common.name.informationservice" . }}-information-config
+ - name: {{ include "common.applicationConfigMountName" . }}
mountPath: /opt/app/information-coordinator-service/config
- - name: {{ include "common.name.informationservice" . }}-vardata
+ - name: {{ include "common.vardataMountName" . }}
mountPath: /var/information-coordinator-service
- volumes:
- - name: {{ include "common.name.informationservice" . }}-information-config
- configMap:
- name: {{ include "common.name.informationservice" . }}-configmap
+ volumes: {{- include "common.applicationConfigVolume" . | nindent 8 }}
- volumeClaimTemplates:
- - metadata:
- name: {{ include "common.name.informationservice" . }}-vardata
- spec:
- accessModes: [ ReadWriteOnce ]
- storageClassName: "{{ .Values.informationservice.persistence.storageClassName }}"
- resources:
- requests:
- storage: "{{ .Values.informationservice.persistence.size }}"
+ volumeClaimTemplates: {{- include "common.vardataVolumeClaimTemplate" . | nindent 4 }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-informationservice:
- imagePullPolicy: IfNotPresent
- image:
- registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
- name: "nonrtric-plt-informationcoordinatorservice"
- tag: 1.6.0
- service:
- allowHttp: true
- httpName: http
- internalPort1: 9082
- targetPort1: 8083
- httpsName: https
- internalPort2: 9083
- targetPort2: 8434
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
- persistence:
- size: 2Gi
- storageClassName: standard
- ingress:
- enabled: false
+imagePullPolicy: IfNotPresent
+image:
+ registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+ name: "nonrtric-plt-informationcoordinatorservice"
+ tag: 1.6.0
+service:
+ type: ClusterIP
+ ports:
+ - name: http
+ internalPort: "9082"
+ targetPort: "8083"
+ name_tls: https
+ internalPort_tls: "9083"
+ targetPort_tls: "8434"
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+persistence:
+ size: 2Gi
+ storageClassName: standard
+ingress:
+ enabled: false
+
+application:
+ 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.information: INFO
+ file:
+ name: /var/log/information-coordinator-service/application.log
+ server:
+ port : 8434
+ http-port: 8083
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: /opt/app/information-coordinator-service/etc/cert/keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+ app:
+ filepath: /opt/app/information-coordinator-service/data/application_configuration.json
+ webclient:
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: /opt/app/information-coordinator-service/etc/cert/truststore.jks
+ # Configuration of usage of HTTP Proxy for the southbound accesses.
+ # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
+ http.proxy-host:
+ http.proxy-port: 0
+ vardata-directory: /var/information-coordinator-service
apiVersion: v2
description: NONRTRIC Common templates for inclusion in other charts
name: nonrtric-common
-version: 2.0.0
\ No newline at end of file
+version: 2.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. #
-################################################################################
-
-{{- define "common.name.a1controller" -}}
- {{- printf "a1controller" -}}
-{{- end -}}
-
-{{- define "common.containername.a1controller" -}}
- {{- $name := ( include "common.name.a1controller" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
\ No newline at end of file
+{{/*
################################################################################
-# Copyright (c) 2020 Nordix Foundation. #
+# Copyright (c) 2024 NYCU WINLab. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
+*/}}
-{{- define "common.namespace.nonrtric" -}}
- {{- default .Release.Namespace .Values.nsPrefix -}}
-{{- end -}}
+{{- define "common.applicationConfigmap" -}}
+{{- $dot := default . .dot -}}
+apiVersion: v1
+kind: ConfigMap
+metadata:
+ name: {{ include "common.name" $dot }}-application-configmap
+ namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
+data:
+ application.yml: |
+ {{- toYaml .Values.application | nindent 4 }}
+{{ end -}}
+++ /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.controlpanel" -}}
- {{- printf "controlpanel" -}}
-{{- end -}}
-
-{{- define "common.containername.controlpanel" -}}
- {{- $name := ( include "common.name.controlpanel" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
\ No newline at end of file
+++ /dev/null
-################################################################################
-# Copyright (c) 2021 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.dmaapadapterservice" -}}
- {{- printf "dmaapadapterservice" -}}
-{{- end -}}
-
-{{- define "common.container.dmaapadapterservice" -}}
- {{- $name := ( include "common.name.dmaapadapterservice" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+++ /dev/null
-################################################################################
-# Copyright (c) 2021 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.dmaapmediatorservice" -}}
- {{- printf "dmaapmediatorservice" -}}
-{{- end -}}
-{{- define "common.container.dmaapmediatorservice" -}}
- {{- $name := ( include "common.name.dmaapmediatorservice" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
-
+++ /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.informationservice" -}}
- {{- printf "informationservice" -}}
-{{- end -}}
-{{- define "common.container.informationservice" -}}
- {{- $name := ( include "common.name.informationservice" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
+{{/*
################################################################################
-# Copyright (c) 2021 Nordix Foundation. #
+# Copyright (c) 2024 NYCU WINLab. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
-
-{{- define "common.name.nonrtricgateway" -}}
- {{- printf "nonrtricgateway" -}}
-{{- end -}}
-
-{{- define "common.container.nonrtricgateway" -}}
- {{- $name := ( include "common.name.nonrtricgateway" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+*/}}
+{{- define "common.ingressClassName" -}}
+ {{- if and .Values.global .Values.global.ingress -}}
+ {{- default "kong" .Values.global.ingress.ingressClass -}}
+ {{- else -}}
+ {{- print "kong" -}}
+ {{- end -}}
{{- end -}}
-{{- define "common.ingressClassName" -}}
- {{- printf "kong" -}}
+{{- define "common.ingressEnabled" -}}
+ {{- if and .Values.global .Values.global.ingress -}}
+ {{- if .Values.global.ingress.enabled -}}
+ {{- if or .Values.global.ingress.enabled_all .Values.ingress.enabled -}}
+ true
+ {{- end -}}
+ {{- end -}}
+ {{- else -}}
+ {{- .Values.ingress.enabled -}}
+ {{- end -}}
{{- end -}}
--- /dev/null
+{{/*
+# Copyright © 2019 Orange
+# Modifications Copyright (C) 2022 Bell Canada
+# Modifications Copyright (c) 2024 NYCU WINLab
+#
+# 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.
+*/}}
+
+{{/*
+Common labels
+The function takes several arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .labels : labels to add (dict)
+*/}}
+{{- define "common.labels" -}}
+{{- $dot := default . .dot -}}
+app.kubernetes.io/name: {{ include "common.name" $dot }}
+app.kubernetes.io/version: "{{ (default $dot.Chart.Version $dot.Chart.AppVersion) | replace "+" "_" }}"
+{{- if not .ignoreHelmChart }}
+helm.sh/chart: {{ $dot.Chart.Name }}-{{ $dot.Chart.Version | replace "+" "_" }}
+{{- end }}
+app.kubernetes.io/instance: {{ $dot.Release.Name }}
+app.kubernetes.io/managed-by: {{ $dot.Release.Service }}
+{{- if .labels }}
+{{ include "common.tplValue" (dict "value" .labels "context" $dot) }}
+{{- end }}
+{{- end -}}
+
+{{/*
+Labels to use on deploy.spec.selector.matchLabels and svc.spec.selector
+The function takes several arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .matchLabels: selectors/matchlLabels to add (dict)
+*/}}
+{{- define "common.matchLabels" -}}
+{{- $dot := default . .dot -}}
+{{- $matchLabels := default (dict) .matchLabels -}}
+{{- if not $matchLabels.nameNoMatch -}}
+app.kubernetes.io/name: {{ include "common.name" $dot }}
+{{- end }}
+app.kubernetes.io/instance: {{ include "common.release" $dot }}
+{{- if $matchLabels }}
+{{$_ := unset $matchLabels "nameNoMatch"}}
+{{- include "common.tplValue" (dict "value" $matchLabels "context" $dot) }}
+{{- end }}
+{{- end -}}
+
+{{/*
+ Generate "top" metadata for Deployment / StatefulSet / ...
+ The function takes several arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .labels: labels to add (dict)
+ - .suffix: suffix to name
+
+*/}}
+{{- define "common.resourceMetadata" -}}
+{{- $dot := default . .dot -}}
+{{- $suffix := default "" .suffix -}}
+{{- $labels := default (dict) .labels -}}
+{{- $annotations := default (dict) .annotations -}}
+name: {{ include "common.name" (dict "suffix" $suffix "dot" $dot )}}
+namespace: {{ include "common.namespace" $dot }}
+labels: {{- include "common.labels" (dict "labels" $labels "ignoreHelmChart" .ignoreHelmChart "dot" $dot ) | nindent 2 }}
+{{- if $annotations }}
+annotations: {{- include "common.tplValue" (dict "value" $annotations "context" $dot) | nindent 2}}
+{{- end }}
+{{- end -}}
+
+{{/*
+ Generate selectors for Deployment / StatefulSet / ...
+ The function takes several arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .matchLabels: labels to add (dict)
+*/}}
+{{- define "common.selectors" -}}
+{{- $dot := default . .dot -}}
+{{- $matchLabels := default (dict) .matchLabels -}}
+matchLabels: {{- include "common.matchLabels" (dict "matchLabels" $matchLabels "dot" $dot) | nindent 2 }}
+{{- end -}}
+
+{{/*
+ Generate "template" metadata for Deployment / StatefulSet / ...
+ The function takes several arguments (inside a dictionary)
+ - .dot : environment (.)
+ - .labels: labels to add (dict)
+*/}}
+{{- define "common.templateMetadata" -}}
+{{- $dot := default . .dot -}}
+{{- $labels := default (dict) .labels -}}
+{{- if $dot.Values.podAnnotations -}}
+annotations: {{- include "common.tplValue" (dict "value" $dot.Values.podAnnotations "context" $dot) | nindent 2 }}
+{{ end -}}
+labels: {{- include "common.labels" (dict "labels" $labels "ignoreHelmChart" .ignoreHelmChart "dot" $dot) | nindent 2 }}
+name: {{ include "common.name" $dot }}
+{{- end -}}
--- /dev/null
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright (c) 2024 NYCU WINLab.
+#
+# 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.
+*/}}
+
+{{/*
+ Expand the name of a chart.
+ The function takes from one to two arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .suffix : add a suffix to the name
+*/}}
+{{- define "common.name" -}}
+ {{- $dot := default . .dot -}}
+ {{- $suffix := .suffix -}}
+ {{- default (default $dot.Chart.Name $dot.Values.nameOverride) .nameOverride | trunc 63 | trimSuffix "-" -}}{{ if $suffix }}{{ print "-" $suffix }}{{ end }}
+{{- end -}}
+
+{{- define "common.containername" -}}
+ {{- $name := ( include "common.name" . ) -}}
+ {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.release" -}}
+{{ .Release.Name }}
+{{- end -}}
--- /dev/null
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+#
+# 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.
+*/}}
+
+{{/*
+ Resolve the namespace to apply to a chart. The default namespace suffix
+ is the name of the chart. This can be overridden if necessary (eg. for subcharts)
+ using the following value:
+
+ - .Values.nsPrefix : override namespace prefix
+*/}}
+{{- define "common.namespace" -}}
+ {{- default .Release.Namespace .Values.nsPrefix -}}
+{{- end -}}
--- /dev/null
+{{/*
+################################################################################
+# Copyright (c) 2024 NYCU WINLab. #
+# #
+# 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.containerPorts" -}}
+{{- $ports := default (list) .Values.service.ports }}
+{{- range $index, $port := $ports }}
+{{- if $port.targetPort -}}
+- containerPort: {{ $port.targetPort }}
+ name: {{ $port.name }}
+{{- if $port.l4_protocol }}
+ protocol: {{ $port.l4_protocol }}
+{{- else }}
+ protocol: TCP
+{{- end }}
+{{- end }}
+{{- if $port.targetPort_tls }}
+- containerPort: {{ $port.targetPort_tls }}
+ name: {{ $port.name_tls }}
+{{- if $port.l4_protocol }}
+ protocol: {{ $port.l4_protocol }}
+{{- else }}
+ protocol: TCP
+{{- end }}
+{{- end }}
+{{- end }}
+{{- end -}}
+
+{{- define "common.probePort" -}}
+{{ default (first .Values.service.ports).targetPort .Values.service.probePort }}
+{{- end -}}
+
+{{- define "common.tcpsocketReadinessProbe" -}}
+{{- $dot := default . .dot -}}
+{{- $port := default (include "common.probePort" $dot) .port -}}
+readinessProbe:
+ tcpSocket:
+ port: {{ $port }}
+ initialDelaySeconds: {{ $dot.Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ $dot.Values.readiness.periodSeconds }}
+{{- end -}}
+
+{{- define "common.tcpsocketLivenessProbe" -}}
+{{- $dot := default . .dot -}}
+{{- $port := default (include "common.probePort" $dot) .port -}}
+livenessProbe:
+ tcpSocket:
+ port: {{ $port }}
+ initialDelaySeconds: {{ $dot.Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ $dot.Values.liveness.periodSeconds }}
+{{- end -}}
+
+{{- define "common.tcpsocketProbes" -}}
+{{- include "common.tcpsocketReadinessProbe" . }}
+{{ include "common.tcpsocketLivenessProbe" . }}
+{{- end -}}
+
+{{- define "common.httpLiveProbe" -}}
+{{- $dot := default . .dot }}
+{{- $path := default "/status" .path -}}
+livenessProbe:
+ httpGet:
+ path: {{ $path }}
+ port: {{ include "common.probePort" . }}
+ initialDelaySeconds: {{ $dot.Values.liveness.initialDelaySeconds }}
+ periodSeconds: {{ $dot.Values.liveness.periodSeconds }}
+{{- end -}}
+
+{{- define "common.applicationConfigMountName" -}}
+{{ include "common.name" . }}-application-config
+{{- end -}}
+
+{{- define "common.applicationConfigVolume" -}}
+- name: {{ include "common.name" . }}-application-config
+ configMap:
+ name: {{ include "common.name" . }}-application-configmap
+{{- end -}}
+
+++ /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.rappcatalogueservice" -}}
- {{- printf "rappcatalogueservice" -}}
-{{- end -}}
-
-{{- define "common.container.rappcatalogueservice" -}}
- {{- $name := ( include "common.name.rappcatalogueservice" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
-{{- end -}}
--- /dev/null
+{{/*
+# Copyright © 2017 Amdocs, Bell Canada
+# Modifications Copyright (c) 2024 NYCU WINLab.
+#
+# 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.
+*/}}
+{{/*
+ Resolve the name of a chart's service.
+
+ The default will be the chart name (or .Values.nameOverride if set).
+ And the use of .Values.service.name overrides all.
+
+ - .Values.service.name: override default service (ie. chart) name
+*/}}
+{{/*
+ Expand the service name for a chart.
+*/}}
+{{- define "common.servicename" -}}
+ {{- $name := default .Chart.Name .Values.nameOverride -}}
+ {{- default $name .Values.service.name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{/* Define the metadata of Service
+ The function takes from one to four arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .suffix : a string which will be added at the end of the name (with a '-').
+ - .annotations: the annotations to add
+ - .labels : labels to add
+ Usage example:
+ {{ include "common.serviceMetadata" ( dict "suffix" "myService" "dot" .) }}
+ {{ include "common.serviceMetadata" ( dict "annotations" .Values.service.annotation "dot" .) }}
+*/}}
+
+{{- define "common.serviceMetadata" -}}
+ {{- $dot := default . .dot -}}
+ {{- $suffix := default "" .suffix -}}
+ {{- $annotations := default "" .annotations -}}
+ {{- $labels := default (dict) .labels -}}
+{{- if $annotations -}}
+annotations:
+{{ include "common.tplValue" (dict "value" $annotations "context" $dot) | indent 2 }}
+{{- end -}}
+name: {{ include "common.servicename" $dot }}{{ if $suffix }}{{ print "-" $suffix }}{{ end }}
+namespace: {{ include "common.namespace" $dot }}
+labels: {{- include "common.labels" (dict "labels" $labels "dot" $dot) | nindent 2 -}}
+{{- end -}}
+
+{{/* Define the ports of Service
+ The function takes three arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .ports : an array of ports
+ - .serviceType: the type of the service
+*/}}
+{{- define "common.servicePorts" -}}
+{{- $serviceType := .serviceType -}}
+{{- $dot := .dot -}}
+{{- range $index, $port := .ports -}}
+{{- if $port.targetPort -}}
+- name: {{ $port.name }}
+ port: {{ default $port.targetPort $port.internalPort }}
+ targetPort: {{ $port.targetPort }}
+{{- if (and (eq $serviceType "NodePort") $port.nodePort) }}
+ nodePort: {{ $port.nodePort }}
+{{- end }}
+{{- if $port.l4_protocol }}
+ protocol: {{ $port.l4_protocol }}
+{{- else }}
+ protocol: TCP
+{{- end }}
+{{- if $port.app_protocol }}
+ appProtocol: {{ $port.app_protocol }}
+{{- end }}
+{{- end }}
+{{- if $port.internalPort_tls }}
+- name: {{ $port.name_tls }}
+ port: {{ default $port.targetPort_tls $port.internalPort_tls }}
+ targetPort: {{ $port.targetPort_tls }}
+{{- if (and (eq $serviceType "NodePort") $port.nodePort_tls) }}
+ nodePort: {{ $port.nodePort_tls }}
+{{- end }}
+{{- if $port.l4_protocol }}
+ protocol: {{ $port.l4_protocol }}
+{{- else }}
+ protocol: TCP
+{{- end }}
+{{- if $port.app_protocol }}
+ appProtocol: {{ $port.app_protocol }}
+{{- end }}
+{{- end }}
+{{ end }}
+{{- end -}}
+
+{{/* Create generic service template
+ The function takes several arguments (inside a dictionary):
+ - .dot : environment (.)
+ - .ports : an array of ports
+ - .serviceType: the type of the service
+ - .suffix : a string which will be added at the end of the name (with a '-')
+ - .annotations: the annotations to add
+ - .publishNotReadyAddresses: if we publish not ready address
+ - .headless: if the service is headless
+ - .add_plain_port: add tls port AND plain port
+ - .labels : labels to add (dict)
+ - .matchLabels: selectors/machLabels to add (dict)
+*/}}
+{{- define "common.service" -}}
+{{- $dot := default . .dot -}}
+{{- $suffix := default "" $dot.Values.service.suffix -}}
+{{- $annotations := default "" $dot.Values.service.annotations -}}
+{{- $publishNotReadyAddresses := default false $dot.Values.service.publishNotReadyAddresses -}}
+{{- $serviceType := $dot.Values.service.type -}}
+{{- $ports := $dot.Values.service.ports -}}
+{{- $labels := default (dict) .labels -}}
+{{- $matchLabels := default (dict) .matchLabels -}}
+{{- $ipFamilyPolicy := default "PreferDualStack" $dot.Values.service.ipFamilyPolicy -}}
+apiVersion: v1
+kind: Service
+metadata: {{- include "common.serviceMetadata" (dict "suffix" $suffix "annotations" $annotations "labels" $labels "dot" $dot) | nindent 2 }}
+spec:
+ ports: {{- include "common.servicePorts" (dict "serviceType" $serviceType "ports" $ports "dot" $dot) | nindent 4 }}
+ ipFamilyPolicy: {{ $ipFamilyPolicy }}
+ {{- if $publishNotReadyAddresses }}
+ publishNotReadyAddresses: true
+ {{- end }}
+ type: {{ $serviceType }}
+ selector: {{- include "common.matchLabels" (dict "matchLabels" $matchLabels "dot" $dot) | nindent 4 }}
+{{- end -}}
+{{/*
################################################################################
-# Copyright (c) 2020 Nordix Foundation. #
+# Copyright (c) 2024 NYCU WINLab. #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
################################################################################
+*/}}
-{{- define "common.name.policymanagementservice" -}}
- {{- printf "policymanagementservice" -}}
+{{- define "common.vardataVolumeClaimTemplate" -}}
+- metadata:
+ name: {{ include "common.name" . }}-vardata
+ spec:
+ accessModes: [ ReadWriteOnce ]
+ storageClassName: "{{ .Values.persistence.storageClassName }}"
+ resources:
+ requests:
+ storage: "{{ .Values.persistence.size }}"
{{- end -}}
-{{- define "common.container.policymanagementservice" -}}
- {{- $name := ( include "common.name.policymanagementservice" . ) -}}
- {{- printf "container-%s" $name | trunc 63 | trimSuffix "-" -}}
+{{- define "common.vardataMountName" -}}
+{{ include "common.name" . }}-vardata
{{- end -}}
--- /dev/null
+{{/*
+# Copyright © 2019 Orange
+#
+# 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.
+*/}}
+
+{{/*
+Renders a value that contains template.
+Usage:
+{{ include "common.tplValue" ( dict "value" .Values.path.to.the.Value "context" $) }}
+*/}}
+{{- define "common.tplValue" -}}
+ {{- if typeIs "string" .value }}
+ {{- tpl .value .context }}
+ {{- else }}
+ {{- tpl (.value | toYaml) .context }}
+ {{- end }}
+{{- end -}}
# 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. #
-################################################################################
\ No newline at end of file
+################################################################################
apiVersion: v1
metadata:
name: nonrtric-pv1
- namespace: {{ include "common.namespace.nonrtric" . }}
+ namespace: {{ include "common.namespace" . }}
spec:
capacity:
storage: {{ .Values.nonrtric.volume1.size}}
apiVersion: v1
metadata:
name: nonrtric-pv2
- namespace: {{ include "common.namespace.nonrtric" . }}
+ namespace: {{ include "common.namespace" . }}
spec:
capacity:
storage: {{ .Values.nonrtric.volume2.size }}
apiVersion: v1
metadata:
name: nonrtric-pv3
- namespace: {{ include "common.namespace.nonrtric" . }}
+ namespace: {{ include "common.namespace" . }}
spec:
capacity:
storage: {{ .Values.nonrtric.volume3.size }}
# limitations under the License.
# ============LICENSE_END=================================================
+global:
+ ingress:
+ # generally enable ingress for components
+ enabled: true
+ # enable all component's Ingress interfaces
+ enable_all: false
+ # Ingress class (only for provider "ingress"): e.g. kong, nginx, traefik
+ ingressClass:
+
nonrtric:
persistence:
mountPath: /dockerdata-nfs
installCRDs: false
admin:
enabled: true
-cert-wrapper:
- enabled: true
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ repository: "@local"
+++ /dev/null
-################################################################################
-# Copyright (c) 2021 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. #
-################################################################################
-
-server:
- port: 9090
-spring:
- cloud:
- gateway:
- httpclient:
- ssl:
- useInsecureTrustManager: true
- wiretap: true
- httpserver:
- wiretap: true
- routes:
- - id: A1-Policy
- uri: {{ .Values.a1PolicyLink }}
- predicates:
- - Path=/a1-policy/**
- - id: A1-EI
- uri: https://informationservice:9083
- predicates:
- - Path=/data-producer/**,/data-consumer/**
-management:
- endpoint:
- gateway:
- enabled: true
- endpoints:
- web:
- exposure:
- include: "gateway,loggers,logfile,health,info,metrics,threaddump,heapdump"
-logging:
- level:
- ROOT: ERROR
- org.springframework: ERROR
- org.springframework.cloud.gateway: INFO
- reactor.netty: INFO
- file:
- name: /var/log/nonrtric-gateway/application.log
# limitations under the License. #
################################################################################
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.name.nonrtricgateway" . }}-configmap
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
- 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
+{{ include "common.applicationConfigmap" . }}
kind: Deployment
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.nonrtricgateway" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
replicas: 1
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
- release: {{ .Release.Name }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.nonrtricgateway" . }}
+ hostname: {{ include "common.name" . }}
containers:
- - name: {{ include "common.container.nonrtricgateway" . }}
- image: {{ .Values.nonrtricgateway.image.registry }}/{{ .Values.nonrtricgateway.image.name }}:{{ .Values.nonrtricgateway.image.tag }}
- imagePullPolicy: {{ .Values.nonrtricgateway.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.nonrtricgateway.service.targetPort1 }}
- protocol: TCP
- readinessProbe:
- tcpSocket:
- port: {{ .Values.nonrtricgateway.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.nonrtricgateway.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.nonrtricgateway.liveness.periodSeconds }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.nonrtricgateway.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.nonrtricgateway.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.nonrtricgateway.liveness.periodSeconds }}
- volumeMounts:
- - name: {{ include "common.name.nonrtricgateway" . }}-config
- mountPath: /opt/app/nonrtric-gateway/config
- volumes:
- - name: {{ include "common.name.nonrtricgateway" . }}-config
- configMap:
- name: {{ include "common.name.nonrtricgateway" . }}-configmap
\ No newline at end of file
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 10 }}
+ {{- include "common.tcpsocketProbes" . | nindent 10 }}
+ volumeMounts:
+ - name: {{ include "common.applicationConfigMountName" . }}
+ mountPath: /opt/app/nonrtric-gateway/config
+ volumes: {{- include "common.applicationConfigVolume" . | nindent 8 }}
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.nonrtricgateway" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- - name: {{ index .Values.nonrtricgateway.service.httpName }}
- port: {{ .Values.nonrtricgateway.service.internalPort1 }}
- targetPort: {{ .Values.nonrtricgateway.service.targetPort1 }}
- nodePort: {{ .Values.nonrtricgateway.service.externalPort1 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.nonrtricgateway" . }}
- release: {{ .Release.Name }}
- type: NodePort
+{{ include "common.service" . }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-nonrtricgateway:
- imagePullPolicy: IfNotPresent
- image:
- registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
- name: nonrtric-gateway
- tag: 1.2.0
- service:
- httpName: http
- internalPort1: 9090
- targetPort1: 9090
- externalPort1: 30093
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
-a1PolicyLink: http://a1policymanagement.onap:8081
+imagePullPolicy: IfNotPresent
+image:
+ registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+ name: nonrtric-gateway
+ tag: 1.2.0
+service:
+ type: NodePort
+ ports:
+ - name: http
+ internalPort: "9090"
+ targetPort: "9090"
+ nodePort: "30093"
+
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+
+a1PolicyLink: &a1PolicyLink http://a1policymanagement.onap:8081
+
+application:
+ server:
+ port: 9090
+ spring:
+ cloud:
+ gateway:
+ httpclient:
+ ssl:
+ useInsecureTrustManager: true
+ wiretap: true
+ httpserver:
+ wiretap: true
+ routes:
+ - id: A1-Policy
+ uri: *a1PolicyLink
+ predicates:
+ - Path=/a1-policy/**
+ - id: A1-EI
+ uri: https://informationservice:9083
+ predicates:
+ - Path=/data-producer/**,/data-consumer/**
+ management:
+ endpoint:
+ gateway:
+ enabled: true
+ endpoints:
+ web:
+ exposure:
+ include: "gateway,loggers,logfile,health,info,metrics,threaddump,heapdump"
+ logging:
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.cloud.gateway: INFO
+ reactor.netty: INFO
+ file:
+ name: /var/log/nonrtric-gateway/application.log
description: A Helm chart to deploy odu-app-ics-version version
name: odu-app-ics-version
version: 1.0.0
+
+dependencies:
+ - name: nonrtric-common
+ version: ^2.0.0
+ repository: "@local"
+++ /dev/null
-{{/*
-# Copyright (C) 2021 Nordix Foundation. All rights reserved.
-# ========================================================================
-# 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.
-# ============LICENSE_END=================================================
-*/}}
-
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "odu-app-ics-version.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 "odu-app-ics-version.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 "odu-app-ics-version.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Common labels
-*/}}
-{{- define "odu-app-ics-version.labels" -}}
-helm.sh/chart: {{ include "odu-app-ics-version.chart" . }}
-{{ include "odu-app-ics-version.selectorLabels" . }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end }}
-
-{{/*
-Selector labels
-*/}}
-{{- define "odu-app-ics-version.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "odu-app-ics-version.name" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- end }}
-
-{{/*
-Create the name of the service account to use
-*/}}
-{{- define "odu-app-ics-version.serviceAccountName" -}}
-{{- if .Values.serviceAccount.create }}
-{{- default (include "odu-app-ics-version.fullname" .) .Values.serviceAccount.name }}
-{{- else }}
-{{- default "default" .Values.serviceAccount.name }}
-{{- end }}
-{{- end }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "odu-app-ics-version.fullname" . }}
- labels:
- {{- include "odu-app-ics-version.labels" . | nindent 4 }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
replicas: {{ .Values.replicaCount }}
- selector:
- matchLabels:
- {{- include "odu-app-ics-version.selectorLabels" . | nindent 6 }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- {{- with .Values.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- labels:
- {{- include "odu-app-ics-version.selectorLabels" . | nindent 8 }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- - name: {{ .Chart.Name }}
+ - name: {{ include "common.containername" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
# limitations under the License.
# ============LICENSE_END=================================================
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "odu-app-ics-version.fullname" . }}
- labels:
- {{- include "odu-app-ics-version.labels" . | nindent 4 }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- - port: {{ .Values.service.port }}
- targetPort: http
- protocol: TCP
- name: http
- selector:
- {{- include "odu-app-ics-version.selectorLabels" . | nindent 4 }}
+{{ include "common.service" . }}
service:
type: ClusterIP
- port: 8095
+ ports:
+ - name: http
+ targetPort: 8095
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
description: A Helm chart to deploy odu-app smo version
name: odu-app
version: 1.0.0
+
+dependencies:
+ - name: nonrtric-common
+ version: ^2.0.0
+ repository: "@local"
+++ /dev/null
-{{/*
-# Copyright (C) 2021 Nordix Foundation. All rights reserved.
-# ========================================================================
-# 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.
-# ============LICENSE_END=================================================
-*/}}
-
-{{/*
-Expand the name of the chart.
-*/}}
-{{- define "odu-app.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 "odu-app.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 "odu-app.chart" -}}
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
-{{- end }}
-
-{{/*
-Common labels
-*/}}
-{{- define "odu-app.labels" -}}
-helm.sh/chart: {{ include "odu-app.chart" . }}
-{{ include "odu-app.selectorLabels" . }}
-{{- if .Chart.AppVersion }}
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
-{{- end }}
-app.kubernetes.io/managed-by: {{ .Release.Service }}
-{{- end }}
-
-{{/*
-Selector labels
-*/}}
-{{- define "odu-app.selectorLabels" -}}
-app.kubernetes.io/name: {{ include "odu-app.name" . }}
-app.kubernetes.io/instance: {{ .Release.Name }}
-{{- end }}
-
-{{/*
-Create the name of the service account to use
-*/}}
-{{- define "odu-app.serviceAccountName" -}}
-{{- if .Values.serviceAccount.create }}
-{{- default (include "odu-app.fullname" .) .Values.serviceAccount.name }}
-{{- else }}
-{{- default "default" .Values.serviceAccount.name }}
-{{- end }}
-{{- end }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "odu-app.fullname" . }}
- labels:
- {{- include "odu-app.labels" . | nindent 4 }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
replicas: {{ .Values.replicaCount }}
- selector:
- matchLabels:
- {{- include "odu-app.selectorLabels" . | nindent 6 }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- {{- with .Values.podAnnotations }}
- annotations:
- {{- toYaml . | nindent 8 }}
- {{- end }}
- labels:
- {{- include "odu-app.selectorLabels" . | nindent 8 }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- - name: {{ .Chart.Name }}
+ - name: {{ include "common.containername" . }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
value: "{{ .Values.sdnr.password }}"
- name: NODE_ID
value: "{{ .Values.simulator.node }}"
- ports:
- - name: http
- containerPort: 80
- protocol: TCP
+ ports: {{- include "common.containerPorts" . | nindent 10 }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
# limitations under the License.
# ============LICENSE_END=================================================
-apiVersion: v1
-kind: Service
-metadata:
- name: {{ include "odu-app.fullname" . }}
- labels:
- {{- include "odu-app.labels" . | nindent 4 }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- - port: {{ .Values.service.port }}
- targetPort: http
- protocol: TCP
- name: http
- selector:
- {{- include "odu-app.selectorLabels" . | nindent 4 }}
+{{ include "common.service" . }}
service:
type: ClusterIP
- port: 80
+ ports:
+ - name: http
+ targetPort: 80
resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
description: A Helm chart to deploy oru-app
name: oru-app
version: 1.0.0
+
+dependencies:
+ - name: nonrtric-common
+ version: ^2.0.0
+ repository: "@local"
apiVersion: v1
kind: ConfigMap
-metadata:
- name: oru-app-configmap
- labels:
- name: oru-app
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+metadata: {{ include "common.resourceMetadata" . | nindent 2 }}
data:
{{ tpl (.Files.Glob "resources/config/*.{json,xml,txt}").AsConfig . | indent 2 }}
apiVersion: v1
kind: ConfigMap
-metadata:
- name: oru-app-configmapenv
- labels:
- name: oru-app-env
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+metadata: {{ include "common.resourceMetadata" (dict "suffix" "configmapenv" "dot" . ) | nindent 2 }}
data:
MR-HOST: {{ .Values.conf.mrHost | quote }}
- MR-PORT: {{ .Values.conf.mrPort | quote }}
+ MR-PORT: {{ .Values.conf.mrPort | quote }}
SDNR-HOST: {{ .Values.conf.sdnrHost | quote }}
SDNR-PORT: {{ .Values.conf.sdnrPort | quote }}
VERBOSE: {{ .Values.conf.verbose | quote }}
-
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: oru-app
- labels:
- name: oru-app
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
replicas: {{ .Values.replicaCount }}
- selector:
- matchLabels:
- name: oru-app
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- name: oru-app
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
containers:
- - name: {{ .Chart.Name }}
+ - name: {{ include "common.containername" . }}
image: "{{ .Values.image.repository }}/{{ .Values.image.name}}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
tty: true
stdin: true
envFrom:
- configMapRef:
- name: oru-app-configmapenv
+ name: {{ include "common.name" . }}-configmapenv
volumeMounts:
- name: oru-app-config-volume
subPath: o-ru-to-o-du-map.txt
volumes:
- name: oru-app-config-volume
configMap:
- name: oru-app-configmap
+ name: {{ include "common.name" . }}
items:
- key: o-ru-to-o-du-map.txt
path: o-ru-to-o-du-map.txt
-apiVersion: v1
-kind: Service
-metadata:
- name: "oru-app"
- labels:
- name: oru-app
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- - port: {{ .Values.service.ports.port }}
- nodePort: {{ .Values.service.ports.nodePort }}
- selector:
- name: oru-app
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+{{ include "common.service" . }}
service:
type: NodePort
ports:
- port: 830
+ - name: http
+ targetPort: 830
nodePort: 30835
simulators:
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ 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:
- # Enabling of springboot actuator features. See springboot documentation.
- include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
-
-logging:
- # Configuration of logging
- level:
- ROOT: ERROR
- org.springframework: ERROR
- org.springframework.data: ERROR
- org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
- org.onap.ccsdk.oran.a1policymanagementservice: INFO
- file:
- name: /var/log/policy-agent/application.log
-
-server:
- # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
- # See springboot documentation.
- port : 8433
- http-port: 8081
- ssl:
- key-store-type: JKS
- key-store-password: policy_agent
- key-store: /opt/app/policy-agent/etc/cert/keystore.jks
- key-password: policy_agent
- key-alias: policy_agent
-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: /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
- # Note that the same keystore as for the server is used.
- trust-store-used: false
- trust-store-password: policy_agent
- trust-store: /opt/app/policy-agent/etc/cert/truststore.jks
- # Configuration of usage of HTTP Proxy for the southbound accesses.
- # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
- http.proxy-host:
- http.proxy-port: 0
- http.proxy-type: HTTP
- # 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
- # A file containing an authorization token, which shall be inserted in each HTTP header (authorization).
- # If the file name is empty, no authorization token is sent.
- auth-token-file:
+++ /dev/null
-{
- "config":{
- "controller": [
- {
- "name": "controller1",
- "baseUrl": "https://a1controller:8383",
- "userName": "admin",
- "password": "Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U"
- }
- ],
- "ric": [
- {
- "name":"ric1",
- "baseUrl":"https://a1-sim-osc-0:8185",
- "controller": "controller1",
- "managedElementIds":[
- "kista_1",
- "kista_2"
- ]
- },
- {
- "name":"ric2",
- "baseUrl":"https://a1-sim-osc-1:8185",
- "controller": "controller1",
- "managedElementIds":[
- "kista_1",
- "kista_2"
- ]
- },
- {
- "name":"ric3",
- "baseUrl":"https://a1-sim-std-0:8185",
- "controller": "controller1",
- "managedElementIds":[
- "kista_1",
- "kista_2"
- ]
- },
- {
- "name":"ric4",
- "baseUrl":"https://a1-sim-std-1:8185",
- "controller": "controller1",
- "managedElementIds":[
- "kista_1",
- "kista_2"
- ]
- },
- {
- "name":"ric5",
- "baseUrl":"https://a1-sim-std2-0:8185",
- "controller": "controller1",
- "managedElementIds":[
- "kista_1",
- "kista_2"
- ]
- },
- {
- "name":"ric6",
- "baseUrl":"https://a1-sim-std2-1:8185",
- "controller": "controller1",
- "managedElementIds":[
- "kista_1",
- "kista_2"
- ]
- }
- ],
- "streams_publishes": {
- "dmaap_publisher": {
- "type":"message_router",
- "dmaap_info":{
- "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-WRITE"
- }
- }
- },
- "streams_subscribes": {
- "dmaap_subscriber":{
- "type":"message_router",
- "dmaap_info":{
- "topic_url":"http://message-router.onap:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100"
- }
- }
- }
- }
-}
# limitations under the License. #
################################################################################
-
-apiVersion: v1
-kind: ConfigMap
-metadata:
- name: {{ include "common.name.policymanagementservice" . }}-configmap-config
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-data:
-{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
+{{ include "common.applicationConfigmap" . }}
---
apiVersion: v1
kind: ConfigMap
-metadata:
- name: {{ include "common.name.policymanagementservice" . }}-configmap-data
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
+metadata: {{ include "common.resourceMetadata" (dict "suffix" "data-configmap" "dot" . ) | nindent 2 }}
data:
-{{ tpl (.Files.Glob "resources/data/*").AsConfig . | indent 2 }}
\ No newline at end of file
+ application_configuration.json: |
+ {{- .Values.config | toRawJson | nindent 4 }}
################################################################################
*/}}
-{{- if .Values.policymanagementservice.ingress.enabled -}}
+{{- if (include "common.ingressEnabled" .) -}}
apiVersion: networking.k8s.io/v1
kind: Ingress
-metadata:
- name: {{ include "common.name.policymanagementservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
-
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
ingressClassName: {{ include "common.ingressClassName" . }}
rules:
paths:
- backend:
service:
- name: {{ include "common.name.policymanagementservice" . }}
+ name: {{ include "common.name" . }}
port:
- number: {{ .Values.policymanagementservice.service.internalPort1 }}
+ number: {{ (first .Values.service.ports).internalPort }}
path: "/a1-policy"
pathType: Prefix
{{- end -}}
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.policymanagementservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- {{if eq .Values.policymanagementservice.service.allowHttp true -}}
- - name: {{ index .Values.policymanagementservice.service.httpName }}
- port: {{ .Values.policymanagementservice.service.internalPort1 }}
- targetPort: {{ .Values.policymanagementservice.service.targetPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.policymanagementservice.service.httpsName }}
- port: {{ .Values.policymanagementservice.service.internalPort2 }}
- targetPort: {{ .Values.policymanagementservice.service.targetPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- release: {{ .Release.Name }}
- type: ClusterIP
+{{ include "common.service" . }}
kind: StatefulSet
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.policymanagementservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
- serviceName: {{ include "common.name.policymanagementservice" . }}
+ serviceName: {{ include "common.name" . }}
replicas: 1
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- release: {{ .Release.Name }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.policymanagementservice" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.policymanagementservice" . }}
+ hostname: {{ include "common.name" . }}
initContainers:
- name: copy
image: busybox:1.28
- FILE=/var/policy-management-service/application_configuration.json;
if [ ! -f $FILE ]; then
cp /etc/app/policy-management-service/initialdata/application_configuration.json $FILE;
- fi
+ fi;
+ chmod 666 $FILE;
volumeMounts:
- - name: {{ include "common.name.policymanagementservice" . }}-vardata
+ - name: {{ include "common.vardataMountName" . }}
mountPath: "/var/policy-management-service"
- - name: {{ include "common.name.policymanagementservice" . }}-policy-data
+ - name: {{ include "common.name" . }}-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 }}
- imagePullPolicy: {{ .Values.policymanagementservice.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.policymanagementservice.service.targetPort1 }}
- protocol: TCP
- - containerPort: {{ .Values.policymanagementservice.service.targetPort2 }}
- protocol: TCP
- readinessProbe:
- tcpSocket:
- port: {{ .Values.policymanagementservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.policymanagementservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.policymanagementservice.liveness.periodSeconds }}
- livenessProbe:
- httpGet:
- path: /status
- port: {{ .Values.policymanagementservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.policymanagementservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.policymanagementservice.liveness.periodSeconds }}
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 8 }}
+ {{- include "common.tcpsocketReadinessProbe" . | nindent 8 }}
+ {{- include "common.httpLiveProbe" . | nindent 8 }}
volumeMounts:
- - name: {{ include "common.name.policymanagementservice" . }}-vardata
- mountPath: "/var/policy-management-service"
- - name: {{ include "common.name.policymanagementservice" . }}-policy-config
+ - name: {{ include "common.applicationConfigMountName" . }}
mountPath: /opt/app/policy-agent/config
- - name: {{ include "common.name.policymanagementservice" . }}-policy-data
+ - name: {{ include "common.vardataMountName" . }}
+ mountPath: "/var/policy-management-service"
+ - name: {{ include "common.name" . }}-policy-data
mountPath: /etc/app/policy-management-service/initialdata
volumes:
- - name: {{ include "common.name.policymanagementservice" . }}-policy-config
- configMap:
- name: {{ include "common.name.policymanagementservice" . }}-configmap-config
- - name: {{ include "common.name.policymanagementservice" . }}-policy-data
+ {{- include "common.applicationConfigVolume" . | nindent 8 }}
+ - name: {{ include "common.name" . }}-policy-data
configMap:
- name: {{ include "common.name.policymanagementservice" . }}-configmap-data
- volumeClaimTemplates:
- - metadata:
- name: {{ include "common.name.policymanagementservice" . }}-vardata
- spec:
- accessModes:
- - ReadWriteOnce
- storageClassName: "{{ .Values.policymanagementservice.persistence.storageClassName }}"
- resources:
- requests:
- storage: "{{ .Values.policymanagementservice.persistence.size }}"
+ name: {{ include "common.name" . }}-data-configmap
+ volumeClaimTemplates: {{- include "common.vardataVolumeClaimTemplate" . | nindent 4 }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-policymanagementservice:
- imagePullPolicy: IfNotPresent
- image:
- registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
- name: nonrtric-plt-a1policymanagementservice
- tag: 2.7.0
- service:
- type: NodePort
- allowHttp: true
- httpName: http
- internalPort1: 8081
- targetPort1: 8081
- nodePort1: 30094
- httpsName: https
- internalPort2: 8433
- targetPort2: 8433
- nodePort2: 30095
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
- persistence:
- size: 2Gi
- storageClassName: standard
- ingress:
- enabled: false
+imagePullPolicy: IfNotPresent
+image:
+ registry: "nexus3.o-ran-sc.org:10002/o-ran-sc"
+ name: nonrtric-plt-a1policymanagementservice
+ tag: 2.7.0
+service:
+ type: NodePort
+ ports:
+ - name: http
+ internalPort: "8081"
+ targetPort: "8081"
+ nodePort: "30094"
+ name_tls: https
+ internalPort_tls: "8433"
+ targetPort_tls: "8433"
+ nodePort_tls: "30095"
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+persistence:
+ size: 2Gi
+ storageClassName: standard
+ingress:
+ enabled: false
+
+config:
+ config:
+ controller:
+ - name: controller1
+ baseUrl: https://a1controller:8383
+ userName: admin
+ password: Kp8bJ4SXszM0WXlhak3eHlcse2gAw84vaoGGmJvUy2U
+ ric:
+ - name: ric1
+ baseUrl: https://a1-sim-osc-0:8185
+ controller: controller1
+ managedElementIds:
+ - kista_1
+ - kista_2
+ - name: ric2
+ baseUrl: https://a1-sim-osc-1:8185
+ controller: controller1
+ managedElementIds:
+ - kista_1
+ - kista_2
+ - name: ric3
+ baseUrl: https://a1-sim-std-0:8185
+ controller: controller1
+ managedElementIds:
+ - kista_1
+ - kista_2
+ - name: ric4
+ baseUrl: https://a1-sim-std-1:8185
+ controller: controller1
+ managedElementIds:
+ - kista_1
+ - kista_2
+ - name: ric5
+ baseUrl: https://a1-sim-std2-0:8185
+ controller: controller1
+ managedElementIds:
+ - kista_1
+ - kista_2
+ - name: ric6
+ baseUrl: https://a1-sim-std2-1:8185
+ controller: controller1
+ managedElementIds:
+ - kista_1
+ - kista_2
+ streams_publishes:
+ dmaap_publisher:
+ type: message_router
+ dmaap_info:
+ topic_url: http://message-router.onap:3904/events/A1-POLICY-AGENT-WRITE
+ streams_subscribes:
+ dmaap_subscriber:
+ type: message_router
+ dmaap_info:
+ topic_url: http://message-router.onap:3904/events/A1-POLICY-AGENT-READ/users/policy-agent?timeout=15000&limit=100
+
+
+application:
+ spring:
+ profiles:
+ active: prod
+ main:
+ allow-bean-definition-overriding: true
+ aop:
+ auto: false
+ management:
+ endpoints:
+ web:
+ exposure:
+ # Enabling of springboot actuator features. See springboot documentation.
+ include: "loggers,logfile,health,info,metrics,threaddump,heapdump"
+
+ logging:
+ # Configuration of logging
+ level:
+ ROOT: ERROR
+ org.springframework: ERROR
+ org.springframework.data: ERROR
+ org.springframework.web.reactive.function.client.ExchangeFunctions: ERROR
+ org.onap.ccsdk.oran.a1policymanagementservice: INFO
+ file:
+ name: /var/log/policy-agent/application.log
+
+ server:
+ # Configuration of the HTTP/REST server. The parameters are defined and handeled by the springboot framework.
+ # See springboot documentation.
+ port : "8433"
+ http-port: "8081"
+ ssl:
+ key-store-type: JKS
+ key-store-password: policy_agent
+ key-store: /opt/app/policy-agent/etc/cert/keystore.jks
+ key-password: policy_agent
+ key-alias: policy_agent
+ 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: /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
+ # Note that the same keystore as for the server is used.
+ trust-store-used: false
+ trust-store-password: policy_agent
+ trust-store: /opt/app/policy-agent/etc/cert/truststore.jks
+ # Configuration of usage of HTTP Proxy for the southbound accesses.
+ # The HTTP proxy (if configured) will only be used for accessing NearRT RIC:s
+ http.proxy-host:
+ http.proxy-port: 0
+ http.proxy-type: HTTP
+ # 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
+ # A file containing an authorization token, which shall be inserted in each HTTP header (authorization).
+ # If the file name is empty, no authorization token is sent.
+ auth-token-file:
dependencies:
- name: nonrtric-common
version: ^2.0.0
- repository: "@local"
\ No newline at end of file
+ repository: "@local"
kind: Deployment
apiVersion: apps/v1
-metadata:
- name: {{ include "common.name.rappcatalogueservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- generation: 1
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
- annotations:
- deployment.kubernetes.io/revision: '1'
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
replicas: 1
- selector:
- matchLabels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
- release: {{ .Release.Name }}
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
- release: {{ .Release.Name }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
- hostname: {{ include "common.name.rappcatalogueservice" . }}
+ hostname: {{ include "common.name" . }}
containers:
- - name: {{ include "common.container.rappcatalogueservice" . }}
- image: {{ .Values.rappcatalogueservice.image.registry }}/{{ .Values.rappcatalogueservice.image.name }}:{{ .Values.rappcatalogueservice.image.tag }}
- imagePullPolicy: {{ .Values.rappcatalogueservice.imagePullPolicy }}
- ports:
- - containerPort: {{ .Values.rappcatalogueservice.service.targetPort1 }}
- protocol: TCP
- - containerPort: {{ .Values.rappcatalogueservice.service.targetPort2 }}
- protocol: TCP
- readinessProbe:
- tcpSocket:
- port: {{ .Values.rappcatalogueservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.rappcatalogueservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.rappcatalogueservice.liveness.periodSeconds }}
- livenessProbe:
- tcpSocket:
- port: {{ .Values.rappcatalogueservice.service.targetPort1 }}
- initialDelaySeconds: {{ .Values.rappcatalogueservice.liveness.initialDelaySeconds }}
- periodSeconds: {{ .Values.rappcatalogueservice.liveness.periodSeconds }}
+ - name: {{ include "common.containername" . }}
+ image: {{ .Values.image.registry }}/{{ .Values.image.name }}:{{ .Values.image.tag }}
+ imagePullPolicy: {{ .Values.imagePullPolicy }}
+ ports: {{- include "common.containerPorts" . | nindent 8 }}
+ {{- include "common.tcpsocketProbes" . | nindent 8 }}
# limitations under the License. #
################################################################################
-kind: Service
-apiVersion: v1
-metadata:
- name: {{ include "common.name.rappcatalogueservice" . }}
- namespace: {{ include "common.namespace.nonrtric" . }}
- labels:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ .Release.Name }}
- heritage: {{ .Release.Service }}
-spec:
- ports:
- {{if eq .Values.rappcatalogueservice.service.allowHttp true -}}
- - name: {{ index .Values.rappcatalogueservice.service.httpName }}
- port: {{ .Values.rappcatalogueservice.service.internalPort1 }}
- targetPort: {{ .Values.rappcatalogueservice.service.targetPort1 }}
- protocol: TCP
- {{- end }}
- - name: {{ index .Values.rappcatalogueservice.service.httpsName }}
- port: {{ .Values.rappcatalogueservice.service.internalPort2 }}
- targetPort: {{ .Values.rappcatalogueservice.service.targetPort2 }}
- protocol: TCP
- selector:
- app: {{ include "common.namespace.nonrtric" . }}-{{ include "common.name.rappcatalogueservice" . }}
- release: {{ .Release.Name }}
- type: ClusterIP
+{{ include "common.service" . }}
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
-rappcatalogueservice:
- imagePullPolicy: IfNotPresent
- image:
- registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
- name: nonrtric-plt-rappcatalogue
- tag: 1.2.0
- service:
- allowHttp: true
- httpName: http
- internalPort1: 9085
- targetPort1: 8680
- httpsName: https
- internalPort2: 9086
- targetPort2: 8633
- liveness:
- initialDelaySeconds: 20
- periodSeconds: 10
- readiness:
- initialDelaySeconds: 20
- periodSeconds: 10
+imagePullPolicy: IfNotPresent
+image:
+ registry: 'nexus3.o-ran-sc.org:10002/o-ran-sc'
+ name: nonrtric-plt-rappcatalogue
+ tag: 1.2.0
+service:
+ type: ClusterIP
+ ports:
+ - name: http
+ internalPort: "9085"
+ targetPort: "8680"
+ name_tls: https
+ internalPort_tls: "9086"
+ targetPort_tls: "8633"
+liveness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
+readiness:
+ initialDelaySeconds: 20
+ periodSeconds: 10
-################################################################################\r
-# Copyright (c) 2021 HCL Technologies Limited. #\r
-# #\r
-# Licensed under the Apache License, Version 2.0 (the "License"); #\r
-# you may not use this file except in compliance with the License. #\r
-# You may obtain a copy of the License at #\r
-# #\r
-# http://www.apache.org/licenses/LICENSE-2.0 #\r
-# #\r
-# Unless required by applicable law or agreed to in writing, software #\r
-# distributed under the License is distributed on an "AS IS" BASIS, #\r
-# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #\r
-# See the License for the specific language governing permissions and #\r
-# limitations under the License. #\r
-################################################################################\r
-\r
-{{- define "common.name.influxdb" -}}\r
- {{- printf "influxdb" -}}\r
-{{- end -}}\r
-\r
-{{- define "common.fullname.influxdb" -}}\r
- {{- $name := ( include "common.name.influxdb" . ) -}}\r
- {{- $namespace := ( include "common.namespace.platform" . ) -}}\r
- {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-{{- define "common.influxdb.chart" -}}\r
-{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-{{- define "common.influxdb.labels" -}}\r
-helm.sh/chart: {{ include "common.influxdb.chart" . }}\r
-{{ include "common.influxdb.selectorLabels" . }}\r
-{{- if .Chart.AppVersion }}\r
-app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}\r
-{{- end }}\r
-app.kubernetes.io/managed-by: {{ .Release.Service }}\r
-{{- end -}}\r
-\r
-{{- define "common.influxdb.selectorLabels" -}}\r
-app.kubernetes.io/name: {{ include "common.name.influxdb" . }}\r
-app.kubernetes.io/instance: {{ .Release.Name }}\r
-{{- end -}}\r
-\r
-{{- define "common.influxdb.serviceAccountName" -}}\r
- {{- $name := ( include "common.fullname.influxdb" . ) -}}\r
- {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}\r
-{{- end -}}\r
-\r
-{{- define "common.serviceport.influxdb.http" -}}8086{{- end -}}\r
-{{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}}\r
-{{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}}\r
-{{- define "common.serviceport.influxdb.rpc.bind_address" -}}8088{{- end -}}\r
-{{- define "common.serviceport.influxdb.graphite.bind_address" -}}2003{{- end -}}\r
-{{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}}\r
-{{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}}\r
-{{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}}\r
+################################################################################
+# Copyright (c) 2021 HCL Technologies Limited. #
+# #
+# 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.influxdb" -}}
+ {{- printf "influxdb" -}}
+{{- end -}}
+
+{{- define "common.fullname.influxdb" -}}
+ {{- $name := ( include "common.name.influxdb" . ) -}}
+ {{- $namespace := ( include "common.namespace.platform" . ) -}}
+ {{- printf "%s-%s" $namespace $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.influxdb.chart" -}}
+{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.influxdb.labels" -}}
+helm.sh/chart: {{ include "common.influxdb.chart" . }}
+{{ include "common.influxdb.selectorLabels" . }}
+{{- if .Chart.AppVersion }}
+app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
+{{- end }}
+app.kubernetes.io/managed-by: {{ .Release.Service }}
+{{- end -}}
+
+{{- define "common.influxdb.selectorLabels" -}}
+app.kubernetes.io/name: {{ include "common.name.influxdb" . }}
+app.kubernetes.io/instance: {{ .Release.Name }}
+{{- end -}}
+
+{{- define "common.influxdb.serviceAccountName" -}}
+ {{- $name := ( include "common.fullname.influxdb" . ) -}}
+ {{- printf "service-%s-http" $name | trunc 63 | trimSuffix "-" -}}
+{{- end -}}
+
+{{- define "common.serviceport.influxdb.http" -}}8086{{- end -}}
+{{- define "common.serviceport.influxdb.meta.bind_address" -}}8091{{- end -}}
+{{- define "common.serviceport.influxdb.http.bind_address" -}}8086{{- end -}}
+{{- define "common.serviceport.influxdb.rpc.bind_address" -}}8088{{- end -}}
+{{- define "common.serviceport.influxdb.graphite.bind_address" -}}2003{{- end -}}
+{{- define "common.serviceport.influxdb.udp.bind_address" -}}8089{{- end -}}
+{{- define "common.serviceport.influxdb.opentsdb.bind_address" -}}4242{{- end -}}
+{{- define "common.serviceport.influxdb.collectd.bind_address" -}}25826{{- end -}}
{{- end -}}
{{- else -}}
{{- with index $ctx $currentkey }}
- {{- $newctx := dict "ctx" . "printkeys" $restkeys -}}
+ {{- $newctx := dict "ctx" . "printkeys" $restkeys -}}
{{- include "recursiveprinter" $newctx -}}
{{- end -}}
{{- end -}}
{{- if hasKey $topctx.Values.common "tillers" }}
{{- $ctx := index $topctx.Values.common.tillers .key -}}
{{- if not (empty $ctx) -}}
- {{- $newctx := dict "ctx" $ctx "printkeys" .printkey -}}
+ {{- $newctx := dict "ctx" $ctx "printkeys" .printkey -}}
{{- include "recursiveprinter" $newctx -}}
{{- end -}}
{{- end -}}
description: A Helm chart to deploy topology
name: topology
version: 1.0.0
+
+dependencies:
+ - name: nonrtric-common
+ version: ^2.0.0
+ repository: "@local"
apiVersion: v1
kind: ConfigMap
-metadata:
- name: topology-configmapenv
- labels:
- name: topology-env
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+metadata: {{ include "common.resourceMetadata" (dict "suffix" "configmapenv" "dot" . ) | nindent 2 }}
data:
AUTH_ENABLED: {{ .Values.conf.authEnabled | quote }}
- AUTH_HOST_URL: {{ .Values.conf.authHostUrl | quote }}
+ AUTH_HOST_URL: {{ .Values.conf.authHostUrl | quote }}
PROVIDERS: {{ .Values.conf.providers | quote }}
LOAD_PACKAGES: {{ .Values.conf.loadPackages | quote }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: topology
- labels:
- name: topology
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
replicas: {{ .Values.replicaCount }}
- selector:
- matchLabels:
- name: topology
+ selector: {{- include "common.selectors" . | nindent 4 }}
template:
- metadata:
- labels:
- name: topology
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
- spec:
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
+ spec:
containers:
- - name: {{ .Chart.Name }}
+ - name: {{ include "common.containername" . }}
image: "{{ .Values.image.repository }}/{{ .Values.image.name}}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
tty: true
stdin: true
envFrom:
- configMapRef:
- name: topology-configmapenv
+ name: {{ include "common.name" . }}-configmapenv
securityContext:
capabilities:
add:
# See the License for the specific language governing permissions and
# limitations under the License.
-apiVersion: v1
-kind: Service
-metadata:
- name: "topology"
- labels:
- name: topology
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
-spec:
- type: {{ .Values.service.type }}
- ports:
- - port: {{ .Values.service.ports.port }}
- nodePort: {{ .Values.service.ports.nodePort }}
- selector:
- name: topology
- release: {{ .Release.Name }}
- chart: {{ .Chart.Name }}
+{{ include "common.service" . }}
service:
type: NodePort
ports:
- port: 3001
+ - name: http
+ internalPort: "3001"
+ targetPort: "3001"
nodePort: 32001
conf: