|
45 | 45 | import oracle.kubernetes.weblogic.domain.model.DomainSpec;
|
46 | 46 | import oracle.kubernetes.weblogic.domain.model.DomainStatus;
|
47 | 47 | import oracle.kubernetes.weblogic.domain.model.IntrospectorJobEnvVars;
|
| 48 | +import oracle.kubernetes.weblogic.domain.model.Istio; |
48 | 49 | import oracle.kubernetes.weblogic.domain.model.Server;
|
49 | 50 | import oracle.kubernetes.weblogic.domain.model.ServerEnvVars;
|
50 | 51 | import org.jetbrains.annotations.Nullable;
|
@@ -335,8 +336,17 @@ List<V1EnvVar> getConfiguredEnvVars(TuningParameters tuningParameters) {
|
335 | 336 | addEnvVar(vars, IntrospectorJobEnvVars.ISTIO_READINESS_PORT, Integer.toString(getIstioReadinessPort()));
|
336 | 337 | addEnvVar(vars, IntrospectorJobEnvVars.ISTIO_POD_NAMESPACE, getNamespace());
|
337 | 338 | if (isIstioEnabled()) {
|
338 |
| - addEnvVar(vars, IntrospectorJobEnvVars.ISTIO_VERSION, getIstioVersion()); |
339 |
| - addEnvVar(vars, IntrospectorJobEnvVars.ISTIO_REPLICATION_PORT, Integer.toString(getIstioReplicationPort())); |
| 339 | + // Only add the following Istio configuration environment variables when explicitly configured |
| 340 | + // otherwise the introspection job will needlessly run, after operator upgrade, based on generated |
| 341 | + // hash code of the set of environment variables. |
| 342 | + String istioVersion = getIstioVersion(); |
| 343 | + if (istioVersion != null && !istioVersion.isEmpty()) { |
| 344 | + addEnvVar(vars, IntrospectorJobEnvVars.ISTIO_VERSION, getIstioVersion()); |
| 345 | + } |
| 346 | + |
| 347 | + if (getIstioReplicationPort() != Istio.DEFAULT_REPLICATION_PORT) { |
| 348 | + addEnvVar(vars, IntrospectorJobEnvVars.ISTIO_REPLICATION_PORT, Integer.toString(getIstioReplicationPort())); |
| 349 | + } |
340 | 350 | }
|
341 | 351 | if (isUseOnlineUpdate()) {
|
342 | 352 | addEnvVar(vars, IntrospectorJobEnvVars.MII_USE_ONLINE_UPDATE, "true");
|
|
0 commit comments