KubeZero/charts/kubezero-istio/templates/istio-private-ingress.yaml

134 lines
4.0 KiB
YAML
Raw Normal View History

{{- if .Values.ingress.private.enabled }}
2020-07-21 17:30:21 +00:00
apiVersion: install.istio.io/v1alpha1
kind: IstioOperator
metadata:
name: kubezero-istio-private-ingress
namespace: istio-system
2020-08-06 17:43:59 +00:00
labels:
{{ include "kubezero-lib.labels" . | indent 4 }}
2020-07-21 17:30:21 +00:00
spec:
profile: empty
components:
ingressGateways:
- name: istio-private-ingressgateway
enabled: true
namespace: istio-system
k8s:
2020-07-21 23:08:19 +00:00
replicaCount: {{ .Values.ingress.replicaCount }}
{{- if .Values.ingress.autoscaleEnabled }}
2020-07-21 17:30:21 +00:00
hpaSpec:
maxReplicas: 5
metrics:
- resource:
name: cpu
targetAverageUtilization: 80
type: Resource
minReplicas: 1
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: istio-private-ingressgateway
2020-07-21 23:08:19 +00:00
{{- end }}
env:
# https://github.com/istio/istio/issues/26524
#- name: TERMINATION_DRAIN_DURATION_SECONDS
# value: "60"
2020-07-21 23:08:19 +00:00
- name: ISTIO_META_HTTP10
value: '"1"'
- name: ISTIO_META_ROUTER_MODE
value: standard
2020-08-20 14:55:49 +00:00
- name: ISTIO_META_IDLE_TIMEOUT
2020-08-20 15:12:41 +00:00
value: "3600s"
{{- if eq .Values.ingress.type "NodePort" }}
2020-07-21 17:30:21 +00:00
nodeSelector:
2020-08-10 12:28:45 +00:00
node.kubernetes.io/ingress.private: "{{ .Values.ingress.private.nodeSelector }}"
{{- end }}
2020-07-21 17:30:21 +00:00
resources:
limits:
# cpu: 2000m
2020-07-21 17:30:21 +00:00
memory: 1024Mi
requests:
cpu: 100m
memory: 64Mi
2020-07-21 17:30:21 +00:00
strategy:
rollingUpdate:
maxSurge: 100%
maxUnavailable: 25%
overlays:
- apiVersion: apps/v1
kind: Deployment
name: istio-private-ingressgateway
patches:
- path: spec.template.spec.containers.[name:istio-proxy].lifecycle
value: {"preStop": {"exec": {"command": ["sh", "-c", "curl -X POST http://localhost:15000/healthcheck/fail && sleep 30"]}}}
- path: spec.template.spec.terminationGracePeriodSeconds
value: 90
2020-07-21 17:30:21 +00:00
values:
gateways:
istio-ingressgateway:
2020-07-21 23:08:19 +00:00
autoscaleEnabled: {{ .Values.ingress.autoscaleEnabled }}
2020-07-21 17:30:21 +00:00
externalTrafficPolicy: Local
labels:
app: istio-private-ingressgateway
istio: private-ingressgateway
meshExpansionPorts: []
podAntiAffinityLabelSelector:
- key: app
operator: In
topologyKey: kubernetes.io/hostname
2020-07-21 23:11:38 +00:00
values: istio-private-ingressgateway
type: {{ default "NodePort" .Values.ingress.type }}
2020-07-21 17:30:21 +00:00
ports:
- name: http-status
port: 15021
{{- if eq .Values.ingress.type "NodePort" }}
nodePort: 31021
{{- end }}
2020-07-21 17:30:21 +00:00
- name: http2
port: 80
{{- if eq .Values.ingress.type "NodePort" }}
nodePort: 31080
{{- end }}
2020-07-21 17:30:21 +00:00
- name: https
port: 443
{{- if eq .Values.ingress.type "NodePort" }}
nodePort: 31443
{{- end }}
- name: fluentd-forward
port: 24224
{{- if eq .Values.ingress.type "NodePort" }}
nodePort: 31224
{{- end }}
2020-07-21 17:30:21 +00:00
- name: amqps
port: 5671
{{- if eq .Values.ingress.type "NodePort" }}
nodePort: 31671
{{- end }}
- name: amqp
port: 5672
{{- if eq .Values.ingress.type "NodePort" }}
nodePort: 31672
{{- end }}
2020-07-21 17:30:21 +00:00
sds:
enabled: true
image: node-agent-k8s
resources:
limits:
cpu: 2000m
2020-07-21 17:30:21 +00:00
memory: 1024Mi
requests:
cpu: 100m
memory: 128Mi
2020-07-21 17:30:21 +00:00
secretVolumes:
- mountPath: /etc/istio/ingressgateway-certs
name: ingressgateway-certs
secretName: istio-ingressgateway-certs
- mountPath: /etc/istio/ingressgateway-ca-certs
name: ingressgateway-ca-certs
secretName: istio-ingressgateway-ca-certs
global:
jwtPolicy: first-party-jwt
{{- end }}