Skip to content

Commit

Permalink
pr comments
Browse files Browse the repository at this point in the history
  • Loading branch information
AlonGluz committed Sep 29, 2024
1 parent ec33c04 commit 8fc8756
Show file tree
Hide file tree
Showing 5 changed files with 48 additions and 37 deletions.
2 changes: 1 addition & 1 deletion common/unified-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: unified-chart
description: Frontegg Unified Chart
type: application

version: 4.0.32
version: 4.0.33

maintainers:
- name: "platform"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
apiVersion: argoproj.io/v1alpha1
kind: AnalysisTemplate
metadata:
name: black-box
name: {{ include "hp.name" . }}
spec:
args:
- name: service-name
Expand All @@ -15,14 +15,18 @@ spec:
successCondition: result == true
provider:
web:
{{- with .Values.argoRollouts.progressiveDelivery }}
method: POST # valid values are GET|POST|PUT, defaults to GET
url: {{ .Values.argoRollouts.progressiveDelivery.blackBox.url | default "http://nexus.default.svc.cluster.local:8080/blackbox" }}
timeoutSeconds: 1200 # seconds
url: {{ .blackBox.url | default "http://nexus.default.svc.cluster.local/blackbox" }}
timeoutSeconds: {{ .blackBox.timeout | default "1200" }} # seconds
headers:
- key: Content-Type # if body is a json, it is recommended to set the Content-Type
value: "application/json"
{{- range $header := .blackBox.headers }}
- key: {{ $header.key }} # if body is a json, it is recommended to set the Content-Type
value: {{ $header.value }}
{{- end }}
jsonBody: # If using jsonBody Content-Type header will be automatically set to json
service-name: version
version: {{ include "appVersion" . }}
service-name: {{ include "hp.name" $top }}
version: {{ include "appVersion" $top }}
{{- end }}
jsonPath: "{$.status}"
{{- end }}
11 changes: 7 additions & 4 deletions common/unified-chart/templates/high-priority/hp-pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,14 @@ spec:
matchLabels:
{{- include "hp.selector.labels" . | nindent 6 }}
{{- if .Values.argoRollouts.enabled }}
{{- with .Values.argoRollouts.progressiveDelivery }}
{{- toYaml .stableMetadata.labels| nindent 6 }}
{{- if .Values.argoRollouts.progressiveDelivery.enabled }}
{{- with .Values.argoRollouts.progressiveDelivery }}
{{- toYaml .stableMetadata.labels | nindent 6 }}
{{- end }}
{{else}}
{{- with .Values.argoRollouts.activeMetadata }}
{{- toYaml .labels | nindent 6 }}
{{- end }}
{{- with .Values.argoRollouts.activeMetadata }}
{{- toYaml .labels | nindent 6 }}
{{- end }}
{{- end }}
{{- end }}
Expand Down
42 changes: 21 additions & 21 deletions common/unified-chart/templates/high-priority/hp-rollout.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,30 +16,30 @@ spec:
{{- include "hp.selector.labels" . | nindent 6 }}
strategy:
{{- if .Values.argoRollouts.progressiveDelivery.enabled }}
canary:
{{- with .Values.argoRollouts.progressiveDelivery }}
stableMetadata:
{{- toYaml .stableMetadata | nindent 12 }}
canaryMetadata:
{{- toYaml .canaryMetadata| nindent 12 }}
canary:
{{- with .Values.argoRollouts.progressiveDelivery }}
stableMetadata:
{{- toYaml .stableMetadata | nindent 8 }}
canaryMetadata:
{{- toYaml .canaryMetadata| nindent 8 }}
{{- end }}
canaryService: {{ include "hp.name" . }}-canary
stableService: {{ include "hp.name" . }}-stable
trafficRouting:
plugins:
argoproj-labs/gatewayAPI:
httpRoute: {{ include "hp.name" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.argoRollouts.progressiveDelivery.steps }}
steps:
{{- toYaml . | nindent 12 }}
{{- end }}
canaryService: {{ include "hp.name" . }}-canary
stableService: {{ include "hp.name" . }}-stable
trafficRouting:
plugins:
argoproj-labs/gatewayAPI:
httpRoute: {{ include "hp.name" . }}
namespace: {{ .Release.Namespace }}
{{- with .Values.argoRollouts.progressiveDelivery.steps }}
steps:
{{- toYaml . | nindent 12 }}
{{- end }}
{{- else}}
blueGreen:
{{- with .Values.argoRollouts.activeMetadata }}
blueGreen:
{{- with .Values.argoRollouts.activeMetadata }}
activeMetadata:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- toYaml . | nindent 8 }}
{{- end }}
activeService: {{ include "hp.name" . }}
autoPromotionEnabled: true
{{- end}}
Expand Down
12 changes: 8 additions & 4 deletions common/unified-chart/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ nameSuffix: v2

argoRollouts:
enabled: true
# activeMetadata:
# labels:
# role: active
activeMetadata:
labels:
role: active
progressiveDelivery:
enabled: true
stableMetadata:
Expand All @@ -23,7 +23,11 @@ argoRollouts:
labels:
role: canary
blackBox:
url: http://nexus.default.svc.cluster.local:8080/blackbox
url: http://nexus.default.svc.cluster.local/blackbox
timeout: 1200
headers:
- key: Content-Type
value: "application/json"
steps:
- pause: {}
- setWeight: 100
Expand Down

0 comments on commit 8fc8756

Please sign in to comment.