-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
26e24b4
commit 00b8e0e
Showing
12 changed files
with
224 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 11 additions & 0 deletions
11
src/main/java/org/jboss/windup/operator/AppServerConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package org.jboss.windup.operator; | ||
|
||
import lombok.Builder; | ||
import lombok.Data; | ||
|
||
@Data | ||
@Builder | ||
public class AppServerConfig { | ||
private String[] webLivenessProbeCmd; | ||
private String[] webReadinessProbeCmd; | ||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/org/jboss/windup/operator/AppServerConfigProducer.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package org.jboss.windup.operator; | ||
|
||
import io.quarkus.arc.DefaultBean; | ||
import io.quarkus.arc.profile.IfBuildProfile; | ||
|
||
import javax.enterprise.context.Dependent; | ||
import javax.enterprise.inject.Produces; | ||
|
||
@Dependent | ||
public class AppServerConfigProducer { | ||
|
||
@Produces | ||
@DefaultBean | ||
public AppServerConfig wildflyConfig() { | ||
return AppServerConfig.builder() | ||
.webLivenessProbeCmd(new String[]{"/bin/sh", "-c", "${JBOSS_HOME}/bin/jboss-cli.sh --connect --commands=ls | grep 'server-state=running'"}) | ||
.webReadinessProbeCmd(new String[]{"/bin/sh", "-c", "${JBOSS_HOME}/bin/jboss-cli.sh --connect --commands='ls deployment' | grep 'api.war'"}) | ||
.build(); | ||
} | ||
|
||
@Produces | ||
@IfBuildProfile("eap") | ||
public AppServerConfig eapConfig() { | ||
return AppServerConfig.builder() | ||
.webLivenessProbeCmd(new String[]{"/bin/sh", "-c", "/opt/eap/bin/livenessProbe.sh"}) | ||
.webReadinessProbeCmd(new String[]{"/bin/sh", "-c", "/opt/eap/bin/readinessProbe.sh"}) | ||
.build(); | ||
} | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.