77 lines
2.1 KiB
YAML
77 lines
2.1 KiB
YAML
{{- if eq .Values.citrixCPX true }}
|
|
apiVersion: autoscaling/v2beta1
|
|
kind: HorizontalPodAutoscaler
|
|
metadata:
|
|
name: {{ template "generate-name" (list . (dict "suffixname" "citrix-ingress-hpa")) }}
|
|
namespace: {{ .Release.Namespace }}
|
|
spec:
|
|
maxReplicas: 1
|
|
minReplicas: 1
|
|
scaleTargetRef:
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
name: {{ template "generate-name" (list . (dict "suffixname" "ingress-deployment")) }}
|
|
metrics:
|
|
- type: Resource
|
|
resource:
|
|
name: cpu
|
|
targetAverageUtilization: 60
|
|
---
|
|
{{- end }}
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: {{ template "generate-name" (list . (dict "suffixname" "citrix-ingress-svc")) }}
|
|
namespace: {{ .Release.Namespace }}
|
|
annotations:
|
|
labels:
|
|
app: {{ .Values.ingressGateway.label | default "citrix-ingressgateway" }}
|
|
{{- if eq .Values.citrixCPX true }}
|
|
deployment: "cpx-ingressgateway" # This label is useful in ServiceGraph
|
|
{{- end }}
|
|
spec:
|
|
{{- if eq .Values.citrixCPX true }}
|
|
{{- if eq .Values.ingressGateway.nodePortRequired true }}
|
|
type: NodePort
|
|
{{- else }}
|
|
type: LoadBalancer
|
|
{{- end }}
|
|
{{- end }}
|
|
selector:
|
|
app: {{ .Values.ingressGateway.label | default "citrix-ingressgateway" }}
|
|
ports:
|
|
-
|
|
name: http2
|
|
{{- if eq .Values.citrixCPX true }}
|
|
nodePort: {{ .Values.ingressGateway.httpNodePort }}
|
|
{{- end }}
|
|
port: 80
|
|
targetPort: 80
|
|
-
|
|
name: https
|
|
{{- if eq .Values.citrixCPX true }}
|
|
nodePort: {{ .Values.ingressGateway.httpsNodePort }}
|
|
{{- end }}
|
|
port: 443
|
|
targetPort: 443
|
|
{{- if eq .Values.ingressGateway.multiClusterIngress true }}
|
|
-
|
|
name: multicluster
|
|
{{- if eq .Values.citrixCPX true }}
|
|
nodePort: {{ .Values.ingressGateway.multiClusterListenerNodePort }}
|
|
{{- end }}
|
|
port: {{ .Values.ingressGateway.multiClusterListenerPort }}
|
|
targetPort: {{ .Values.ingressGateway.multiClusterListenerPort }}
|
|
{{- end }}
|
|
{{- $isCPX := .Values.citrixCPX }}
|
|
{{- range .Values.ingressGateway.tcpPort }}
|
|
-
|
|
name: {{ .name }}
|
|
{{- if eq $isCPX true }}
|
|
nodePort: {{ .nodePort }}
|
|
{{- end }}
|
|
port: {{ .port }}
|
|
targetPort: {{ .targetPort }}
|
|
{{- end }}
|
|
---
|