From e8924a7e27dfcfbf6c9241904773b694474d3bd3 Mon Sep 17 00:00:00 2001 From: stefanprodan Date: Tue, 3 Mar 2020 12:39:08 +0200 Subject: [PATCH] Update podinfo chart to v1beta1 API --- charts/podinfo/Chart.yaml | 2 +- charts/podinfo/templates/canary.yaml | 14 ++++---------- charts/podinfo/templates/deployment.yaml | 2 ++ charts/podinfo/templates/hpa.yaml | 8 +------- 4 files changed, 8 insertions(+), 18 deletions(-) diff --git a/charts/podinfo/Chart.yaml b/charts/podinfo/Chart.yaml index 1aa57f10..0d52ce60 100644 --- a/charts/podinfo/Chart.yaml +++ b/charts/podinfo/Chart.yaml @@ -1,5 +1,5 @@ apiVersion: v1 -version: 3.1.0 +version: 3.1.1 appVersion: 3.1.0 name: podinfo engine: gotpl diff --git a/charts/podinfo/templates/canary.yaml b/charts/podinfo/templates/canary.yaml index c1176a17..bb644142 100644 --- a/charts/podinfo/templates/canary.yaml +++ b/charts/podinfo/templates/canary.yaml @@ -1,5 +1,5 @@ {{- if .Values.canary.enabled }} -apiVersion: flagger.app/v1alpha3 +apiVersion: flagger.app/v1beta1 kind: Canary metadata: name: {{ template "podinfo.fullname" . }} @@ -13,7 +13,6 @@ spec: apiVersion: apps/v1 kind: Deployment name: {{ template "podinfo.fullname" . }} - progressDeadlineSeconds: 60 autoscalerRef: apiVersion: autoscaling/v2beta1 kind: HorizontalPodAutoscaler @@ -29,7 +28,7 @@ spec: trafficPolicy: tls: mode: {{ .Values.canary.istioTLS }} - canaryAnalysis: + analysis: interval: {{ .Values.canary.analysis.interval }} threshold: {{ .Values.canary.analysis.threshold }} maxWeight: {{ .Values.canary.analysis.maxWeight }} @@ -48,8 +47,8 @@ spec: url: {{ .Values.canary.helmtest.url }} timeout: 3m metadata: - type: "helm" - cmd: "test {{ .Release.Name }} --cleanup" + type: "helmv3" + cmd: "test {{ .Release.Name }} -n {{ .Release.Namespace }}" {{- end }} {{- if .Values.canary.loadtest.enabled }} - name: load-test-get @@ -57,10 +56,5 @@ spec: timeout: 5s metadata: cmd: "hey -z 1m -q 5 -c 2 http://{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}" - - name: load-test-post - url: {{ .Values.canary.loadtest.url }} - timeout: 5s - metadata: - cmd: "hey -z 1m -q 5 -c 2 -m POST -d '{\"test\": true}' http://{{ template "podinfo.fullname" . }}.{{ .Release.Namespace }}:{{ .Values.service.port }}/echo" {{- end }} {{- end }} \ No newline at end of file diff --git a/charts/podinfo/templates/deployment.yaml b/charts/podinfo/templates/deployment.yaml index 969e2a8a..85c1955c 100644 --- a/charts/podinfo/templates/deployment.yaml +++ b/charts/podinfo/templates/deployment.yaml @@ -41,6 +41,8 @@ spec: - --backend-url={{ . }} {{- end }} env: + - name: PODINFO_UI_COLOR + value: "#34577c" {{- if .Values.message }} - name: PODINFO_UI_MESSAGE value: {{ .Values.message }} diff --git a/charts/podinfo/templates/hpa.yaml b/charts/podinfo/templates/hpa.yaml index 9905cda6..8526f162 100644 --- a/charts/podinfo/templates/hpa.yaml +++ b/charts/podinfo/templates/hpa.yaml @@ -10,7 +10,7 @@ metadata: heritage: {{ .Release.Service }} spec: scaleTargetRef: - apiVersion: apps/v1beta2 + apiVersion: apps/v1 kind: Deployment name: {{ template "podinfo.fullname" . }} minReplicas: {{ .Values.hpa.minReplicas }} @@ -28,10 +28,4 @@ spec: name: memory targetAverageValue: {{ .Values.hpa.memory }} {{- end }} - {{- if .Values.hpa.requests }} - - type: Pod - pods: - metricName: http_requests - targetAverageValue: {{ .Values.hpa.requests }} - {{- end }} {{- end }}