Skip to content

Commit 9e392aa

Browse files
authored
update istio and expose istiod chart values in the configuration (#3388)
[static] Signed-off-by: Mateusz Błażejewski <mateusz.blazejewski@digitalasset.com>
1 parent 7de903e commit 9e392aa

File tree

4 files changed

+92
-68
lines changed

4 files changed

+92
-68
lines changed

cluster/deployment/mock/config.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,17 @@ infra:
233233
spec:
234234
key: value
235235
anotherKey: anotherValue
236+
istio:
237+
istiodValues: # example istiod overrides
238+
global:
239+
proxy:
240+
resources:
241+
requests:
242+
cpu: 500m
243+
memory: 512Mi
244+
limits:
245+
cpu: 2000m
246+
memory: 2Gi
236247
cluster:
237248
nodePools:
238249
apps:

cluster/expected/infra/expected.json

Lines changed: 16 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1669,7 +1669,7 @@
16691669
"istioNamespace": "cluster-ingress"
16701670
}
16711671
},
1672-
"version": "1.26.1"
1672+
"version": "1.28.1"
16731673
},
16741674
"name": "istio-base",
16751675
"provider": "",
@@ -1889,7 +1889,7 @@
18891889
}
18901890
]
18911891
},
1892-
"version": "1.26.1"
1892+
"version": "1.28.1"
18931893
},
18941894
"name": "istio-ingress-cometbft",
18951895
"provider": "",
@@ -2073,7 +2073,7 @@
20732073
}
20742074
]
20752075
},
2076-
"version": "1.26.1"
2076+
"version": "1.28.1"
20772077
},
20782078
"name": "istio-ingress",
20792079
"provider": "",
@@ -2277,7 +2277,12 @@
22772277
"excludeOutboundPorts": "5432,26657",
22782278
"resources": {
22792279
"limits": {
2280-
"memory": "4096Mi"
2280+
"cpu": "2000m",
2281+
"memory": "2Gi"
2282+
},
2283+
"requests": {
2284+
"cpu": "500m",
2285+
"memory": "512Mi"
22812286
}
22822287
}
22832288
}
@@ -2313,7 +2318,7 @@
23132318
}
23142319
]
23152320
},
2316-
"version": "1.26.1"
2321+
"version": "1.28.1"
23172322
},
23182323
"name": "istiod",
23192324
"provider": "",
@@ -2841,32 +2846,32 @@
28412846
"control_plane": {
28422847
"datasource": "Prometheus",
28432848
"gnetId": 7645,
2844-
"revision": 259
2849+
"revision": 280
28452850
},
28462851
"mesh": {
28472852
"datasource": "Prometheus",
28482853
"gnetId": 7639,
2849-
"revision": 259
2854+
"revision": 280
28502855
},
28512856
"performance": {
28522857
"datasource": "Prometheus",
28532858
"gnetId": 11829,
2854-
"revision": 259
2859+
"revision": 280
28552860
},
28562861
"service": {
28572862
"datasource": "Prometheus",
28582863
"gnetId": 7636,
2859-
"revision": 259
2864+
"revision": 280
28602865
},
28612866
"wasm": {
28622867
"datasource": "Prometheus",
28632868
"gnetId": 13277,
2864-
"revision": 216
2869+
"revision": 237
28652870
},
28662871
"workload": {
28672872
"datasource": "Prometheus",
28682873
"gnetId": 7630,
2869-
"revision": 259
2874+
"revision": 280
28702875
}
28712876
},
28722877
"k6s": {

cluster/pulumi/infra/src/config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ export const InfraConfigSchema = z.object({
102102
istio: z.object({
103103
enableIngressAccessLogging: z.boolean(),
104104
enableClusterAccessLogging: z.boolean().default(false),
105+
istiodValues: z.object({}).catchall(z.any()).default({}),
105106
}),
106107
extraCustomResources: z.object({}).catchall(z.any()).default({}),
107108
}),

cluster/pulumi/infra/src/istio.ts

Lines changed: 64 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ import {
1010
import { cometBFTExternalPort } from '@lfdecentralizedtrust/splice-pulumi-common-sv/src/synchronizer/cometbftConfig';
1111
import { spliceConfig } from '@lfdecentralizedtrust/splice-pulumi-common/src/config/config';
1212
import { PodMonitor, ServiceMonitor } from '@lfdecentralizedtrust/splice-pulumi-common/src/metrics';
13+
import { mergeWith } from 'lodash';
1314

1415
import {
1516
CLUSTER_HOSTNAME,
@@ -27,11 +28,11 @@ import {
2728
import { clusterBasename, infraConfig, loadIPRanges } from './config';
2829

2930
export 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

Comments
 (0)