diff --git a/charts/netobserv/Chart.yaml b/charts/netobserv/Chart.yaml index 08507dc..64d4f75 100644 --- a/charts/netobserv/Chart.yaml +++ b/charts/netobserv/Chart.yaml @@ -2,7 +2,7 @@ apiVersion: v2 name: netobserv description: ElastiFlow NetObserv type: application -version: 0.3.1 +version: 0.4.0 appVersion: 7.0.1 keywords: diff --git a/charts/netobserv/templates/hpa.yaml b/charts/netobserv/templates/hpa.yaml index b8962c5..b047aa0 100644 --- a/charts/netobserv/templates/hpa.yaml +++ b/charts/netobserv/templates/hpa.yaml @@ -12,21 +12,12 @@ spec: name: {{ include "netobserv.fullname" . }} minReplicas: {{ .Values.autoscaling.minReplicas }} maxReplicas: {{ .Values.autoscaling.maxReplicas }} + {{- with .Values.autoscaling.metrics }} metrics: - {{- if .Values.autoscaling.targetCPUUtilizationPercentage }} - - type: Resource - resource: - name: cpu - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }} - {{- end }} - {{- if .Values.autoscaling.targetMemoryUtilizationPercentage }} - - type: Resource - resource: - name: memory - target: - type: Utilization - averageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }} - {{- end }} + {{- toYaml . | nindent 4 }} + {{- end }} + {{- with .Values.autoscaling.behavior }} + behavior: + {{- toYaml . | nindent 4 }} + {{- end }} {{- end }} diff --git a/charts/netobserv/templates/service.yaml b/charts/netobserv/templates/service.yaml index 8c0e860..9941b36 100644 --- a/charts/netobserv/templates/service.yaml +++ b/charts/netobserv/templates/service.yaml @@ -10,6 +10,15 @@ spec: {{- if .Values.service.externalTrafficPolicy }} externalTrafficPolicy: {{ .Values.service.externalTrafficPolicy }} {{- end }} + {{- if .Values.service.loadBalancerSourceRanges }} + loadBalancerSourceRanges: + {{- range .Values.service.loadBalancerSourceRanges }} + - {{ . }} + {{- end }} + {{- end }} + {{- if .Values.service.loadBalancerIP }} + loadBalancerIP: {{ .Values.service.loadBalancerIP }} + {{- end }} ports: {{ .Values.service.ports | toYaml | nindent 4 }} selector: {{- include "netobserv.selectorLabels" . | nindent 4 }} diff --git a/charts/netobserv/values.yaml b/charts/netobserv/values.yaml index 1e9cd6d..69bfdad 100644 --- a/charts/netobserv/values.yaml +++ b/charts/netobserv/values.yaml @@ -238,8 +238,28 @@ autoscaling: enabled: false minReplicas: 1 maxReplicas: 100 - targetCPUUtilizationPercentage: 80 - # targetMemoryUtilizationPercentage: 80 + metrics: + - type: Resource + resource: + name: cpu + targetAverageUtilization: 80 + # - type: Resource + # resource: + # name: memory + # targetAverageUtilization: 80 + # behavior: + # scaleUp: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Percent + # value: 100 + # periodSeconds: 15 + # scaleDown: + # stabilizationWindowSeconds: 300 + # policies: + # - type: Percent + # value: 10 + # periodSeconds: 15 tolerations: []