Merge "[AAI] OOM AAI Rolling Update fixes"
authorAndreas Geissler <andreas-geissler@telekom.de>
Wed, 23 Nov 2022 11:06:46 +0000 (11:06 +0000)
committerGerrit Code Review <gerrit@onap.org>
Wed, 23 Nov 2022 11:06:46 +0000 (11:06 +0000)
1  2 
kubernetes/aai/templates/deployment.yaml
kubernetes/aai/values.yaml

@@@ -30,6 -30,13 +30,13 @@@ spec
      matchLabels:
        app: {{ include "common.name" . }}
    replicas: {{ .Values.replicaCount }}
+   strategy:
+     type: {{ .Values.updateStrategy.type }}
+     {{- if (eq "RollingUpdate" .Values.updateStrategy.type) }}
+     rollingUpdate:
+       maxUnavailable: {{ .Values.updateStrategy.maxUnavailable }}
+       maxSurge: {{ .Values.updateStrategy.maxSurge }}
+     {{- end }}
    template:
      metadata:
        labels:
@@@ -39,6 -46,7 +46,7 @@@
        annotations:
          checksum/config: {{ include (print $.Template.BasePath "/configmap.yaml") . | sha256sum }}
      spec:
+       terminationGracePeriodSeconds: {{ .Values.service.terminationGracePeriodSeconds }}
        initContainers: {{ include "common.certInitializer.initContainer" . | nindent 6 }}
        - command:
          - /app/ready.py
          image: {{ include "repositoryGenerator.image.readiness" . }}
          imagePullPolicy: {{ .Values.global.pullPolicy | default .Values.pullPolicy }}
          name: {{ include "common.name" . }}-readiness
 +        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 }}
        containers:
        - name: {{ include "common.name" . }}
          image: "{{ include "repositoryGenerator.dockerHubRepository" . }}/{{ .Values.image }}"
@@@ -86,7 -87,6 +94,7 @@@
          ports:
          - containerPort: {{ .Values.service.internalPort }}
          - containerPort: {{ .Values.service.internalPlainPort }}
 +        - containerPort: {{ .Values.metricsService.internalPort }}
          # disable liveness probe when breakpoints set in debugger
          # so K8s doesn't restart unresponsive container
          {{- if eq .Values.liveness.enabled true }}
@@@ -328,7 -328,7 +328,7 @@@ certInitializer
  
  # application image
  dockerhubRepository: registry.hub.docker.com
 -image: aaionap/haproxy:1.4.2
 +image: onap/aai-haproxy:1.9.5
  pullPolicy: Always
  
  flavor: small
@@@ -345,22 -345,20 +345,27 @@@ config
  # default number of instances
  replicaCount: 1
  
+ updateStrategy:
+   type: RollingUpdate
+   maxUnavailable: 0
+   maxSurge: 1
  nodeSelector: {}
  
  affinity: {}
  
  # HAProxy configuration to block HTTP requests to AAI based on configurable URL patterns
  haproxy:
 +  initContainers:
 +    resources:
 +      memory: 100Mi
 +      cpu: 50m
    requestBlocking:
      enabled: false
      customConfigs: []
 +  replicas:
 +    aaiResources: 1
 +    aaiTraversal: 1
  
  # probe configuration parameters
  liveness:
@@@ -400,30 -398,6 +405,30 @@@ service
    internalPlainPort: 8080
    nodeport: 33
  
 +metricsService:
 +  type: ClusterIP
 +  portName: prometheus
 +  externalPort: 8448
 +  internalPort: 8448
 +
 +metrics:
 +  serviceMonitor:
 +    enabled: false
 +    targetPort: 8448
 +    path: /metrics
 +    basicAuth:
 +      enabled: false
 +
 +    selector:
 +      app: '{{ include "common.name" . }}-metrics'
 +      chart: '{{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }}'
 +      release: '{{ include "common.release" . }}'
 +      heritage: '{{ .Release.Service }}'
 +
 +    relabelings: []
 +
 +    metricRelabelings: []
 +
  ingress:
    enabled: false
    service: