aboutsummaryrefslogtreecommitdiffstats
path: root/kubernetes/policy/components/policy-clamp-runtime-acm
diff options
context:
space:
mode:
Diffstat (limited to 'kubernetes/policy/components/policy-clamp-runtime-acm')
-rw-r--r--kubernetes/policy/components/policy-clamp-runtime-acm/Chart.yaml6
-rw-r--r--kubernetes/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml17
-rw-r--r--kubernetes/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml52
-rw-r--r--kubernetes/policy/components/policy-clamp-runtime-acm/values.yaml12
4 files changed, 57 insertions, 30 deletions
diff --git a/kubernetes/policy/components/policy-clamp-runtime-acm/Chart.yaml b/kubernetes/policy/components/policy-clamp-runtime-acm/Chart.yaml
index 0dd1f34fcf..ef9a7494ec 100644
--- a/kubernetes/policy/components/policy-clamp-runtime-acm/Chart.yaml
+++ b/kubernetes/policy/components/policy-clamp-runtime-acm/Chart.yaml
@@ -1,7 +1,7 @@
# ============LICENSE_START=======================================================
# Copyright (C) 2021, 2024 Nordix Foundation. All rights reserved.
# Modifications Copyright © 2021 Orange
-# Modifications Copyright © 2021-2022 Nordix Foundation
+# Modifications Copyright © 2021-2024 Nordix Foundation
# Modifications Copyright © 2024 Deutsche Telekom
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -22,7 +22,7 @@
apiVersion: v2
description: ONAP Policy Clamp Controlloop Runtime
name: policy-clamp-runtime-acm
-version: 14.0.1
+version: 14.0.2
dependencies:
- name: common
@@ -33,4 +33,4 @@ dependencies:
repository: '@local'
- name: serviceAccount
version: ~13.x-0
- repository: '@local'
+ repository: '@local' \ No newline at end of file
diff --git a/kubernetes/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml b/kubernetes/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
index 35e42c589d..2e09397806 100644
--- a/kubernetes/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
+++ b/kubernetes/policy/components/policy-clamp-runtime-acm/resources/config/acRuntimeParameters.yaml
@@ -1,5 +1,5 @@
# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2023 Nordix Foundation.
+# Copyright (C) 2021-2024 Nordix Foundation.
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
@@ -25,8 +25,13 @@ spring:
converters:
preferred-json-mapper: gson
datasource:
- url: jdbc:mariadb://{{ .Values.db.service.name }}:{{ .Values.db.service.internalPort }}/clampacm
+ {{ if .Values.global.mariadbGalera.useInPolicy }}
+ url: jdbc:mariadb://{{ .Values.db.service.mariadbName }}:{{ .Values.db.service.mariadbPort }}/clampacm
driverClassName: org.mariadb.jdbc.Driver
+ {{ else }}
+ url: jdbc:postgresql://{{ .Values.db.service.pgName }}:{{ .Values.db.service.pgPort }}/clampacm
+ driverClassName: org.postgresql.Driver
+ {{ end }}
username: ${SQL_USER}
password: ${SQL_PASSWORD}
hikari:
@@ -42,7 +47,11 @@ spring:
implicit-strategy: org.onap.policy.common.spring.utils.CustomImplicitNamingStrategy
properties:
hibernate:
- dialect: org.hibernate.dialect.MariaDB103Dialect
+ {{ if .Values.global.mariadbGalera.useInPolicy }}
+ dialect: org.hibernate.dialect.MariaDBDialect
+ {{ else }}
+ dialect: org.hibernate.dialect.PostgreSQLDialect
+ {{ end }}
format_sql: true
metrics:
@@ -105,4 +114,4 @@ management:
endpoints:
web:
exposure:
- include: health, metrics, prometheus
+ include: health, metrics, prometheus \ No newline at end of file
diff --git a/kubernetes/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml b/kubernetes/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
index 462f2e517b..5a206b996e 100644
--- a/kubernetes/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
+++ b/kubernetes/policy/components/policy-clamp-runtime-acm/templates/deployment.yaml
@@ -1,6 +1,6 @@
{{/*
# ============LICENSE_START=======================================================
-# Copyright (C) 2021-2023 Nordix Foundation.
+# Copyright (C) 2021-2024 Nordix Foundation.
# Modifications Copyright © 2024 Deutsche Telekom
# ================================================================================
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -31,10 +31,14 @@ spec:
{{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- command:
- - /app/ready.py
+ - /app/ready.py
args:
- - --job-name
- - {{ include "common.release" . }}-policy-galera-config
+ - --job-name
+{{ if .Values.global.mariadbGalera.useInPolicy }}
+ - {{ include "common.release" . }}-policy-galera-migrator-config
+{{ else }}
+ - {{ include "common.release" . }}-policy-pg-migrator-config
+{{ end }}
env:
- name: NAMESPACE
valueFrom:
@@ -44,7 +48,7 @@ spec:
image: {{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
{{ include "common.containerSecurityContext" . | indent 8 | trim }}
- name: {{ include "common.name" . }}-galera-config-readiness
+ name: {{ include "common.name" . }}-db-config-readiness
resources:
limits:
cpu: "100m"
@@ -63,14 +67,16 @@ spec:
- name: SQL_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "db-secret" "key" "password") | indent 10 }}
- name: RUNTIME_USER
- {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "runtime-secret" "key" "login") | indent 10 }}
+ {{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "runtime-secret" "key" "login") | indent 10 }}
- name: RUNTIME_PASSWORD
{{- include "common.secret.envFromSecretFast" (dict "global" . "uid" "runtime-secret" "key" "password") | indent 10 }}
+{{- if .Values.global.useStrimziKafka }}
- name: SASL_JAAS_CONFIG
valueFrom:
secretKeyRef:
name: {{ include "common.name" . }}-ku
key: sasl.jaas.config
+{{- end }}
volumeMounts:
- mountPath: /config-input
name: ac-runtime-config
@@ -103,27 +109,33 @@ spec:
initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
periodSeconds: {{ .Values.readiness.periodSeconds }}
volumeMounts:
- - name: logs
- mountPath: /var/log/onap
- - name: empty-dir
- mountPath: /tmp
- subPath: tmp-dir
- - mountPath: /opt/app/policy/clamp/etc/logback.xml
- subPath: logback.xml
- name: ac-runtime-config-processed
- - mountPath: /opt/app/policy/clamp/etc/mounted
- name: ac-runtime-config-processed
+ - mountPath: /etc/localtime
+ name: localtime
+ readOnly: true
+ - name: logs
+ mountPath: /var/log/onap
+ - name: empty-dir
+ mountPath: /tmp
+ subPath: tmp-dir
+ - mountPath: /opt/app/policy/clamp/etc/logback.xml
+ subPath: logback.xml
+ name: ac-runtime-config-processed
+ - mountPath: /opt/app/policy/clamp/etc/mounted
+ name: ac-runtime-config-processed
resources: {{ include "common.resources" . | nindent 12 }}
{{- if .Values.nodeSelector }}
- nodeSelector:
-{{ toYaml .Values.nodeSelector | indent 10 }}
+ nodeSelector:
+{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end -}}
{{- if .Values.affinity }}
- affinity:
-{{ toYaml .Values.affinity | indent 10 }}
+ affinity:
+{{ toYaml .Values.affinity | indent 8 }}
{{- end }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
+ - name: localtime
+ hostPath:
+ path: /etc/localtime
- name: empty-dir
emptyDir:
sizeLimit: {{ .Values.dirSizes.emptyDir.sizeLimit }}
diff --git a/kubernetes/policy/components/policy-clamp-runtime-acm/values.yaml b/kubernetes/policy/components/policy-clamp-runtime-acm/values.yaml
index b030f940de..eb974d6ed2 100644
--- a/kubernetes/policy/components/policy-clamp-runtime-acm/values.yaml
+++ b/kubernetes/policy/components/policy-clamp-runtime-acm/values.yaml
@@ -23,6 +23,10 @@
global:
nodePortPrefixExt: 304
persistence: {}
+ postgres:
+ useInPolicy: false
+ mariadbGalera:
+ useInPolicy: true
#Strimzi Kafka properties
kafkaTopics:
acRuntimeTopic:
@@ -85,8 +89,10 @@ db:
user: policy-user
password: policy_user
service:
- name: policy-mariadb
- internalPort: 3306
+ mariadbName: policy-mariadb
+ mariadbPort: 3306
+ pgName: policy-pg-primary
+ pgPort: 5432
# default number of instances
replicaCount: 1
@@ -160,7 +166,7 @@ serviceAccount:
wait_for_job_container:
containers:
- - '{{ include "common.release" . }}-policy-galera-config'
+ - '{{ include "common.release" . }}-galera-migrator-config'
customNaming:
toscaElementName: org.onap.policy.clamp.acm.AutomationCompositionElement