This repository was archived by the owner on Jul 11, 2023. It is now read-only.
File tree 4 files changed +22
-8
lines changed
4 files changed +22
-8
lines changed Original file line number Diff line number Diff line change 94
94
valueFrom :
95
95
fieldRef :
96
96
fieldPath : metadata.name
97
+ - name : OSM_ENVOY_IMAGE
98
+ value : " {{ .Values.osm.sidecarImage }}"
99
+ - name : OSM_ENVOY_WINDOWS_IMAGE
100
+ value : " {{ .Values.osm.sidecarWindowsImage }}"
101
+ - name : OSM_INIT_CONTAINER_IMAGE
102
+ value : ' {{ include "osmSidecarInit.image" . }}'
97
103
{{- if .Values.osm.imagePullSecrets }}
98
104
imagePullSecrets :
99
105
{{ toYaml .Values.osm.imagePullSecrets | indent 8 }}
Original file line number Diff line number Diff line change 10
10
"enablePrivilegedInitContainer": {{.Values.osm.enablePrivilegedInitContainer | mustToJson}},
11
11
"logLevel": {{.Values.osm.envoyLogLevel | mustToJson}},
12
12
"maxDataPlaneConnections": {{.Values.osm.maxDataPlaneConnections | mustToJson}},
13
- "envoyImage": {{.Values.osm.sidecarImage | mustToJson}},
14
- "envoyWindowsImage": {{.Values.osm.sidecarWindowsImage | mustToJson}},
15
- "initContainerImage": "{{ include "osmSidecarInit.image" . }}",
16
13
"configResyncInterval": {{.Values.osm.configResyncInterval | mustToJson}}
17
14
},
18
15
"traffic": {
Original file line number Diff line number Diff line change 66
66
envoyImage :
67
67
description : Image for the Envoy sidecar
68
68
type : string
69
- default : " envoyproxy/envoy-alpine@sha256:6502a637c6c5fba4d03d0672d878d12da4bcc7a0d0fb3f1d506982dde0039abd"
70
69
envoyWindowsImage :
71
70
description : Image for the Envoy sidecar on Windows workers
72
71
type : string
73
- default : " envoyproxy/envoy-windows@sha256:c904fda95891ebbccb9b1f24c1a9482c8d01cbca215dd081fc8c8db36db85f85"
74
72
initContainerImage :
75
73
description : Image for the init container
76
74
type : string
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package configurator
3
3
import (
4
4
"encoding/json"
5
5
"fmt"
6
+ "os"
6
7
"time"
7
8
8
9
corev1 "k8s.io/api/core/v1"
@@ -124,17 +125,29 @@ func (c *client) GetEnvoyLogLevel() string {
124
125
125
126
// GetEnvoyImage returns the envoy image
126
127
func (c * client ) GetEnvoyImage () string {
127
- return c .getMeshConfig ().Spec .Sidecar .EnvoyImage
128
+ image := c .getMeshConfig ().Spec .Sidecar .EnvoyImage
129
+ if image == "" {
130
+ image = os .Getenv ("OSM_ENVOY_IMAGE" )
131
+ }
132
+ return image
128
133
}
129
134
130
135
// GetEnvoyWindowsImage returns the envoy windows image
131
136
func (c * client ) GetEnvoyWindowsImage () string {
132
- return c .getMeshConfig ().Spec .Sidecar .EnvoyWindowsImage
137
+ image := c .getMeshConfig ().Spec .Sidecar .EnvoyWindowsImage
138
+ if image == "" {
139
+ image = os .Getenv ("OSM_ENVOY_WINDOWS_IMAGE" )
140
+ }
141
+ return image
133
142
}
134
143
135
144
// GetInitContainerImage returns the init container image
136
145
func (c * client ) GetInitContainerImage () string {
137
- return c .getMeshConfig ().Spec .Sidecar .InitContainerImage
146
+ image := c .getMeshConfig ().Spec .Sidecar .InitContainerImage
147
+ if image == "" {
148
+ image = os .Getenv ("OSM_INIT_CONTAINER_IMAGE" )
149
+ }
150
+ return image
138
151
}
139
152
140
153
// GetServiceCertValidityPeriod returns the validity duration for service certificates, and a default in case of invalid duration
You can’t perform that action at this time.
0 commit comments