apiVersion: v2
description: ONAP Active and Available Inventory
name: aai
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
- name: repositoryGenerator
version: ~13.x-0
repository: '@local'
+ - name: readinessCheck
+ version: ~13.x-0
+ repository: '@local'
- name: aai-babel
version: ~15.x-0
repository: 'file://components/aai-babel'
apiVersion: v2
description: Babel microservice
name: aai-babel
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
metadata:
name: {{ include "common.fullname" . }}-configmap
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "resources/config/*").AsConfig . | indent 2 }}
template:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 10 | trim }}
ports:
{{- if .Values.debug.enabled }}
- containerPort: {{ .Values.debug.port }}
- mountPath: /opt/app/babel/config/logback.xml
name: config
subPath: logback.xml
+ - mountPath: /opt/app/babel/logs
+ name: babel-logs
+ - mountPath: /tmp
+ name: tmp
resources: {{ include "common.resources" . | nindent 12 }}
{{- if .Values.nodeSelector }}
nodeSelector:
secret:
secretName: {{ include "common.fullname" . }}-babel-secrets
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.artifactDataSizeLimit }}
+ - name: tmp
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpSizeLimit }}
+ - name: babel-logs
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.babelLogsSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 8 }}
{{- include "common.imagePullSecrets" . | nindent 6 }}
metadata:
name: {{ include "common.fullname" . }}-babel-secrets
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }}
level:
root: INFO
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+volumes:
+ artifactDataSizeLimit: 50Mi
+ babelLogsSizeLimit: 100Mi
+ tmpSizeLimit: 100Mi
+
+securityContext:
+ user_id: 1000
+ group_id: 101
+
+podAnnotations:
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'
apiVersion: v2
description: ONAP AAI GraphAdmin
name: aai-graphadmin
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
kind: KafkaUser
metadata:
name: {{ include "common.release" . }}-{{ .Values.global.aaiGraphKafkaUser }}
- labels:
+ labels: {{- include "common.labels" . | nindent 4 }}
strimzi.io/cluster: {{ include "common.release" . }}-strimzi
spec:
authentication:
metadata:
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
{{- if .Values.global.jobs.migration.enabled }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
metadata:
name: {{ include "common.fullname" . }}-properties
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
{{- if .Values.global.jobs.migration.enabled }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
metadata:
name: {{ include "common.fullname" . }}-migration
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
"helm.sh/hook-weight": "0"
*/}}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
{{- if .Values.config.debug.enabled }}
replicas: 1
matchLabels:
app: {{ include "common.name" . }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- name: {{ include "common.name" . }}
- annotations:
- checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
hostname: aai-graphadmin
terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- name: tmp-volume
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpSizeLimit }}
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
- name: script-logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.scriptlogSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: config
configMap:
metadata:
name: {{ include "common.fullname" . }}-db-backup
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
"helm.sh/hook-weight": "2"
backoffLimit: 20
template:
metadata:
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 8 }}
name: {{ include "common.name" . }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
{{- if eq .Values.global.jobs.migration.remoteCassandra.enabled false }}
- - command:
- - /bin/bash
- - -c
- - /app/ready.py --service-name {{ .Values.global.cassandra.serviceName }}
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-db-backup-readiness
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.waitForCassandraService ) | indent 6 | trim}}
{{- end }}
containers:
- name: {{ include "common.name" . }}-db-backup-job
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
command:
- sh
args:
metadata:
name: {{ include "common.fullname" . }}-create-db-schema
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-job
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }}
spec:
backoffLimit: 20
template:
metadata:
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 8 }}
name: {{ include "common.name" . }}
spec:
initContainers:
metadata:
name: {{ include "common.fullname" . }}-migration
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-job
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 4 }}
annotations:
"helm.sh/hook": post-upgrade,post-rollback,post-install
"helm.sh/hook-weight": "1"
backoffLimit: 20
template:
metadata:
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 8 }}
name: {{ include "common.name" . }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- - command:
- - /app/ready.py
- args:
- - --service-name
- - {{ .Values.global.cassandra.serviceName }}
- - --service-name
- - aai-schema-service
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-readiness
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.waitForWithSchemaService) | indent 6 | trim }}
- command:
- sh
args:
echo "waiting 15s for istio side cars to be up"; sleep 15s;{{- end }}
sh docker-entrypoint.sh run_Migrations.sh -e UpdateAaiUriIndexMigration --commit --skipPreMigrationSnapShot --runDisabled RebuildAllEdges ;
{{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
volumeMounts:
- mountPath: /opt/app/aai-graphadmin/resources/etc/appprops/janusgraph-realtime.properties
name: config
metadata:
name: {{ include "common.fullname" . }}-db-backup-job
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-db-backup-job
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "db-backup-job") | nindent 4 }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
"helm.sh/hook-weight": "2"
backoffLimit: 20
template:
metadata:
- labels:
- app: {{ include "common.name" . }}-db-backup-job
- release: {{ include "common.release" . }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "db-backup-job") | nindent 8 }}
name: {{ include "common.name" . }}
spec:
initContainers:
{{- if .Values.global.jobs.migration.enabled -}}
{{- if eq "True" (include "common.needPV" .) -}}
+{{- if not .Values.persistence.storageClass -}}
kind: PersistentVolume
apiVersion: v1
metadata:
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}"
- release: "{{ include "common.release" . }}"
- heritage: "{{ .Release.Service }}"
+ labels: {{- include "common.labels" . | nindent 4 }}
name: {{ include "common.fullname" . }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
path: {{ .Values.global.persistence.mountPath | default .Values.persistence.mountPath }}/{{ include "common.release" . }}/{{ .Values.persistence.mountSubPath1 }}
{{- end -}}
{{- end -}}
+{{- end -}}
metadata:
name: {{ include "common.fullname" . }}-migration
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: "{{ .Chart.Name }}-{{ .Chart.Version }}"
- release: "{{ include "common.release" . }}"
- heritage: "{{ .Release.Service }}"
+ labels: {{- include "common.labels" . | nindent 4 }}
annotations:
"helm.sh/hook": pre-upgrade,pre-install
"helm.sh/hook-weight": "-1"
metadata:
name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
name: {{ .Values.service.actuatorPortName }}
targetPort: {{ .Values.service.appPort }}
{{- end}}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
clients: SDNC,-1|MSO,-1|SO,-1|robot-ete,-1
# application image
-image: onap/aai-graphadmin:1.15.1
+image: onap/aai-graphadmin:1.15.2
pullPolicy: Always
restartPolicy: Always
flavor: small
services:
- '{{ .Values.global.cassandra.serviceName }}'
- aai-schema-service
+ waitForCassandra:
+ containers:
+ - aai-schema-service
+ apps:
+ - cassandra
+ waitForLocalCassandra:
+ containers:
+ - aai-schema-service
+ apps:
+ - aai-cassandra
+ waitForCassandraService:
+ services:
+ - '{{ .Values.global.cassandra.serviceName }}'
+ waitForWithSchemaService:
+ services:
+ - '{{ .Values.global.cassandra.serviceName }}'
+ - aai-schema-service
service:
type: ClusterIP
cpu: "1"
memory: "4Gi"
requests:
- cpu: "0.5"
- memory: "1.6Gi"
+ cpu: "500m"
+ memory: "1600Mi"
large:
limits:
cpu: "2"
selector:
app: '{{ include "common.name" . }}'
- chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
- release: '{{ include "common.release" . }}'
- heritage: '{{ .Release.Service }}'
+ helm.sh/chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
+ app.kubernetes.io/instance: '{{ include "common.release" . }}'
+ app.kubernetes.io/managed-by: '{{ .Release.Service }}'
relabelings: []
- name: AAI-EVENT
type: topic
operations: [Read, Write]
+
+volumes:
+ logSizeLimit: 64Mi
+ scriptlogSizeLimit: 300Mi
+ tmpSizeLimit: 500Mi
+
+podAnnotations:
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'
apiVersion: v2
description: ONAP AAI modelloader
name: aai-modelloader
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
metadata:
name: {{ include "common.fullname" . }}-prop
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "resources/config/model-loader.properties").AsConfig . | indent 2 }}
{{ tpl (.Files.Glob "resources/application.properties").AsConfig . | indent 2 }}
metadata:
name: {{ include "common.fullname" . }}-log
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "resources/config/log/logback.xml").AsConfig . | indent 2 }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
{{- if .Values.debug.enabled }}
replicas: 1
matchLabels:
app: {{ include "common.name" . }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- name: {{ include "common.name" . }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
{{- if .Values.nodeSelector }}
nodeSelector: {{ toYaml .Values.nodeSelector | nindent 8 }}
{{- if .Values.affinity }}
affinity: {{ toYaml .Values.affinity | nindent 8 }}
{{- end }}
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
env:
- name: CONFIG_HOME
value: /opt/app/model-loader/config/
value: {{ .Values.debug.args | quote }}
{{- end }}
ports:
- - containerPort: 9500
- name: http
+ - containerPort: {{ .Values.service.appPort }}
+ name: {{ .Values.service.appPortName }}
{{- if .Values.debug.enabled }}
- containerPort: {{ .Values.debug.port }}
name: {{ .Values.debug.portName }}
name: prop-config
- mountPath: {{ .Values.log.path }}
name: logs
+ - mountPath: /tmp
+ name: tmp
- mountPath: /opt/app/model-loader/logback.xml
name: log-config
subPath: logback.xml
configMap:
name: {{ include "common.fullname" . }}-prop
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
+ - name: tmp
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: log-config
configMap:
kind: PodMonitor
metadata:
name: {{ include "common.fullname" . }}
- labels:
- {{- include "common.labels" . | nindent 4 }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
affinity: {}
+service:
+ # REST API port for the graphadmin microservice
+ appPortName: http
+ appPort: 9500
+
# probe configuration parameters
liveness:
- initialDelaySeconds: 10
- periodSeconds: 10
- # necessary to disable liveness probe when setting breakpoints
- # in debugger so K8s doesn't restart unresponsive container
enabled: true
+ path: /healthz
+ periodSeconds: 10
+ initialDelaySeconds: 10
readiness:
- initialDelaySeconds: 10
+ path: /healthz
periodSeconds: 10
+ initialDelaySeconds: 10
resources:
small:
cpu: "1"
memory: "4Gi"
requests:
- cpu: "0.5"
+ cpu: "500m"
memory: "1Gi"
large:
limits:
level:
root: INFO
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+volumes:
+ logSizeLimit: 64Mi
+ tmpSizeLimit: 100Mi
apiVersion: v2
description: ONAP AAI resources
name: aai-resources
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
- name: serviceAccount
version: ~13.x-0
repository: '@local'
+ - name: readinessCheck
+ version: ~13.x-0
+ repository: '@local'
\ No newline at end of file
kind: KafkaUser
metadata:
name: {{ include "common.release" . }}-{{ .Values.global.aaiKafkaUser }}
- labels:
+ labels: {{- include "common.labels" . | nindent 4 }}
strimzi.io/cluster: {{ include "common.release" . }}-strimzi
spec:
authentication:
metadata:
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
metadata:
name: {{ include "common.fullname" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
{{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
{{- if or .Values.config.debug.enabled .Values.config.profiling.enabled }}
replicas: 1
matchLabels:
app: {{ include "common.name" . }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- name: {{ include "common.name" . }}
- annotations:
- checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
{{- if .Values.global.msbEnabled }}
{{ $values := .Values }}
msb.onap.org/service-info: '[
spec:
hostname: aai-resources
terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- - name: {{ include "common.name" . }}-readiness
- command:
- - /app/ready.py
- args:
- {{- if .Values.global.jobs.migration.enabled }}
- - --job-name
- - {{ include "common.release" . }}-aai-graphadmin-migration
- {{- else }}
- {{- if .Values.global.jobs.createSchema.enabled }}
- - --job-name
- - {{ include "common.release" . }}-aai-graphadmin-create-db-schema
- {{- else }}
- - --service-name
- - {{ .Values.global.cassandra.serviceName }}
- - --service-name
- - aai-schema-service
- {{- end }}
- {{- end }}
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{- if .Values.global.jobs.migration.enabled }}
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_migration) | nindent 8 }}
+ {{- else if .Values.global.jobs.createSchema.enabled }}
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_createSchema) | nindent 8 }}
+ {{- else }}
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_cassandra) | nindent 8 }}
+ {{- end }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
env:
{{- if .Values.config.env }}
{{- range $key,$value := .Values.config.env }}
- mountPath: /opt/app/aai-resources/resources/application-keycloak.properties
name: {{ include "common.fullname" . }}-config
subPath: application-keycloak.properties
+ - mountPath: /tmp
+ name: tmp
ports:
- containerPort: {{ .Values.service.resourcesPort }}
name: {{ .Values.service.resourcesPortName }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
+ - name: tmp
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: {{ include "common.fullname" . }}-config
configMap:
metadata:
name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
name: {{ .Values.service.metricsPortName }}
targetPort: {{ .Values.service.metricsPortName }}
{{- end }}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
clusterIP: None
sessionAffinity: {{ .Values.service.sessionAffinity }}
url: external-system
# application image
-image: onap/aai-resources:1.15.1
+image: onap/aai-resources:1.15.2
pullPolicy: Always
restartPolicy: Always
flavor: small
##
selector:
app: '{{ include "common.name" . }}'
- chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
- release: '{{ include "common.release" . }}'
- heritage: '{{ .Release.Service }}'
+ helm.sh/chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
+ app.kubernetes.io/instance: '{{ include "common.release" . }}'
+ app.kubernetes.io/managed-by: '{{ .Release.Service }}'
## RelabelConfigs to apply to samples before scraping
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
- name: AAI-EVENT
type: topic
operations: [Read, Write]
+
+volumes:
+ logSizeLimit: 50Mi
+ tmpSizeLimit: 100Mi
+
+securityContext:
+ user_id: 1000
+ group_id: 1000
+
+readinessCheck:
+ wait_for_migration:
+ jobs:
+ - '{{ include "common.release" . }}-aai-graphadmin-migration'
+ wait_for_createSchema:
+ jobs:
+ - '{{ include "common.release" . }}-aai-graphadmin-create-db-schema'
+ wait_for_cassandra:
+ services:
+ - '{{ .Values.global.cassandra.serviceName }}'
+ - aai-schema-service
+
+podAnnotations:
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'
apiVersion: v2
description: ONAP AAI Schema Service
name: aai-schema-service
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
metadata:
name: {{ include "common.fullname" . }}-log
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "config/logback.xml").AsConfig . | indent 2 }}
---
metadata:
name: {{ include "common.fullname" . }}-localhost-access-log
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "config/localhost-access-logback.xml").AsConfig . | indent 2 }}
---
metadata:
name: {{ include "common.fullname" . }}-aaiconfig
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "config/aaiconfig.properties").AsConfig . | indent 2 }}
---
metadata:
name: {{ include "common.fullname" . }}-springapp
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "config/application.properties").AsConfig . | indent 2 }}
---
metadata:
name: {{ include "common.fullname" . }}-realm
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
{{ tpl (.Files.Glob "config/realm.properties").AsConfig . | indent 2 }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" (dict "dot" . "suffix" "" "labels" .Values.labels "annotations" .Values.annotations ) | nindent 2 }}
spec:
{{- if .Values.debug.enabled }}
replicas: 1
matchLabels:
app: {{ include "common.name" . }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- name: {{ include "common.name" . }}
- annotations:
- checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
+ initContainers:
+ - command: ["cp", "-R", "/opt/app/aai-schema-service/.", "/opt/app/aai-schema-service_rw/"]
+ image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
+ imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ name: copy-base-folder
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
+ resources:
+ limits:
+ cpu: 100m
+ memory: 200Mi
+ requests:
+ cpu: 3m
+ memory: 20Mi
+ volumeMounts:
+ - mountPath: /opt/app/aai-schema-service_rw
+ name: aai-schema-service
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
env:
{{- if .Values.profiling.enabled }}
- name: PRE_JVM_ARGS
value: {{ .Values.debug.args | quote }}
{{- end }}
volumeMounts:
+ - mountPath: /opt/app/aai-schema-service
+ name: aai-schema-service
- mountPath: /opt/app/aai-schema-service/resources/etc/appprops/aaiconfig.properties
name: aaiconfig-conf
subPath: aaiconfig.properties
- name: aai-common-aai-auth-mount
secret:
secretName: aai-common-aai-auth
+ - name: aai-schema-service
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.aaiSizeLimit }}
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: log-conf
configMap:
metadata:
name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
name: {{ .Values.service.debugPortName }}
targetPort: {{ .Values.service.debugPortName }}
{{- end }}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
level:
root: INFO
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+volumes:
+ logSizeLimit: 50Mi
+ aaiSizeLimit: 150Mi
+
+podAnnotations:
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'
apiVersion: v2
description: ONAP AAI sparky-be
name: aai-sparky-be
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
- name: serviceAccount
version: ~13.x-0
repository: '@local'
+ - name: readinessCheck
+ version: ~13.x-0
+ repository: '@local'
\ No newline at end of file
---
apiVersion: v1
kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
data:
{{ tpl (.Files.Glob "resources/config/application/*").AsConfig . | indent 2 }}
template:
metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- - command:
- - /app/ready.py
- args:
- - --service-name
- - aai
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-readiness
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{ include "common.readinessCheck.waitFor" . | nindent 8 }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
command:
- sh
args:
configMap:
name: {{ include "common.fullname" . }}
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: modeldir
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.modeldirSizeLimit }}
restartPolicy: {{ .Values.global.restartPolicy | default .Values.restartPolicy }}
{{- include "common.imagePullSecrets" . | nindent 6 }}
podAnnotations:
sidecar.istio.io/rewriteAppHTTPProbers: "false"
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'
# Configure resource requests and limits
# ref: http://kubernetes.io/docs/user-guide/compute-resources/
resources:
small:
limits:
- cpu: "0.5"
+ cpu: "500m"
memory: "4Gi"
requests:
- cpu: "0.25"
+ cpu: "250m"
memory: "1Gi"
large:
limits:
cpu: "1"
memory: "8Gi"
requests:
- cpu: "0.5"
+ cpu: "500m"
memory: "2Gi"
unlimited: {}
log:
path: /var/log/onap
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+volumes:
+ logSizeLimit: 64Mi
+ modeldirSizeLimit: 64Mi
+
+securityContext:
+ user_id: 1000
+ group_id: 1000
+
+readinessCheck:
+ wait_for:
+ services:
+ - aai
apiVersion: v2
description: ONAP AAI traversal
name: aai-traversal
-version: 15.0.0
+version: 15.0.1
dependencies:
- name: common
- name: serviceAccount
version: ~13.x-0
repository: '@local'
+ - name: readinessCheck
+ version: ~13.x-0
+ repository: '@local'
kind: KafkaUser
metadata:
name: {{ include "common.release" . }}-{{ .Values.global.aaiTravKafkaUser }}
- labels:
+ labels: {{- include "common.labels" . | nindent 4 }}
strimzi.io/cluster: {{ include "common.release" . }}-strimzi
spec:
authentication:
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2
kind: HorizontalPodAutoscaler
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
apiVersion: v1
kind: ConfigMap
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
data:
{{ tpl (.Files.Glob "resources/config/logback.xml").AsConfig . | indent 2 }}
{{ tpl (.Files.Glob "resources/config/localhost-access-logback.xml").AsConfig . | indent 2 }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
{{- if or .Values.config.debug.enabled .Values.config.profiling.enabled }}
replicas: 1
matchLabels:
app: {{ include "common.name" . }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- name: {{ include "common.name" . }}
- annotations:
- checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
{{- if .Values.global.msbEnabled }}
{{ $values := .Values }}
msb.onap.org/service-info: '[
hostname: aai-traversal
terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
initContainers:
- - command:
- - /app/ready.py
- args:
{{- if .Values.global.jobs.migration.enabled }}
- - --job-name
- - {{ include "common.release" . }}-aai-graphadmin-migration
- {{- else }}
- {{- if .Values.global.jobs.createSchema.enabled }}
- - --job-name
- - {{ include "common.release" . }}-aai-graphadmin-create-db-schema
- {{- else }}
- - --service-name
- - {{ .Values.global.cassandra.serviceName }}
- - --service-name
- - aai-schema-service
- {{- end }}
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_migration) | nindent 8 }}
+ {{- else if .Values.global.jobs.createSchema.enabled }}
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_createSchema) | nindent 8 }}
+ {{- else }}
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_cassandra) | nindent 8 }}
{{- end }}
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-readiness
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
containers:
- name: {{ include "common.name" . }}
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
env:
{{- if .Values.config.env }}
{{- range $key,$value := .Values.config.env }}
- mountPath: /opt/app/aai-traversal/resources/application-keycloak.properties
name: {{ include "common.fullname" . }}-config
subPath: application-keycloak.properties
+ - mountPath: /tmp
+ name: tmp
ports:
- containerPort: {{ .Values.service.traversalPort }}
name: {{ .Values.service.traversalPortName }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- name: logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
+ - name: tmp
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.tmpSizeLimit }}
- name: {{ include "common.fullname" . }}-logs-misc
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logmiscSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: {{ include "common.fullname" . }}-config
configMap:
metadata:
name: {{ include "common.fullname" . }}-update-query-data
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
{{ if .Values.global.jobs.migration.enabled }}
annotations:
"helm.sh/hook": post-upgrade,post-rollback,post-install
spec:
template:
metadata:
- labels:
- app: {{ include "common.name" . }}-job
- release: {{ include "common.release" . }}
+ labels: {{- include "common.labels" (dict "labels" .Values.labels "ignoreHelmChart" .Values.ignoreHelmChart "dot" . "suffix" "job") | nindent 8 }}
name: {{ include "common.name" . }}
spec:
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- - name: {{ include "common.name" . }}-readiness
- image: {{ include "repositoryGenerator.image.readiness" . }}
- imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- command:
- - /app/ready.py
- args:
- - --service-name
- - aai
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- resources:
- limits:
- cpu: "100m"
- memory: "500Mi"
- requests:
- cpu: "3m"
- memory: "20Mi"
+ {{ include "common.readinessCheck.waitFor" (dict "dot" . "wait_for" .Values.readinessCheck.wait_for_service) | nindent 6 }}
- name: {{ include "common.name" . }}-wait-for-aai-haproxy
image: {{ include "repositoryGenerator.image.readiness" . }}
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
requests:
cpu: "3m"
memory: "20Mi"
+ securityContext:
+ runAsUser: 100
+ runAsGroup: 65533
+ readOnlyRootFilesystem: true
+ privileged: false
+ allowPrivilegeEscalation: false
+ capabilities:
+ drop:
+ - ALL
+ - CAP_NET_RAW
containers:
- name: {{ include "common.name" . }}-job
image: {{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}
sh -x /opt/app/aai-traversal/bin/install/updateQueryData.sh ;
{{ include "common.serviceMesh.killSidecar" . | indent 11 | trim }}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
resources: {{ include "common.resources" . | nindent 10 }}
volumeMounts:
- mountPath: /opt/app/aai-traversal/resources/etc/appprops/janusgraph-realtime.properties
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- name: {{ include "common.fullname" . }}-logs
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logSizeLimit }}
- name: {{ include "common.fullname" . }}-logs-misc
- emptyDir: {}
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.logmiscSizeLimit }}
{{ include "common.log.volumes" (dict "dot" . "configMapNamePrefix" (tpl .Values.logConfigMapNamePrefix .)) | nindent 6 }}
- name: {{ include "common.fullname" . }}-config
configMap:
metadata:
name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
name: {{ .Values.service.metricsPortName }}
targetPort: {{ .Values.service.metricsPortName }}
{{- end }}
- selector:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
clusterIP: None
sessionAffinity: {{ .Values.service.sessionAffinity }}
someConfig: random
# application image
-image: onap/aai-traversal:1.15.1
+image: onap/aai-traversal:1.15.2
pullPolicy: Always
restartPolicy: Always
flavor: small
info:
enabled: true
+podAnnotations:
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'
+
metrics:
serviceMonitor:
enabled: true
##
selector:
app: '{{ include "common.name" . }}'
- chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
- release: '{{ include "common.release" . }}'
- heritage: '{{ .Release.Service }}'
+ helm.sh/chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
+ app.kubernetes.io/instance: '{{ include "common.release" . }}'
+ app.kubernetes.io/managed-by: '{{ .Release.Service }}'
## RelabelConfigs to apply to samples before scraping
## ref: https://github.com/coreos/prometheus-operator/blob/master/Documentation/api.md#relabelconfig
root: INFO
base: INFO # base package (org.onap.aai)
logConfigMapNamePrefix: '{{ include "common.fullname" . }}'
+
+volumes:
+ logSizeLimit: 50Mi
+ logmiscSizeLimit: 50Mi
+ tmpSizeLimit: 100Mi
+
+securityContext:
+ user_id: 1000
+ group_id: 1000
+
+readinessCheck:
+ wait_for_migration:
+ jobs:
+ - '{{ include "common.release" . }}-aai-graphadmin-migration'
+ wait_for_createSchema:
+ jobs:
+ - '{{ include "common.release" . }}-aai-graphadmin-create-db-schema'
+ wait_for_cassandra:
+ services:
+ - '{{ .Values.global.cassandra.serviceName }}'
+ - aai-schema-service
+ wait_for_service:
+ services:
+ - aai
#################################################################
# Secrets metaconfig
#################################################################
--- /dev/null
+resolvers kubernetes
+ nameserver dns1 {{.Values.config.NAME_SERVER}}:53
+ hold valid 1s
metadata:
name: {{ include "common.fullname" (dict "suffix" "authz" "dot" . )}}
namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
selector:
matchLabels:
metadata:
name: aai-deployment-configmap
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
data:
+{{ tpl (.Files.Glob "resources/config/haproxy/resolvers.conf").AsConfig . | indent 2 }}
{{ if .Values.global.installSidecarSecurity }}
{{ tpl (.Files.Glob "resources/config/haproxy/haproxy-pluggable-security.cfg").AsConfig . | indent 2 }}
{{ else }}
metadata:
name: aai-fproxy-auth-certs
namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/fproxy/auth/*").AsSecrets . | indent 2 }}
metadata:
name: aai-rproxy-auth-certs
namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/rproxy/auth/*").AsSecrets . | indent 2 }}
metadata:
name: aai-rproxy-security-config
namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/rproxy/security/*").AsSecrets . | indent 2 }}
apiVersion: apps/v1
kind: Deployment
-metadata:
- name: {{ include "common.fullname" . }}
- namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+metadata: {{- include "common.resourceMetadata" . | nindent 2 }}
spec:
selector:
matchLabels:
maxSurge: {{ .Values.updateStrategy.maxSurge }}
{{- end }}
template:
- metadata:
- labels:
- app: {{ include "common.name" . }}
- release: {{ include "common.release" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- {{- if .Chart.AppVersion }}
- version: "{{ .Chart.AppVersion | replace "+" "_" }}"
- {{- else }}
- version: "{{ .Chart.Version | replace "+" "_" }}"
- {{- end }}
- name: {{ include "common.release" . }}
- annotations:
- checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
+ metadata: {{- include "common.templateMetadata" . | nindent 6 }}
spec:
terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
+ {{ include "common.podSecurityContext" . | indent 6 | trim }}
initContainers:
- - command:
- - /app/ready.py
- args:
- - --service-name
- - aai-resources
- - --service-name
- - aai-traversal
- - --service-name
- - aai-graphadmin
- env:
- - name: NAMESPACE
- valueFrom:
- fieldRef:
- apiVersion: v1
- fieldPath: metadata.namespace
- image: {{ include "repositoryGenerator.image.readiness" . }}
+ {{ include "common.readinessCheck.waitFor" . | indent 6 | trim}}
+ - command: ["/bin/sh","-c"]
+ args: ['cp -R /usr/local/etc/haproxy /usr/local/etc/haproxy_rw/']
+ image: '{{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}'
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
- name: {{ include "common.name" . }}-readiness
+ name: copy-haproxy-config
resources:
- requests:
- memory: {{ .Values.haproxy.initContainers.resources.memory }}
- cpu: {{ .Values.haproxy.initContainers.resources.cpu }}
limits:
- memory: {{ .Values.haproxy.initContainers.resources.memory }}
- cpu: {{ .Values.haproxy.initContainers.resources.cpu }}
+ cpu: 100m
+ memory: 200Mi
+ requests:
+ cpu: 2m
+ memory: 100Mi
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
+ terminationMessagePath: /dev/termination-log
+ terminationMessagePolicy: File
+ volumeMounts:
+ - mountPath: /usr/local/etc/haproxy_rw
+ name: haproxy-etc
containers:
- name: {{ include "common.name" . }}
- image: "{{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}"
+ image: '{{ include "repositoryGenerator.repository" . }}/{{ .Values.image }}'
imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
volumeMounts:
+ - mountPath: /usr/local/etc/haproxy
+ name: haproxy-etc
+ - mountPath: /usr/local/etc/haproxy/resolvers.conf
+ name: haproxy-config
+ subPath: resolvers.conf
+ readOnly: true
- mountPath: /usr/local/etc/haproxy/haproxy.cfg
{{ if .Values.global.installSidecarSecurity }}
subPath: haproxy-pluggable-security.cfg
{{ else }}
subPath: haproxy.cfg
{{ end }}
- name: haproxy-cfg
+ name: haproxy-config
ports:
- containerPort: {{ .Values.service.internalPort }}
name: {{ .Values.service.portName }}
initialDelaySeconds: {{ .Values.liveness.initialDelaySeconds }}
periodSeconds: {{ .Values.liveness.periodSeconds }}
{{ end -}}
+ {{ include "common.containerSecurityContext" . | indent 8 | trim }}
+ resources: {{ include "common.resources" . | nindent 10 }}
readinessProbe:
+ initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
+ periodSeconds: {{ .Values.readiness.periodSeconds }}
httpGet:
path: /aai/util/echo
port: {{ .Values.service.internalPort }}
value: OOM_ReadinessCheck_TID
- name: Accept
value: application/json
- initialDelaySeconds: {{ .Values.readiness.initialDelaySeconds }}
- periodSeconds: {{ .Values.readiness.periodSeconds }}
- resources: {{ include "common.resources" . | nindent 10 }}
{{- if .Values.nodeSelector }}
nodeSelector:
{{ toYaml .Values.nodeSelector | indent 8 }}
{{- end }}
serviceAccountName: {{ include "common.fullname" (dict "suffix" "read" "dot" . )}}
volumes:
- - name: haproxy-cfg
- configMap:
- name: aai-deployment-configmap
+ - name: haproxy-config
+ configMap:
+ name: aai-deployment-configmap
+ - name: haproxy-etc
+ emptyDir:
+ sizeLimit: {{ .Values.volumes.haProxySizeLimit }}
{{- include "common.imagePullSecrets" . | nindent 6 }}
metadata:
name: aai-common-aai-auth
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/auth/*").AsSecrets . | indent 2 }}
metadata:
name: aai-common-truststore
namespace: {{ include "common.namespace" . }}
+ labels: {{- include "common.labels" . | nindent 4 }}
type: Opaque
data:
{{ tpl (.Files.Glob "resources/config/aai/*").AsSecrets . | indent 2 }}
metadata:
name: {{ include "common.servicename" . }}
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
ports:
- name: {{ .Values.service.portName }}
{{ end }}
{{- end }}
type: {{ if (include "common.ingressEnabled" .) }}ClusterIP{{ else }}{{ .Values.service.type }}{{ end }}
- selector:
- app: {{ include "common.name" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
sessionAffinity: {{ .Values.service.sessionAffinity }}
---
apiVersion: v1
metadata:
name: {{ include "common.servicename" . }}-internal
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
ports:
- name: {{ .Values.service.portName }}
port: {{ .Values.service.externalPort }}
targetPort: {{ .Values.service.internalPort }}
type: ClusterIP
- selector:
- app: {{ include "common.name" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
---
apiVersion: v1
kind: Service
metadata:
name: {{ include "common.servicename" . }}-metrics
namespace: {{ include "common.namespace" . }}
- labels:
- app: {{ include "common.name" . }}-metrics
- app.kubernetes.io/name: {{ include "common.name" . }}
- chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}
- release: {{ include "common.release" . }}
- heritage: {{ .Release.Service }}
+ labels: {{- include "common.labels" . | nindent 4 }}
spec:
ports:
- port: {{ .Values.metricsService.externalPort }}
targetPort: {{ .Values.metricsService.internalPort }}
name: {{ .Values.metricsService.portName }}
type: {{ .Values.metricsService.type }}
- selector:
- app: {{ include "common.name" . }}
+ selector: {{- include "common.matchLabels" . | nindent 4 }}
clusterIP: None
# application image
dockerhubRepository: registry.hub.docker.com
-image: onap/aai-haproxy:1.11.0
+image: onap/aai-haproxy:1.15.2
pullPolicy: Always
flavor: small
config:
logstashServiceName: log-ls
logstashPort: 5044
+ # IP address of name server is needed in nginx configuration. The secure endpoint for logging with Keycloak need the ip address in the config file.
+ # You can find this ip address in the /etc/resolv.conf This file is generated by k8s. The name server ip address is in all k8s cluster the same.
+ NAME_SERVER: coredns.kube-system
# default number of instances
replicaCount: 1
selector:
app: '{{ include "common.name" . }}-metrics'
- chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
- release: '{{ include "common.release" . }}'
- heritage: '{{ .Release.Service }}'
+ helm.sh/chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
+ app.kubernetes.io/instance: '{{ include "common.release" . }}'
+ app.kubernetes.io/managed-by: '{{ .Release.Service }}'
relabelings: []
cpu: "2"
memory: "4Gi"
requests:
- cpu: "1"
- memory: "1.2Gi"
+ cpu: "500m"
+ memory: "1200Mi"
large:
limits:
cpu: "4"
memory: "8Gi"
requests:
- cpu: "2"
- memory: "2.4Gi"
+ cpu: "1"
+ memory: "2400Mi"
unlimited: {}
#Pods Service Account
nameOverride: aai
roles:
- read
+
+securityContext:
+ user_id: 99
+ group_id: 99
+
+readinessCheck:
+ wait_for:
+ services:
+ - aai-resources
+ - aai-traversal
+ - aai-graphadmin
+
+volumes:
+ haProxySizeLimit: 20Mi
+
+podAnnotations:
+ checksum/config: '{{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}'