@@ -10,6 +10,7 @@ import {
1010import { cometBFTExternalPort } from '@lfdecentralizedtrust/splice-pulumi-common-sv/src/synchronizer/cometbftConfig' ;
1111import { spliceConfig } from '@lfdecentralizedtrust/splice-pulumi-common/src/config/config' ;
1212import { PodMonitor , ServiceMonitor } from '@lfdecentralizedtrust/splice-pulumi-common/src/metrics' ;
13+ import { mergeWith } from 'lodash' ;
1314
1415import {
1516 CLUSTER_HOSTNAME ,
@@ -27,11 +28,11 @@ import {
2728import { clusterBasename , infraConfig , loadIPRanges } from './config' ;
2829
2930export const istioVersion = {
30- istio : '1.26 .1' ,
31+ istio : '1.28 .1' ,
3132 // updated from https://grafana.com/orgs/istio/dashboards, must be updated on each istio version
3233 dashboards : {
33- general : 259 ,
34- wasm : 216 ,
34+ general : 280 ,
35+ wasm : 237 ,
3536 } ,
3637} ;
3738
@@ -69,6 +70,60 @@ function configureIstiod(
6970 ingressNs : k8s . core . v1 . Namespace ,
7071 base : k8s . helm . v3 . Release
7172) : k8s . helm . v3 . Release {
73+ // https://artifacthub.io/packages/helm/istio-official/istiod
74+ const defaultValues = {
75+ autoscaleMin : 2 ,
76+ autoscaleMax : 30 ,
77+ ...infraAffinityAndTolerations ,
78+ global : {
79+ istioNamespace : ingressNs . metadata . name ,
80+ logAsJson : true ,
81+ proxy : {
82+ // disable traffic proxying for the postgres port and CometBFT RPC port
83+ excludeInboundPorts : '5432,26657' ,
84+ excludeOutboundPorts : '5432,26657' ,
85+ resources : {
86+ limits : {
87+ memory : '4096Mi' ,
88+ } ,
89+ } ,
90+ } ,
91+ } ,
92+ // https://istio.io/latest/docs/reference/config/istio.mesh.v1alpha1/
93+ meshConfig : {
94+ // taken from https://github.com/istio/istio/issues/37682
95+ accessLogFile : infraConfig . istio . enableClusterAccessLogging ? '/dev/stdout' : '' ,
96+ accessLogEncoding : 'JSON' ,
97+ // https://istio.io/latest/docs/ops/integrations/prometheus/#option-1-metrics-merging disable as we don't use annotations
98+ enablePrometheusMerge : false ,
99+ defaultConfig : {
100+ // It is expected that a single load balancer (GCP NLB) is used in front of K8s.
101+ // https://istio.io/latest/docs/tasks/security/authorization/authz-ingress/#http-https
102+ // Also see:
103+ // https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/#configuring-x-forwarded-for-headers
104+ // This controls the value populated by the ingress gateway in the X-Envoy-External-Address header which can be reliably used
105+ // by the upstream services to access client’s original IP address.
106+ gatewayTopology : {
107+ numTrustedProxies : 1 ,
108+ } ,
109+ // wait for the istio container to start before starting apps to avoid network errors
110+ holdApplicationUntilProxyStarts : true ,
111+ } ,
112+ // We have clients retry so we disable istio’s automatic retries.
113+ defaultHttpRetryPolicy : {
114+ attempts : 0 ,
115+ } ,
116+ } ,
117+ telemetry : {
118+ enabled : true ,
119+ v2 : {
120+ enabled : true ,
121+ prometheus : {
122+ enabled : true ,
123+ } ,
124+ } ,
125+ } ,
126+ } ;
72127 const istiodRelease = new k8s . helm . v3 . Release (
73128 'istiod' ,
74129 {
@@ -79,60 +134,12 @@ function configureIstiod(
79134 repositoryOpts : {
80135 repo : 'https://istio-release.storage.googleapis.com/charts' ,
81136 } ,
82- // https://artifacthub.io/packages/helm/istio-official/istiod
83- values : {
84- autoscaleMin : 2 ,
85- autoscaleMax : 30 ,
86- ...infraAffinityAndTolerations ,
87- global : {
88- istioNamespace : ingressNs . metadata . name ,
89- logAsJson : true ,
90- proxy : {
91- // disable traffic proxying for the postgres port and CometBFT RPC port
92- excludeInboundPorts : '5432,26657' ,
93- excludeOutboundPorts : '5432,26657' ,
94- resources : {
95- limits : {
96- memory : '4096Mi' ,
97- } ,
98- } ,
99- } ,
100- } ,
101- // https://istio.io/latest/docs/reference/config/istio.mesh.v1alpha1/
102- meshConfig : {
103- // taken from https://github.com/istio/istio/issues/37682
104- accessLogFile : infraConfig . istio . enableClusterAccessLogging ? '/dev/stdout' : '' ,
105- accessLogEncoding : 'JSON' ,
106- // https://istio.io/latest/docs/ops/integrations/prometheus/#option-1-metrics-merging disable as we don't use annotations
107- enablePrometheusMerge : false ,
108- defaultConfig : {
109- // It is expected that a single load balancer (GCP NLB) is used in front of K8s.
110- // https://istio.io/latest/docs/tasks/security/authorization/authz-ingress/#http-https
111- // Also see:
112- // https://istio.io/latest/docs/ops/configuration/traffic-management/network-topologies/#configuring-x-forwarded-for-headers
113- // This controls the value populated by the ingress gateway in the X-Envoy-External-Address header which can be reliably used
114- // by the upstream services to access client’s original IP address.
115- gatewayTopology : {
116- numTrustedProxies : 1 ,
117- } ,
118- // wait for the istio container to start before starting apps to avoid network errors
119- holdApplicationUntilProxyStarts : true ,
120- } ,
121- // We have clients retry so we disable istio’s automatic retries.
122- defaultHttpRetryPolicy : {
123- attempts : 0 ,
124- } ,
125- } ,
126- telemetry : {
127- enabled : true ,
128- v2 : {
129- enabled : true ,
130- prometheus : {
131- enabled : true ,
132- } ,
133- } ,
134- } ,
135- } ,
137+ values : mergeWith (
138+ defaultValues ,
139+ infraConfig . istio . istiodValues ,
140+ ( _default : unknown , override : unknown ) =>
141+ Array . isArray ( _default ) || Array . isArray ( override ) ? override : undefined
142+ ) ,
136143 maxHistory : HELM_MAX_HISTORY_SIZE ,
137144 } ,
138145 {
0 commit comments