@@ -21,10 +21,17 @@ import (
21
21
)
22
22
23
23
const (
24
- defaultIncludeIPRanges = "*"
25
- defaultReplicaCount = 1
26
- defaultMinReplicas = 1
27
- defaultMaxReplicas = 5
24
+ defaultImageVersion = "1.0.5"
25
+ defaultPilotImage = "istio/pilot" + ":" + defaultImageVersion
26
+ defaultCitadelImage = "istio/citadel" + ":" + defaultImageVersion
27
+ defaultGalleyImage = "istio/galley" + ":" + defaultImageVersion
28
+ defaultMixerImage = "istio/mixer" + ":" + defaultImageVersion
29
+ defaultSidecarInjectorImage = "istio/sidecar_injector" + ":" + defaultImageVersion
30
+ defaultProxyImage = "istio/proxyv2" + ":" + defaultImageVersion
31
+ defaultIncludeIPRanges = "*"
32
+ defaultReplicaCount = 1
33
+ defaultMinReplicas = 1
34
+ defaultMaxReplicas = 5
28
35
)
29
36
30
37
func SetDefaults (config * Istio ) {
@@ -33,6 +40,9 @@ func SetDefaults(config *Istio) {
33
40
}
34
41
35
42
// Pilot config
43
+ if config .Spec .Pilot .Image == "" {
44
+ config .Spec .Pilot .Image = defaultPilotImage
45
+ }
36
46
if config .Spec .Pilot .ReplicaCount == 0 {
37
47
config .Spec .Pilot .ReplicaCount = defaultReplicaCount
38
48
}
@@ -44,11 +54,17 @@ func SetDefaults(config *Istio) {
44
54
}
45
55
46
56
// Citadel config
57
+ if config .Spec .Citadel .Image == "" {
58
+ config .Spec .Citadel .Image = defaultCitadelImage
59
+ }
47
60
if config .Spec .Citadel .ReplicaCount == 0 {
48
61
config .Spec .Citadel .ReplicaCount = defaultReplicaCount
49
62
}
50
63
51
64
// Galley config
65
+ if config .Spec .Galley .Image == "" {
66
+ config .Spec .Galley .Image = defaultGalleyImage
67
+ }
52
68
if config .Spec .Galley .ReplicaCount == 0 {
53
69
config .Spec .Galley .ReplicaCount = defaultReplicaCount
54
70
}
@@ -65,6 +81,9 @@ func SetDefaults(config *Istio) {
65
81
}
66
82
67
83
// Mixer config
84
+ if config .Spec .Mixer .Image == "" {
85
+ config .Spec .Mixer .Image = defaultMixerImage
86
+ }
68
87
if config .Spec .Mixer .ReplicaCount == 0 {
69
88
config .Spec .Mixer .ReplicaCount = defaultReplicaCount
70
89
}
@@ -76,26 +95,37 @@ func SetDefaults(config *Istio) {
76
95
}
77
96
78
97
// SidecarInjector config
98
+ if config .Spec .SidecarInjector .Image == "" {
99
+ config .Spec .SidecarInjector .Image = defaultSidecarInjectorImage
100
+ }
79
101
if config .Spec .SidecarInjector .ReplicaCount == 0 {
80
102
config .Spec .SidecarInjector .ReplicaCount = defaultReplicaCount
81
103
}
104
+
105
+ // Proxy config
106
+ if config .Spec .Proxy .Image == "" {
107
+ config .Spec .Proxy .Image = defaultProxyImage
108
+ }
82
109
}
83
110
84
111
// PilotConfiguration defines config options for Pilot
85
112
type PilotConfiguration struct {
86
- ReplicaCount int32 `json:"replicaCount,omitempty"`
87
- MinReplicas int32 `json:"minReplicas,omitempty"`
88
- MaxReplicas int32 `json:"maxReplicas,omitempty"`
113
+ Image string `json:"image,omitempty"`
114
+ ReplicaCount int32 `json:"replicaCount,omitempty"`
115
+ MinReplicas int32 `json:"minReplicas,omitempty"`
116
+ MaxReplicas int32 `json:"maxReplicas,omitempty"`
89
117
}
90
118
91
119
// CitadelConfiguration defines config options for Citadel
92
120
type CitadelConfiguration struct {
93
- ReplicaCount int32 `json:"replicaCount,omitempty"`
121
+ Image string `json:"image,omitempty"`
122
+ ReplicaCount int32 `json:"replicaCount,omitempty"`
94
123
}
95
124
96
125
// GalleyConfiguration defines config options for Galley
97
126
type GalleyConfiguration struct {
98
- ReplicaCount int32 `json:"replicaCount,omitempty"`
127
+ Image string `json:"image,omitempty"`
128
+ ReplicaCount int32 `json:"replicaCount,omitempty"`
99
129
}
100
130
101
131
// GatewaysConfiguration defines config options for Gateways
@@ -107,23 +137,37 @@ type GatewaysConfiguration struct {
107
137
108
138
// MixerConfiguration defines config options for Mixer
109
139
type MixerConfiguration struct {
110
- ReplicaCount int32 `json:"replicaCount,omitempty"`
111
- MinReplicas int32 `json:"minReplicas,omitempty"`
112
- MaxReplicas int32 `json:"maxReplicas,omitempty"`
140
+ Image string `json:"image,omitempty"`
141
+ ReplicaCount int32 `json:"replicaCount,omitempty"`
142
+ MinReplicas int32 `json:"minReplicas,omitempty"`
143
+ MaxReplicas int32 `json:"maxReplicas,omitempty"`
113
144
}
114
145
115
146
// SidecarInjectorConfiguration defines config options for SidecarInjector
116
147
type SidecarInjectorConfiguration struct {
117
- ReplicaCount int32 `json:"replicaCount,omitempty"`
148
+ Image string `json:"image,omitempty"`
149
+ ReplicaCount int32 `json:"replicaCount,omitempty"`
150
+ }
151
+
152
+ // ProxyConfiguration defines config options for Proxy
153
+ type ProxyConfiguration struct {
154
+ Image string `json:"image,omitempty"`
118
155
}
119
156
120
157
// IstioSpec defines the desired state of Istio
121
158
type IstioSpec struct {
122
- MTLS bool `json:"mtls"`
159
+ // MTLS enables or disables global mTLS
160
+ MTLS bool `json:"mtls"`
161
+
162
+ // IncludeIPRanges the range where to capture egress traffic
123
163
IncludeIPRanges string `json:"includeIPRanges,omitempty"`
164
+
165
+ // ExcludeIPRanges the range where not to capture egress traffic
124
166
ExcludeIPRanges string `json:"excludeIPRanges,omitempty"`
167
+
125
168
// List of namespaces to label with sidecar auto injection enabled
126
169
AutoInjectionNamespaces []string `json:"autoInjectionNamespaces,omitempty"`
170
+
127
171
// ControlPlaneSecurityEnabled control plane services are communicating through mTLS
128
172
ControlPlaneSecurityEnabled bool `json:"controlPlaneSecurityEnabled,omitempty"`
129
173
@@ -144,6 +188,9 @@ type IstioSpec struct {
144
188
145
189
// SidecarInjector configuration options
146
190
SidecarInjector SidecarInjectorConfiguration `json:"sidecarInjector,omitempty"`
191
+
192
+ // Proxy configuration options
193
+ Proxy ProxyConfiguration `json:"proxy,omitempty"`
147
194
}
148
195
149
196
// IstioStatus defines the observed state of Istio
0 commit comments