If else in helmchart


apiVersion: {{ .Values.env.INGRESS_API_VERSION }}
kind: Ingress
metadata:
name: service-name
annotations:
kubernetes.io/ingress.class: nginx

spec:
rules:
- host: {{ .Values.ingress.host | quote }}
http:
paths:
{{- if eq .Values.env.INGRESS_API_VERSION "networking.k8s.io/v1" }}
- path: "/"
backend:
service:
name: service-name
port:
number: 80
pathType: Prefix
{{- else if eq .Values.env.INGRESS_API_VERSION "extensions/v1beta1" }}
- path: "/"
backend:
serviceName: service-name
servicePort: http {{- end }} 

Comments

Popular posts from this blog

Fixing the DeepSpeed Import Error While Fine-Tuning the Qwen Model

Amazon Linux 2023 - User data configuration for launch templates to connect to the EKS cluster

How to create ISM policy and rotate logs in opensearch