@@ -4,33 +4,120 @@ locals {
44 enabled = local.helm_releases[index (local. helm_releases . * . id , " istio-operator" )].enabled
55 chart = local.helm_releases[index (local. helm_releases . * . id , " istio-operator" )].chart
66 repository = local.helm_releases[index (local. helm_releases . * . id , " istio-operator" )].repository
7- chart_version = local.helm_releases[index (local. helm_releases . * . id , " istio-operator" )].version
7+ chart_version = local.helm_releases[index (local. helm_releases . * . id , " istio-operator" )].chart_version
88 namespace = local.helm_releases[index (local. helm_releases . * . id , " istio-operator" )].namespace
99 }
1010 istio_operator_resources = {
1111 name = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].id
1212 enabled = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].enabled
1313 chart = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].chart
1414 repository = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].repository
15- chart_version = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].version
15+ chart_version = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].chart_version
1616 namespace = local.helm_releases[index (local. helm_releases . * . id , " istio-operator-resources" )].namespace
1717 }
1818 istio_resources = {
1919 name = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].id
2020 enabled = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].enabled
2121 chart = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].chart
2222 repository = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].repository
23- chart_version = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].version
23+ chart_version = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].chart_version
2424 namespace = local.helm_releases[index (local. helm_releases . * . id , " istio-resources" )].namespace
2525 }
2626 kiali_server = {
2727 name = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].id
2828 enabled = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].enabled
2929 chart = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].chart
3030 repository = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].repository
31- chart_version = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].version
31+ chart_version = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].chart_version
3232 namespace = local.helm_releases[index (local. helm_releases . * . id , " kiali" )].namespace
3333 }
34+ istio_operator_values = << VALUES
35+ hub: docker.io/istio
36+ tag: 1.8.1
37+ operatorNamespace: istio-operator
38+ watchedNamespaces: istio-system
39+ VALUES
40+ istio_operator_default_profile_values = << VALUES
41+ istioOperator:
42+ components:
43+ pilot:
44+ k8s:
45+ resources:
46+ requests:
47+ cpu: "500m"
48+ memory: "2Gi"
49+ limits:
50+ cpu: "500m"
51+ memory: "2Gi"
52+ ingressGateways:
53+ - name: istio-ingressgateway
54+ enabled: true
55+ k8s:
56+ serviceAnnotations:
57+ service.beta.kubernetes.io/aws-load-balancer-internal: "true" #Internal LB will be run
58+ service:
59+ ports:
60+ - port: 15021
61+ targetPort: 15021
62+ name: status-port
63+ protocol: TCP
64+ - port: 5100
65+ targetPort: 5100
66+ name: grpc
67+ protocol: TCP
68+ egressGateways:
69+ - name: istio-egressgateway
70+ enabled: false
71+ meshConfig:
72+ defaultConfig:
73+ holdApplicationUntilProxyStarts: true
74+ proxyStatsMatcher:
75+ inclusionRegexps:
76+ - .*circuit_breakers.*
77+ inclusionPrefixes:
78+ - upstream_rq_retry
79+ - upstream_cx
80+ # accessLogFile: /dev/stdout #Uncomment this if you want to get Envoy logs
81+
82+ values:
83+ global:
84+ proxy:
85+ # This controls the default 'policy' in the sidecar injector.
86+ autoInject: disabled # we don't inject sidecar by default even if namespace is annotated.
87+ sidecarInjectorWebhook:
88+ injectedAnnotations:
89+ cluster-autoscaler.kubernetes.io/safe-to-evict: true # https://github.com/kubeflow/pipelines/issues/4530
90+ VALUES
91+ istio_resources_values = << VALUES
92+ # We create istio resource 'Gateway' with name 'ingress-gateway' and open port 5100 for all vhosts. This configuration is related to istio-ingressgateway settings
93+ ingressGateway:
94+ enabled: true
95+ servers:
96+ - port:
97+ number: 5100
98+ name: grpc
99+ protocol: GRPC
100+ hosts:
101+ - "*"
102+ VALUES
103+ kiali_server_values = << VALUES
104+ nameOverride: "kiali"
105+ fullnameOverride: "kiali"
106+ external_services:
107+ custom_dashboards:
108+ enabled: true
109+ prometheus:
110+ url: http://kube-prometheus-stack-prometheus.monitoring:9090
111+ custom_metrics_url: http://kube-prometheus-stack-prometheus.monitoring:9090
112+ grafana:
113+ url: http://kube-prometheus-stack-grafana.monitoring
114+ namespace_label: kubernetes_namespace
115+ server:
116+ port: 20001
117+ metrics_enabled: true
118+ metrics_port: 9090
119+ web_root: ""
120+ VALUES
34121}
35122
36123module "istio_system_namespace" {
@@ -57,7 +144,7 @@ resource "helm_release" "istio_operator" {
57144 max_history = var. helm_release_history_size
58145
59146 values = [
60- file ( " ${ path . module } /templates/istio/istio-operator-values.yaml " )
147+ local . istio_operator_values
61148 ]
62149
63150}
@@ -73,7 +160,7 @@ resource "helm_release" "istio_operator_resources" {
73160 max_history = var. helm_release_history_size
74161
75162 values = [
76- file ( " ${ path . module } /templates/istio/istio-resources-values.yaml " )
163+ local . istio_operator_default_profile_values
77164 ]
78165
79166 depends_on = [helm_release . istio_operator , helm_release . prometheus_operator ]
@@ -98,7 +185,7 @@ resource "helm_release" "istio_resources" {
98185 max_history = var. helm_release_history_size
99186
100187 values = [
101- file ( " ${ path . module } /templates/istio/istio-resources-values.yaml " )
188+ local . istio_resources_values
102189 ]
103190
104191 depends_on = [time_sleep . wait_10_seconds ]
@@ -115,7 +202,7 @@ resource "helm_release" "kiali" {
115202 max_history = var. helm_release_history_size
116203
117204 values = [
118- file ( " ${ path . module } /templates/istio/istio-kiali-values.yaml " )
205+ local . kiali_server_values
119206 ]
120207
121208 depends_on = [helm_release . istio_operator , helm_release . prometheus_operator ]
0 commit comments