Skip to content

Commit

Permalink
[VDEVOPS-000]: Fix gt comparision
Browse files Browse the repository at this point in the history
Signed-off-by: adobrodey <[email protected]>
  • Loading branch information
ADobrodey committed Apr 4, 2024
1 parent a0c9f04 commit 51a3a72
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion stable/deployment/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
apiVersion: v2
name: deployment
version: 1.7.1
version: 1.7.2
description: Typical microservice chart. Supports Ingress controller, horizontal-scalable containers
type: application
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion stable/deployment/templates/ingress-extra.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ metadata:
{{- if .Values.ingressExtra.annotations }}
{{- include "k8s-common.tplvalues.render" ( dict "value" .Values.ingressExtra.annotations "context" $ ) | nindent 4 }}
{{- end }}
{{- if gt .Values.ingress.stickiness 0 }}
{{- if gt (int .Values.ingress.stickiness) 0 }}
alb.ingress.kubernetes.io/target-group-attributes: stickiness.enabled=true,stickiness.lb_cookie.duration_seconds={{ .Values.ingress.stickiness }}
alb.ingress.kubernetes.io/actions.weighted-routing: |
{
Expand Down
4 changes: 2 additions & 2 deletions stable/deployment/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
{{- if and .Values.ingress.enabled .Values.service.enabled ( eq .Values.service.type "ClusterIP") -}}
{{- $serviceName := ternary "weighted-routing" (include "k8s-common.ingress.serviceName" .) (gt .Values.ingress.stickiness 0) }}
{{- $serviceName := ternary "weighted-routing" (include "k8s-common.ingress.serviceName" .) (gt (int .Values.ingress.stickiness) 0) }}
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
Expand Down Expand Up @@ -47,7 +47,7 @@ spec:
backend: {{- include "k8s-common.ingress.backend" (dict "serviceName" "ssl-redirect" "servicePort" "use-annotation" "context" $) | nindent 14 }}
- path: {{ .Values.ingress.path }}
pathType: {{ .Values.ingress.pathType }}
{{- if gt .Values.ingress.stickiness 0 }}
{{- if gt (int .Values.ingress.stickiness) 0 }}
backend: {{- include "k8s-common.ingress.backend" (dict "serviceName" "weighted-routing" "servicePort" "use-annotation" "context" $) | nindent 14 }}
{{- else }}
{{- if and (eq .Values.rollouts.strategy "canary") .Values.rollouts.enabled }}
Expand Down

0 comments on commit 51a3a72

Please sign in to comment.