Skip to content

Commit 7e52ee9

Browse files
authored
Fluentd minor fix (#2975)
* Fluentd minor fix
1 parent 1561211 commit 7e52ee9

File tree

3 files changed

+21
-14
lines changed

3 files changed

+21
-14
lines changed

integration-tests/src/test/java/oracle/weblogic/domain/DomainSpec.java

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,13 @@ public class DomainSpec {
135135
*
136136
*/
137137
@ApiModelProperty("Automatic fluentd sidecar injection. If "
138-
+ "specified, the operator "
139-
+ "will deploy a sidecar container alongside each WebLogic Server instance that runs the exporter. "
140-
+ "WebLogic Server instances that are already running when the `monitoringExporter` field is created "
141-
+ "or deleted, will not be affected until they are restarted. When any given server "
142-
+ "is restarted for another reason, such as a change to the `restartVersion`, then the newly created pod "
143-
+ " will have the fluentd sidecar or not, as appropriate")
138+
+ "specified, the operator "
139+
+ "will deploy a sidecar container alongside each WebLogic Server instance that runs the fluentd, "
140+
+ "Optionally, the introspector job pod can be enabled to deploy with the fluentd sidecar container. "
141+
+ "WebLogic Server instances that are already running when the `fluentdSpecification` field is created "
142+
+ "or deleted, will not be affected until they are restarted. When any given server "
143+
+ "is restarted for another reason, such as a change to the `restartVersion`, then the newly created pod "
144+
+ " will have the fluentd sidecar or not, as appropriate")
144145
private FluentdSpecification fluentdSpecification;
145146

146147
public FluentdSpecification getFluentdSpecification() {
@@ -816,7 +817,8 @@ public String toString() {
816817
.append("serverPod", serverPod)
817818
.append("serverService", serverService)
818819
.append("restartVersion", restartVersion)
819-
.append("monitoringExporter", monitoringExporter);
820+
.append("monitoringExporter", monitoringExporter)
821+
.append("fluentdSpecification", fluentdSpecification);
820822

821823
return builder.toString();
822824
}
@@ -853,7 +855,8 @@ public int hashCode() {
853855
.append(serverService)
854856
.append(serverStartState)
855857
.append(restartVersion)
856-
.append(monitoringExporter);
858+
.append(monitoringExporter)
859+
.append(fluentdSpecification);
857860

858861
return builder.toHashCode();
859862
}
@@ -898,7 +901,8 @@ public boolean equals(Object other) {
898901
.append(serverService, rhs.serverService)
899902
.append(serverStartState, rhs.serverStartState)
900903
.append(restartVersion, rhs.restartVersion)
901-
.append(monitoringExporter, rhs.monitoringExporter);
904+
.append(monitoringExporter, rhs.monitoringExporter)
905+
.append(fluentdSpecification, rhs.fluentdSpecification);
902906
return builder.isEquals();
903907
}
904908
}

integration-tests/src/test/java/oracle/weblogic/kubernetes/ItElasticLoggingFluentd.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ public static void init(@Namespaces(3) List<String> namespaces) {
189189
String.format("Failed to upgrade operator in namespace %s", opNamespace));
190190

191191
// create fluentd configuration
192-
//configFluentd();
193192

194193
// create and verify WebLogic domain image using model in image with model files
195194
String imageName = createAndVerifyDomainImage();
@@ -293,7 +292,8 @@ private boolean queryAndVerify() {
293292
String queryCriteria1 = "/_search?q=filesource:introspectDomain.sh";
294293
String results1 = execSearchQuery(queryCriteria1, INTROSPECTOR_INDEX_KEY);
295294
logger.info("/_search?q=filesource:introspectDomain.sh ===> {0}", results1);
296-
boolean jobCompeted = results1.contains("Domain introspection complete");
295+
// as long as there is something returned
296+
boolean jobCompeted = results1.contains("introspectDomain.sh");
297297
logger.info("found completed job " + jobCompeted);
298298

299299
return count > 0 && failedCount == 0 && jobCompeted;

operator/src/main/java/oracle/kubernetes/weblogic/domain/model/DomainSpec.java

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1043,7 +1043,8 @@ public String toString() {
10431043
.append("monitoringExporter", monitoringExporter)
10441044
.append("replicas", replicas)
10451045
.append("serverStartPolicy", serverStartPolicy)
1046-
.append("webLogicCredentialsSecret", webLogicCredentialsSecret);
1046+
.append("webLogicCredentialsSecret", webLogicCredentialsSecret)
1047+
.append("fluentdSpecification", fluentdSpecification);
10471048

10481049
return builder.toString();
10491050
}
@@ -1076,7 +1077,8 @@ public int hashCode() {
10761077
.append(monitoringExporter)
10771078
.append(replicas)
10781079
.append(serverStartPolicy)
1079-
.append(webLogicCredentialsSecret);
1080+
.append(webLogicCredentialsSecret)
1081+
.append(fluentdSpecification);
10801082

10811083
return builder.toHashCode();
10821084
}
@@ -1117,7 +1119,8 @@ public boolean equals(Object other) {
11171119
.append(configOverrideSecrets, rhs.configOverrideSecrets)
11181120
.append(isAllowReplicasBelowMinDynClusterSize(), rhs.isAllowReplicasBelowMinDynClusterSize())
11191121
.append(getMaxClusterConcurrentStartup(), rhs.getMaxClusterConcurrentStartup())
1120-
.append(getMaxClusterConcurrentShutdown(), rhs.getMaxClusterConcurrentShutdown());
1122+
.append(getMaxClusterConcurrentShutdown(), rhs.getMaxClusterConcurrentShutdown())
1123+
.append(fluentdSpecification, rhs.getFluentdSpecification());
11211124
return builder.isEquals();
11221125
}
11231126

0 commit comments

Comments
 (0)