diff --git a/documentation/4.0/content/managing-domains/accessing-the-domain/istio/istio.md b/documentation/4.0/content/managing-domains/accessing-the-domain/istio/istio.md index b7e6886fa5e..cc1b66b7cd4 100644 --- a/documentation/4.0/content/managing-domains/accessing-the-domain/istio/istio.md +++ b/documentation/4.0/content/managing-domains/accessing-the-domain/istio/istio.md @@ -175,7 +175,7 @@ spec: istio: ingressgateway servers: - hosts: - - '*' + - 'yourdomain.dns.com' port: name: http number: 80 @@ -190,7 +190,7 @@ spec: gateways: - domain1-gateway hosts: - - '*' + - 'yourdomain.dns.com' http: - match: - uri: @@ -416,13 +416,13 @@ See Istio [Destination Rule](https://istio.io/latest/docs/reference/config/netwo Ingress gateway provides similar functions to `Kubernetes Ingress` but with more advanced functionality. -For example, to configure an Ingress gateway for SSL termination at the gateway: +I. For example, to configure an Ingress gateway for SSL termination at the gateway: 1. Create a TLS certificate and secret. ```text $ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout /tmp/tls1.key -out /tmp/tls1.crt -subj "/CN=secure-domain.org" -$ kubectl -n weblogic-domain1 create secret tls domain1-tls-cert --key /tmp/tls1.key --cert /tmp/tls1.crt +$ kubectl -n istio-system create secret tls domain1-tls-cert --key /tmp/tls1.key --cert /tmp/tls1.crt ``` 2. Create the Ingress gateway. @@ -453,8 +453,36 @@ spec: hosts: - 'regular-domain.org' ``` + +If you are accessing the WebLogic Console through a secure gateway with SSL termination at the gateway level, enable + `WeblogicPluginEnabled` in the WebLogic domain and add the appropriate request headers. For example, + +If you are using WDT, add the `resources` section in the model YAML file. + +```text + resources: + WebAppContainer: + WeblogicPluginEnabled: true +``` + +If you are using WLST, set the `WeblogicPluginEnabled` for each server and cluster + +```text + set('WeblogicPluginEnabled',true) +``` -For example, to configure an Ingress gateway for SSL passthrough: +Set the request headers in the virtual service: (Use `kubectl explain virtualservice.spec.http.route.headers` for help) + +```text + headers: + request: + remove: ['WL-Proxy-Client-IP', 'WL-Proxy-SSL'] + set: + X-Forwarded-Proto: https + WL-Proxy-SSL: 'true' +``` + +II. For example, to configure an Ingress gateway for SSL passthrough: ```text @@ -483,4 +511,29 @@ spec: - 'regular-domain.org' ``` +The virtual service will then configure to match the `tls` rule. + +```text +apiVersion: networking.istio.io/v1alpha3 +kind: VirtualService +metadata: + name: sample-domain1-virtualservice + namespace: sample-domain1-ns +spec: + gateways: + - sample-domain1-gateway + hosts: + - secure-domain.org + tls: + - match: + - port: 443 + sniHosts: + - secure-domain.org + route: + - destination: + host: sample-domain1-admin-server + port: + number: 9002 +``` + See Istio [Ingress](https://istio.io/latest/docs/tasks/traffic-management/ingress). diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiClusterResource.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiClusterResource.java index c3af3fbef71..2fdf99574f9 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiClusterResource.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItMiiClusterResource.java @@ -32,6 +32,7 @@ import oracle.weblogic.kubernetes.annotations.IntegrationTest; import oracle.weblogic.kubernetes.annotations.Namespaces; import oracle.weblogic.kubernetes.logging.LoggingFacade; +import org.awaitility.core.ConditionFactory; import org.junit.jupiter.api.BeforeAll; import org.junit.jupiter.api.DisplayName; import org.junit.jupiter.api.MethodOrderer; @@ -67,6 +68,7 @@ import static oracle.weblogic.kubernetes.utils.ClusterUtils.stopCluster; import static oracle.weblogic.kubernetes.utils.CommonMiiTestUtils.verifyPodsNotRolled; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.checkPodReadyAndServiceExists; +import static oracle.weblogic.kubernetes.utils.CommonTestUtils.createCustomConditionFactory; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.getNextFreePort; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.testUntil; import static oracle.weblogic.kubernetes.utils.CommonTestUtils.withLongRetryPolicy; @@ -254,7 +256,8 @@ void testAddReplaceClusterResource() { //verify the introspector pod is created and runs String introspectPodNameBase2 = getIntrospectJobName(domainUid); - checkPodExists(introspectPodNameBase2, domainUid, domainNamespace); + ConditionFactory customConditionFactory = createCustomConditionFactory(0, 1, 5); + checkPodExists(customConditionFactory, introspectPodNameBase2, domainUid, domainNamespace); checkPodDoesNotExist(introspectPodNameBase2, domainUid, domainNamespace); // check managed server pods from cluster-1 are shutdown @@ -363,7 +366,8 @@ void testDomainStatusMatchesClusterResourceStatus() { //verify the introspector pod is created and runs String introspectPodNameBase2 = getIntrospectJobName(domainUid); - checkPodExists(introspectPodNameBase2, domainUid, domainNamespace); + ConditionFactory customConditionFactory = createCustomConditionFactory(0, 1, 5); + checkPodExists(customConditionFactory, introspectPodNameBase2, domainUid, domainNamespace); checkPodDoesNotExist(introspectPodNameBase2, domainUid, domainNamespace); // check managed server pods from cluster-1 are shutdown diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItRetryImprovements.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItRetryImprovements.java index af8e7fb8411..794a3fb232a 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItRetryImprovements.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/ItRetryImprovements.java @@ -404,11 +404,15 @@ void testRetryOccursAndErrorFromIntrospectorLoggedInOperator() throws Exception testUntil(() -> checkPodLogContainsRegex(createDomainFailedMsgRegex, operatorPodName, opNamespace), logger, "{0} is found in Operator log", createDomainFailedMsgRegex); - // verify that SEVERE and createDomainFailedMsgRegex message found in Operator log + // verify that SEVERE and createDomainFailedMsgRegex message found in introspector log testUntil(() -> checkInUncompletedIntroPodLogContainsRegex(createDomainFailedMsgRegex, domainUid, domainNamespace), logger, "{0} is found in introspector log", createDomainFailedMsgRegex); + // verify that SEVERE and createDomainFailedMsgRegex message found in domain status + testUntil(() -> findStringInDomainStatusMessage(domainNamespace, domainUid, createDomainFailedMsgRegex, "true"), + logger, "{0} is found in domain status message", createDomainFailedMsgRegex); + Callable configMapExist = assertDoesNotThrow(() -> configMapExist(domainNamespace, badModelFileCm)); if (configMapExist.call().booleanValue()) { diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java index e505ff422bb..eb6d131d6b5 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/CommonTestUtils.java @@ -129,6 +129,19 @@ private static ConditionFactory createStandardRetryPolicyWithAtMost(long minutes private static final String TMP_FILE_NAME = "temp-download-file.out"; + /** + * Create a condition factory with custom values for pollDelay, pollInterval and atMost time. + * + * @param polldelay starting delay before checking for the condition in seconds + * @param pollInterval interval time between checking for the condition in seconds + * @param atMostMinutes how long should it wait for the condition becomes true in minutes + * @return ConditionFactory custom condition factory + */ + public static ConditionFactory createCustomConditionFactory(int polldelay, int pollInterval, int atMostMinutes) { + return with().pollDelay(polldelay, SECONDS) + .and().with().pollInterval(pollInterval, SECONDS) + .atMost(atMostMinutes, MINUTES).await(); + } /** * Test assertion using standard retry policy over time until it passes or the timeout expires. diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/DomainUtils.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/DomainUtils.java index 6859d16fa74..a68a94c6fdc 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/DomainUtils.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/DomainUtils.java @@ -1212,14 +1212,25 @@ public static DomainResource getAndValidateInitialDomain(String domainNamespace, * @return true if regex found, false otherwise. */ @Nonnull - public static boolean findStringInDomainStatusMessage(String domainNamespace, String domainUid, String regex) { + public static boolean findStringInDomainStatusMessage(String domainNamespace, + String domainUid, + String regex, + String... multupleMessage) { // get the domain status message StringBuffer getDomainInfoCmd = new StringBuffer(KUBERNETES_CLI + " get domain/"); getDomainInfoCmd .append(domainUid) .append(" -n ") - .append(domainNamespace) - .append(" -o jsonpath='{.status.message}' --ignore-not-found"); + .append(domainNamespace); + + if (multupleMessage.length == 0) { + // get single field of domain message + getDomainInfoCmd.append(" -o jsonpath='{.status.message}' --ignore-not-found"); + } else { + // use [,] to get side by side multiple fields of the domain status message + getDomainInfoCmd.append(" -o jsonpath=\"{.status.conditions[*]['status', 'message']}\" --ignore-not-found"); + } + getLogger().info("Command to get domain status message: " + getDomainInfoCmd); CommandParams params = new CommandParams().defaults(); diff --git a/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/PodUtils.java b/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/PodUtils.java index b1c8357f73a..08fedf82427 100644 --- a/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/PodUtils.java +++ b/integration-tests/src/test/java/oracle/weblogic/kubernetes/utils/PodUtils.java @@ -94,6 +94,27 @@ public static void checkPodExists(String podName, String domainUid, String domai domainNamespace); } + /** + * Check pod exists in the specified namespace. + * + * @param conditionFactory Configuration for Awaitility condition factory + * @param podName pod name to check + * @param domainUid the label the pod is decorated with + * @param domainNamespace the domain namespace in which the domain exists + */ + public static void checkPodExists(ConditionFactory conditionFactory, String podName, + String domainUid, String domainNamespace) { + LoggingFacade logger = getLogger(); + testUntil(conditionFactory, + assertDoesNotThrow(() -> podExists(podName, domainUid, domainNamespace), + String.format("podExists failed with ApiException for pod %s in namespace %s", + podName, domainNamespace)), + logger, + "pod {0} to be created in namespace {1}", + podName, + domainNamespace); + } + /** * Check pod is ready. * diff --git a/kubernetes/crd/cluster-crd.yaml b/kubernetes/crd/cluster-crd.yaml index d646d7de566..bf0bb594dcd 100644 --- a/kubernetes/crd/cluster-crd.yaml +++ b/kubernetes/crd/cluster-crd.yaml @@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - weblogic.sha256: 46ef88005b68d9fb13a122b63fece506c555770209221581cb056c15f1ac7e6a + weblogic.sha256: 9f051b9b7805fc9100cf6490873e80b91671c7165960bfbcd6e8007ae171937f name: clusters.weblogic.oracle spec: group: weblogic.oracle @@ -526,8 +526,6 @@ spec: type: string fieldsType: type: string - clusterName: - type: string creationTimestamp: format: date-time type: string diff --git a/kubernetes/crd/domain-crd.yaml b/kubernetes/crd/domain-crd.yaml index 61c5f8af0db..16c4448eb83 100644 --- a/kubernetes/crd/domain-crd.yaml +++ b/kubernetes/crd/domain-crd.yaml @@ -5,7 +5,7 @@ apiVersion: apiextensions.k8s.io/v1 kind: CustomResourceDefinition metadata: annotations: - weblogic.sha256: 3a81ece5d88c85957a5d5e4a1b6c068cdca4355afd80a5a6598cbfade313871f + weblogic.sha256: 50af6b0cfbe5da871bbeae4bb4fd91c6da38931a01817fa475801e63dbbbdcd5 name: domains.weblogic.oracle spec: group: weblogic.oracle @@ -1024,8 +1024,6 @@ spec: type: string fieldsType: type: string - clusterName: - type: string creationTimestamp: format: date-time type: string @@ -4014,8 +4012,6 @@ spec: type: string fieldsType: type: string - clusterName: - type: string creationTimestamp: format: date-time type: string @@ -6842,8 +6838,6 @@ spec: type: string fieldsType: type: string - clusterName: - type: string creationTimestamp: format: date-time type: string diff --git a/kubernetes/samples/scripts/common/domain-template.yaml b/kubernetes/samples/scripts/common/domain-template.yaml index 2326dd87bca..ff19b338970 100644 --- a/kubernetes/samples/scripts/common/domain-template.yaml +++ b/kubernetes/samples/scripts/common/domain-template.yaml @@ -3,7 +3,7 @@ # # This is an example of how to define a Domain resource. # -apiVersion: "weblogic.oracle/v8" +apiVersion: "weblogic.oracle/v9" kind: Domain metadata: name: %DOMAIN_UID% @@ -83,12 +83,26 @@ spec: # Uncomment to export the T3Channel as a service %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel - # clusters is used to configure the desired behavior for starting member servers of a cluster. - # If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters. + # References to Cluster resources that describe the lifecycle options for all + # the Managed Server members of a WebLogic cluster, including Java + # options, environment variables, additional Pod content, and the ability to + # explicitly start, stop, or restart cluster members. The Cluster resource + # must describe a cluster that already exists in the WebLogic domain + # configuration. clusters: - - clusterName: %CLUSTER_NAME% - replicas: %INITIAL_MANAGED_SERVER_REPLICAS% + - name: %DOMAIN_UID%-%CLUSTER_NAME% + # The number of managed servers to start for unlisted clusters # replicas: 1 +--- +# This is an example of how to define a Cluster resource. +apiVersion: weblogic.oracle/v1 +kind: Cluster +metadata: + name: %DOMAIN_UID%-%CLUSTER_NAME% + namespace: %NAMESPACE% +spec: + clusterName: %CLUSTER_NAME% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% diff --git a/kubernetes/samples/scripts/common/jrf-domain-template.yaml b/kubernetes/samples/scripts/common/jrf-domain-template.yaml index 9f519946908..c4984ea5f57 100644 --- a/kubernetes/samples/scripts/common/jrf-domain-template.yaml +++ b/kubernetes/samples/scripts/common/jrf-domain-template.yaml @@ -3,7 +3,7 @@ # # This is an example of how to define a Domain resource. # -apiVersion: "weblogic.oracle/v8" +apiVersion: "weblogic.oracle/v9" kind: Domain metadata: name: %DOMAIN_UID% @@ -49,11 +49,11 @@ spec: # data storage directories are determined from the WebLogic domain home configuration. dataHome: "%DATA_HOME%" - # serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" + # serverStartPolicy legal values are "Never, "IfNeeded", or "AdminOnly" # This determines which WebLogic Servers the Operator will start up when it discovers this Domain - # - "NEVER" will not start any server in the domain - # - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started) - # - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count + # - "Never" will not start any server in the domain + # - "AdminOnly" will start up only the administration server (no managed servers will be started) + # - "IfNeeded" will start all non-clustered servers, including the administration server and clustered servers up to the replica count serverStartPolicy: %SERVER_START_POLICY% serverPod: @@ -87,12 +87,26 @@ spec: - name: USER_MEM_ARGS value: "-Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m " - # clusters is used to configure the desired behavior for starting member servers of a cluster. - # If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters. + # References to Cluster resources that describe the lifecycle options for all + # the Managed Server members of a WebLogic cluster, including Java + # options, environment variables, additional Pod content, and the ability to + # explicitly start, stop, or restart cluster members. The Cluster resource + # must describe a cluster that already exists in the WebLogic domain + # configuration. clusters: - - clusterName: %CLUSTER_NAME% - replicas: %INITIAL_MANAGED_SERVER_REPLICAS% + - name: %DOMAIN_UID%-%CLUSTER_NAME% + # The number of managed servers to start for unlisted clusters # replicas: 1 +--- +# This is an example of how to define a Cluster resource. +apiVersion: weblogic.oracle/v1 +kind: Cluster +metadata: + name: %DOMAIN_UID%-%CLUSTER_NAME% + namespace: %NAMESPACE% +spec: + clusterName: %CLUSTER_NAME% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% diff --git a/kubernetes/samples/scripts/common/utility.sh b/kubernetes/samples/scripts/common/utility.sh index fa51da512e6..b2b1c985710 100644 --- a/kubernetes/samples/scripts/common/utility.sh +++ b/kubernetes/samples/scripts/common/utility.sh @@ -289,24 +289,27 @@ getKubernetesClusterIP() { # buildServerPodResources() { + level1_indent=" " + level2_indent="${level1_indent} " + if [ -n "${serverPodMemoryRequest}" ]; then - local memoryRequest=" memory\: \"${serverPodMemoryRequest}\"\n" + local memoryRequest="${level2_indent}memory\: \"${serverPodMemoryRequest}\"\n" fi if [ -n "${serverPodCpuRequest}" ]; then - local cpuRequest=" cpu\: \"${serverPodCpuRequest}\"\n" + local cpuRequest="${level2_indent}cpu\: \"${serverPodCpuRequest}\"\n" fi if [ -n "${memoryRequest}" ] || [ -n "${cpuRequest}" ]; then - local requests=" requests\: \n$memoryRequest $cpuRequest" + local requests="${level1_indent}requests\: \n${memoryRequest}${cpuRequest}" fi if [ -n "${serverPodMemoryLimit}" ]; then - local memoryLimit=" memory\: \"${serverPodMemoryLimit}\"\n" + local memoryLimit="${level2_indent}memory\: \"${serverPodMemoryLimit}\"\n" fi if [ -n "${serverPodCpuLimit}" ]; then - local cpuLimit=" cpu\: \"${serverPodCpuLimit}\"\n" + local cpuLimit="${level2_indent}cpu\: \"${serverPodCpuLimit}\"\n" fi if [ -n "${memoryLimit}" ] || [ -n "${cpuLimit}" ]; then - local limits=" limits\: \n$memoryLimit $cpuLimit" + local limits="${level1_indent}limits\: \n${memoryLimit}${cpuLimit}" fi if [ -n "${requests}" ] || [ -n "${limits}" ]; then @@ -654,11 +657,13 @@ createFiles() { # # Function to markup the wdt model file +# $1 - Name of wdt model file. Optional. Defaults to wdt_k8s_model_template.yaml # updateModelFile() { # Update the wdt model file with kubernetes section modelFile="${domainOutputDir}/tmp/wdt_model.yaml" - cat ${scriptDir}/wdt_k8s_model_template.yaml >> ${modelFile} + model_template_file=${1:-wdt_k8s_model_template.yaml} + cat ${scriptDir}/${model_template_file} >> ${modelFile} sed -i -e "s:%DOMAIN_UID%:${domainUID}:g" ${modelFile} sed -i -e "s:%NAMESPACE%:$namespace:g" ${modelFile} @@ -688,6 +693,7 @@ updateModelFile() { sed -i -e "s:%EXPOSE_ADMIN_PORT_PREFIX%:${exposeAdminNodePortPrefix}:g" ${modelFile} sed -i -e "s:%ADMIN_NODE_PORT%:${adminNodePort}:g" ${modelFile} sed -i -e "s:%CLUSTER_NAME%:${clusterName}:g" ${modelFile} + sed -i -e "s:%CLUSTER_NAME2%:${clusterName2}:g" ${modelFile} sed -i -e "s:%INITIAL_MANAGED_SERVER_REPLICAS%:${initialManagedServerReplicas}:g" ${modelFile} # MII settings are used for model-in-image integration testing sed -i -e "s:%MII_PREFIX%:${miiPrefix}:g" ${modelFile} diff --git a/kubernetes/samples/scripts/common/validate.sh b/kubernetes/samples/scripts/common/validate.sh index 3ffc9f38dad..59441c41ab1 100755 --- a/kubernetes/samples/scripts/common/validate.sh +++ b/kubernetes/samples/scripts/common/validate.sh @@ -262,16 +262,16 @@ validateServerStartPolicy() { validateInputParamsSpecified serverStartPolicy if [ ! -z "${serverStartPolicy}" ]; then case ${serverStartPolicy} in - "NEVER") + "Never") ;; - "ALWAYS") + "Always") ;; - "IF_NEEDED") + "IfNeeded") ;; - "ADMIN_ONLY") + "AdminOnly") ;; *) - validationError "Invalid value for serverStartPolicy: ${serverStartPolicy}. Valid values are 'NEVER', 'ALWAYS', 'IF_NEEDED', and 'ADMIN_ONLY'." + validationError "Invalid value for serverStartPolicy: ${serverStartPolicy}. Valid values are 'Never', 'Always', 'IfNeeded', and 'AdminOnly'." ;; esac fi diff --git a/kubernetes/samples/scripts/common/wdt-and-wit-utility.sh b/kubernetes/samples/scripts/common/wdt-and-wit-utility.sh index d5cbbd04a6a..789b486db91 100755 --- a/kubernetes/samples/scripts/common/wdt-and-wit-utility.sh +++ b/kubernetes/samples/scripts/common/wdt-and-wit-utility.sh @@ -221,6 +221,7 @@ run_wdt() { -domain_home $domain_home_dir -model_file $model_final -variable_file $inputs_final + -target wko4 " echo @@ "Info: About to run the following WDT command:" echo "${cmd}" diff --git a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain-inputs.yaml b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain-inputs.yaml index b0e7b433e18..a7b7404a9cd 100644 --- a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain-inputs.yaml +++ b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain-inputs.yaml @@ -20,8 +20,8 @@ domainUID: domain1 domainHome: /u01/oracle/user_projects/domains/domain1 # Determines which OracleFMWInfrastructure Servers the operator will start up -# Legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" -serverStartPolicy: IF_NEEDED +# Legal values are "Never", "IfNeeded", or "AdminOnly" +serverStartPolicy: IfNeeded # Cluster name clusterName: cluster-1 diff --git a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain.sh b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain.sh index 46dbb85ac18..8ed6a4d219a 100755 --- a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain.sh +++ b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-in-image/create-domain.sh @@ -113,8 +113,8 @@ initOutputDir() { # try to execute image builder to see whether it is available validateImageBuilderAvailable() { - if ! [ -x "$(command -v ${WLSIMG_BUILDER})" ]; then - validationError "${WLSIMG_BUILDER} is not installed" + if ! [ -x "$(command -v ${WLSIMG_BUILDER:-docker})" ]; then + validationError "${WLSIMG_BUILDER:-docker} is not installed" fi } diff --git a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/create-domain-inputs.yaml b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/create-domain-inputs.yaml index f49be247606..11848eb7ca3 100644 --- a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/create-domain-inputs.yaml +++ b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/create-domain-inputs.yaml @@ -18,9 +18,9 @@ domainUID: domain1 # If not specified, the value is derived from the domainUID as /shared/domains/ domainHome: /shared/domains/domain1 -# Determines which WebLogic Servers the operator will start up -# Legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" -serverStartPolicy: IF_NEEDED +# Determines which OracleFMWInfrastructure Servers the operator will start up +# Legal values are "Never", "IfNeeded", or "AdminOnly" +serverStartPolicy: IfNeeded # Cluster name clusterName: cluster-1 diff --git a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/wdt_k8s_model_template.yaml b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/wdt_k8s_model_template.yaml index 0320dcddb47..a3af52a5c8f 100644 --- a/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/wdt_k8s_model_template.yaml +++ b/kubernetes/samples/scripts/create-fmw-infrastructure-domain/domain-home-on-pv/wdt_k8s_model_template.yaml @@ -6,84 +6,98 @@ # extractDomainResource script to generate a domain.yaml # kubernetes: - apiVersion: "weblogic.oracle/v8" - kind: Domain - metadata: - name: %DOMAIN_UID% - namespace: "%NAMESPACE%" - labels: - #weblogic.resourceVersion: "domain-v2" - weblogic.domainUID: %DOMAIN_UID% - spec: - # The WebLogic Domain Home - domainHome: %DOMAIN_HOME% + domain: + metadata: + name: %DOMAIN_UID% + namespace: "%NAMESPACE%" + spec: + # The WebLogic Domain Home + domainHome: %DOMAIN_HOME% - # The domain home source type - # Set to PersistentVolume for domain-in-pv, Image for domain-in-image, or FromModel for model-in-image - domainHomeSourceType: %DOMAIN_HOME_SOURCE_TYPE% + # The domain home source type + # Set to PersistentVolume for domain-in-pv, Image for domain-in-image, or FromModel for model-in-image + domainHomeSourceType: %DOMAIN_HOME_SOURCE_TYPE% - # The WebLogic Server Docker image that the Operator uses to start the domain - image: "%WEBLOGIC_IMAGE%" + # The WebLogic Server Docker image that the Operator uses to start the domain + image: "%WEBLOGIC_IMAGE%" - # imagePullPolicy defaults to "Always" if image version is :latest - imagePullPolicy: %WEBLOGIC_IMAGE_PULL_POLICY% + # imagePullPolicy defaults to "Always" if image version is :latest + imagePullPolicy: %WEBLOGIC_IMAGE_PULL_POLICY% - # Identify which Secret contains the credentials for pulling an image - %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets: - %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX% - name: "%WEBLOGIC_IMAGE_PULL_SECRET_NAME%" - # Identify which Secret contains the WebLogic Admin credentials (note that there is an example of - # how to create that Secret at the end of this file) - webLogicCredentialsSecret: - name: '%WEBLOGIC_CREDENTIALS_SECRET_NAME%' + # Identify which Secret contains the credentials for pulling an image + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets: + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX% - name: "%WEBLOGIC_IMAGE_PULL_SECRET_NAME%" + # Identify which Secret contains the WebLogic Admin credentials (note that there is an example of + # how to create that Secret at the end of this file) + webLogicCredentialsSecret: + name: '%WEBLOGIC_CREDENTIALS_SECRET_NAME%' - # Whether to include the server out file into the pod's stdout, default is true - includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG% + # Whether to include the server out file into the pod's stdout, default is true + includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG% - # Whether to enable log home - %LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED% + # Whether to enable log home + %LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED% - # Whether to write HTTP access log file to log home - #%LOG_HOME_ON_PV_PREFIX%httpAccessLogInLogHome: %HTTP_ACCESS_LOG_IN_LOG_HOME% + # Whether to write HTTP access log file to log home + #%LOG_HOME_ON_PV_PREFIX%httpAccessLogInLogHome: %HTTP_ACCESS_LOG_IN_LOG_HOME% - # The in-pod location for domain log, server logs, server out, and Node Manager log files - %LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME% - # An (optional) in-pod location for data storage of default and custom file stores. - # If not specified or the value is either not set or empty (e.g. dataHome: "") then the - # data storage directories are determined from the WebLogic domain home configuration. - dataHome: "%DATA_HOME%" + # The in-pod location for domain log, server logs, server out, and Node Manager log files + %LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME% + # An (optional) in-pod location for data storage of default and custom file stores. + # If not specified or the value is either not set or empty (e.g. dataHome: "") then the + # data storage directories are determined from the WebLogic domain home configuration. + dataHome: "%DATA_HOME%" - replicas: %INITIAL_MANAGED_SERVER_REPLICAS% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% - # serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" - # This determines which WebLogic Servers the Operator will start up when it discovers this Domain - # - "NEVER" will not start any server in the domain - # - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started) - # - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count - serverStartPolicy: %SERVER_START_POLICY% + # serverStartPolicy legal values are "Never, "IfNeeded", or "AdminOnly" + # This determines which WebLogic Servers the Operator will start up when it discovers this Domain + # - "Never" will not start any server in the domain + # - "AdminOnly" will start up only the administration server (no managed servers will be started) + # - "IfNeeded" will start all non-clustered servers, including the administration server and clustered servers up to the replica count + serverStartPolicy: %SERVER_START_POLICY% - serverPod: - # an (optional) list of environment variable to be set on the servers - env: - - name: JAVA_OPTIONS - value: "%JAVA_OPTIONS%" - - name: USER_MEM_ARGS - value: "-Djava.security.egd=file:/dev/./urandom " - %OPTIONAL_SERVERPOD_RESOURCES% - %LOG_HOME_ON_PV_PREFIX%volumes: - %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' - %LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim: - %LOG_HOME_ON_PV_PREFIX% claimName: '%DOMAIN_PVC_NAME%' - %LOG_HOME_ON_PV_PREFIX%volumeMounts: - %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' - %LOG_HOME_ON_PV_PREFIX% mountPath: %DOMAIN_ROOT_DIR% - - # adminServer is used to configure the desired behavior for starting the administration server. - adminServer: - %EXPOSE_ANY_CHANNEL_PREFIX%adminService: - %EXPOSE_ANY_CHANNEL_PREFIX% channels: - # The Admin Server's NodePort - %EXPOSE_ANY_CHANNEL_PREFIX% - channelName: default - %EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT% - # Uncomment to export the T3Channel as a service - %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel + serverPod: + # an (optional) list of environment variable to be set on the servers + env: + - name: JAVA_OPTIONS + value: "%JAVA_OPTIONS%" + - name: USER_MEM_ARGS + value: "-Djava.security.egd=file:/dev/./urandom " + %OPTIONAL_SERVERPOD_RESOURCES% + %LOG_HOME_ON_PV_PREFIX%volumes: + %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' + %LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim: + %LOG_HOME_ON_PV_PREFIX% claimName: '%DOMAIN_PVC_NAME%' + %LOG_HOME_ON_PV_PREFIX%volumeMounts: + %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' + %LOG_HOME_ON_PV_PREFIX% mountPath: %DOMAIN_ROOT_DIR% + # adminServer is used to configure the desired behavior for starting the administration server. + adminServer: + %EXPOSE_ANY_CHANNEL_PREFIX%adminService: + %EXPOSE_ANY_CHANNEL_PREFIX% channels: + # The Admin Server's NodePort + %EXPOSE_ANY_CHANNEL_PREFIX% - channelName: default + %EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT% + # Uncomment to export the T3Channel as a service + %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel + + # References to Cluster resources that describe the lifecycle options for all + # the Managed Server members of a WebLogic cluster, including Java + # options, environment variables, additional Pod content, and the ability to + # explicitly start, stop, or restart cluster members. The Cluster resource + # must describe a cluster that already exists in the WebLogic domain + # configuration. + clusters: + - name: %DOMAIN_UID%-%CLUSTER_NAME% + + # clusters is used to configure the desired behavior for starting member servers of a cluster. + # If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters. + clusters: + - metadata: + name: %DOMAIN_UID%-%CLUSTER_NAME% + namespace: "%NAMESPACE%" + spec: + clusterName: %CLUSTER_NAME% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% diff --git a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml index d59122f19aa..f1421695b8b 100644 --- a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml +++ b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-in-image/create-domain-inputs.yaml @@ -27,8 +27,8 @@ domainUID: domain1 domainHome: /u01/oracle/user_projects/domains/domain1 # Determines which WebLogic Servers the operator will start up -# Legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" -serverStartPolicy: IF_NEEDED +# Legal values are "Never", "IfNeeded", or "AdminOnly" +serverStartPolicy: IfNeeded # Cluster name clusterName: cluster-1 diff --git a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain-inputs.yaml b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain-inputs.yaml index 2263f267bb0..7aed80d5eaf 100644 --- a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain-inputs.yaml +++ b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/create-domain-inputs.yaml @@ -18,9 +18,11 @@ domainUID: domain1 # If not specified, the value is derived from the domainUID as /shared/domains/ domainHome: /shared/domains/domain1 +domainHomeSourceType: + # Determines which WebLogic Servers the operator will start up -# Legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" -serverStartPolicy: IF_NEEDED +# Legal values are "Never", "IfNeeded", or "AdminOnly" +serverStartPolicy: IfNeeded # Cluster name clusterName: cluster-1 diff --git a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/update-domain.sh b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/update-domain.sh index 68c68c6122a..1ffb809bdb6 100755 --- a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/update-domain.sh +++ b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/update-domain.sh @@ -169,7 +169,7 @@ createDomainConfigmap() { # Now that we have the model file in the domainoutputdir/tmp, # we can add the kubernetes section to the model file. - updateModelFile + updateModelFile wdt_k8s_model_template_updated.yaml # create the configmap and label it properly local cmName=${domainUID}-update-weblogic-sample-domain-job-cm diff --git a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template.yaml b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template.yaml index 9945fd783d1..ea8a8858e59 100644 --- a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template.yaml +++ b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template.yaml @@ -6,89 +6,96 @@ # extractDomainResource script to generate a domain.yaml # kubernetes: - apiVersion: "weblogic.oracle/v8" - kind: Domain - metadata: - name: %DOMAIN_UID% - namespace: "%NAMESPACE%" - labels: - #weblogic.resourceVersion: "domain-v2" - weblogic.domainUID: %DOMAIN_UID% - spec: - # The WebLogic Domain Home - domainHome: %DOMAIN_HOME% + domain: + metadata: + name: %DOMAIN_UID% + namespace: "%NAMESPACE%" + spec: + # The WebLogic Domain Home + domainHome: %DOMAIN_HOME% - # The domain home source type - # Set to PersistentVolume for domain-in-pv, Image for domain-in-image, or FromModel for model-in-image - domainHomeSourceType: %DOMAIN_HOME_SOURCE_TYPE% + # The domain home source type + # Set to PersistentVolume for domain-in-pv, Image for domain-in-image, or FromModel for model-in-image + domainHomeSourceType: "%DOMAIN_HOME_SOURCE_TYPE%" - # The WebLogic Server Docker image that the Operator uses to start the domain - image: "%WEBLOGIC_IMAGE%" + # The WebLogic Server Docker image that the Operator uses to start the domain + image: "%WEBLOGIC_IMAGE%" - # imagePullPolicy defaults to "Always" if image version is :latest - imagePullPolicy: %WEBLOGIC_IMAGE_PULL_POLICY% + # imagePullPolicy defaults to "Always" if image version is :latest + imagePullPolicy: %WEBLOGIC_IMAGE_PULL_POLICY% - # Identify which Secret contains the credentials for pulling an image - %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets: - %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX% - name: "%WEBLOGIC_IMAGE_PULL_SECRET_NAME%" - # Identify which Secret contains the WebLogic Admin credentials (note that there is an example of - # how to create that Secret at the end of this file) - webLogicCredentialsSecret: - name: '%WEBLOGIC_CREDENTIALS_SECRET_NAME%' + # Identify which Secret contains the credentials for pulling an image + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets: + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX% - name: "%WEBLOGIC_IMAGE_PULL_SECRET_NAME%" + # Identify which Secret contains the WebLogic Admin credentials (note that there is an example of + # how to create that Secret at the end of this file) + webLogicCredentialsSecret: + name: '%WEBLOGIC_CREDENTIALS_SECRET_NAME%' - # Whether to include the server out file into the pod's stdout, default is true - includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG% + # Whether to include the server out file into the pod's stdout, default is true + includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG% - # Whether to enable log home - %LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED% + # Whether to enable log home + %LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED% - # Whether to write HTTP access log file to log home - #%LOG_HOME_ON_PV_PREFIX%httpAccessLogInLogHome: %HTTP_ACCESS_LOG_IN_LOG_HOME% + # Whether to write HTTP access log file to log home + #%LOG_HOME_ON_PV_PREFIX%httpAccessLogInLogHome: %HTTP_ACCESS_LOG_IN_LOG_HOME% - # The in-pod location for domain log, server logs, server out, and Node Manager log files - %LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME% - # An (optional) in-pod location for data storage of default and custom file stores. - # If not specified or the value is either not set or empty (e.g. dataHome: "") then the - # data storage directories are determined from the WebLogic domain home configuration. - dataHome: "%DATA_HOME%" + # The in-pod location for domain log, server logs, server out, and Node Manager log files + %LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME% + # An (optional) in-pod location for data storage of default and custom file stores. + # If not specified or the value is either not set or empty (e.g. dataHome: "") then the + # data storage directories are determined from the WebLogic domain home configuration. + dataHome: "%DATA_HOME%" - replicas: 2 - # serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" - # This determines which WebLogic Servers the Operator will start up when it discovers this Domain - # - "NEVER" will not start any server in the domain - # - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started) - # - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count - serverStartPolicy: %SERVER_START_POLICY% + replicas: 2 + # serverStartPolicy legal values are "Never, "IfNeeded", or "AdminOnly" + # This determines which WebLogic Servers the Operator will start up when it discovers this Domain + # - "Never" will not start any server in the domain + # - "AdminOnly" will start up only the administration server (no managed servers will be started) + # - "IfNeeded" will start all non-clustered servers, including the administration server and clustered servers up to the replica count + serverStartPolicy: %SERVER_START_POLICY% - serverPod: - # an (optional) list of environment variable to be set on the servers - env: - - name: JAVA_OPTIONS - value: "%JAVA_OPTIONS%" - - name: USER_MEM_ARGS - value: "-Djava.security.egd=file:/dev/./urandom " - %OPTIONAL_SERVERPOD_RESOURCES% - %LOG_HOME_ON_PV_PREFIX%volumes: - %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' - %LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim: - %LOG_HOME_ON_PV_PREFIX% claimName: '%DOMAIN_PVC_NAME%' - %LOG_HOME_ON_PV_PREFIX%volumeMounts: - %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' - %LOG_HOME_ON_PV_PREFIX% mountPath: %DOMAIN_ROOT_DIR% - - # adminServer is used to configure the desired behavior for starting the administration server. - adminServer: - %EXPOSE_ANY_CHANNEL_PREFIX%adminService: - %EXPOSE_ANY_CHANNEL_PREFIX% channels: - # The Admin Server's NodePort - %EXPOSE_ANY_CHANNEL_PREFIX% - channelName: default - %EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT% - # Uncomment to export the T3Channel as a service - %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel + serverPod: + # an (optional) list of environment variable to be set on the servers + env: + - name: JAVA_OPTIONS + value: "%JAVA_OPTIONS%" + - name: USER_MEM_ARGS + value: "-Djava.security.egd=file:/dev/./urandom " + %OPTIONAL_SERVERPOD_RESOURCES% + %LOG_HOME_ON_PV_PREFIX%volumes: + %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' + %LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim: + %LOG_HOME_ON_PV_PREFIX% claimName: '%DOMAIN_PVC_NAME%' + %LOG_HOME_ON_PV_PREFIX%volumeMounts: + %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' + %LOG_HOME_ON_PV_PREFIX% mountPath: %DOMAIN_ROOT_DIR% - # clusters is used to configure the desired behavior for starting member servers of a cluster. - # If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters. - clusters: - - clusterName: %CLUSTER_NAME% - replicas: %INITIAL_MANAGED_SERVER_REPLICAS% + # adminServer is used to configure the desired behavior for starting the administration server. + adminServer: + %EXPOSE_ANY_CHANNEL_PREFIX%adminService: + %EXPOSE_ANY_CHANNEL_PREFIX% channels: + # The Admin Server's NodePort + %EXPOSE_ANY_CHANNEL_PREFIX% - channelName: default + %EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT% + # Uncomment to export the T3Channel as a service + %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel + # References to Cluster resources that describe the lifecycle options for all + # the Managed Server members of a WebLogic cluster, including Java + # options, environment variables, additional Pod content, and the ability to + # explicitly start, stop, or restart cluster members. The Cluster resource + # must describe a cluster that already exists in the WebLogic domain + # configuration. + clusters: + - name: %DOMAIN_UID%-%CLUSTER_NAME% + + # Used by WDT's extractDomainResource script to generate a Cluster resource. + clusters: + - metadata: + name: %DOMAIN_UID%-%CLUSTER_NAME% + namespace: "%NAMESPACE%" + spec: + clusterName: %CLUSTER_NAME% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% diff --git a/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template_updated.yaml b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template_updated.yaml new file mode 100644 index 00000000000..0523dbd2acf --- /dev/null +++ b/kubernetes/samples/scripts/create-weblogic-domain/domain-home-on-pv/wdt_k8s_model_template_updated.yaml @@ -0,0 +1,108 @@ +# Copyright (c) 2022, Oracle and/or its affiliates. + +# +# This is the template for kubernetes section for wdt_model file. This +# will be appended to the wdt_model.yaml file so that we can use wdt's +# extractDomainResource script to generate a domain.yaml +# +kubernetes: + domain: + metadata: + name: %DOMAIN_UID% + namespace: "%NAMESPACE%" + spec: + # The WebLogic Domain Home + domainHome: %DOMAIN_HOME% + + # The domain home source type + # Set to PersistentVolume for domain-in-pv, Image for domain-in-image, or FromModel for model-in-image + domainHomeSourceType: "%DOMAIN_HOME_SOURCE_TYPE%" + + # The WebLogic Server Docker image that the Operator uses to start the domain + image: "%WEBLOGIC_IMAGE%" + + # imagePullPolicy defaults to "Always" if image version is :latest + imagePullPolicy: %WEBLOGIC_IMAGE_PULL_POLICY% + + # Identify which Secret contains the credentials for pulling an image + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets: + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX% - name: "%WEBLOGIC_IMAGE_PULL_SECRET_NAME%" + # Identify which Secret contains the WebLogic Admin credentials (note that there is an example of + # how to create that Secret at the end of this file) + webLogicCredentialsSecret: + name: '%WEBLOGIC_CREDENTIALS_SECRET_NAME%' + + # Whether to include the server out file into the pod's stdout, default is true + includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG% + + # Whether to enable log home + %LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED% + + # Whether to write HTTP access log file to log home + #%LOG_HOME_ON_PV_PREFIX%httpAccessLogInLogHome: %HTTP_ACCESS_LOG_IN_LOG_HOME% + + # The in-pod location for domain log, server logs, server out, and Node Manager log files + %LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME% + # An (optional) in-pod location for data storage of default and custom file stores. + # If not specified or the value is either not set or empty (e.g. dataHome: "") then the + # data storage directories are determined from the WebLogic domain home configuration. + dataHome: "%DATA_HOME%" + + replicas: 2 + # serverStartPolicy legal values are "Never, "IfNeeded", or "AdminOnly" + # This determines which WebLogic Servers the Operator will start up when it discovers this Domain + # - "Never" will not start any server in the domain + # - "AdminOnly" will start up only the administration server (no managed servers will be started) + # - "IfNeeded" will start all non-clustered servers, including the administration server and clustered servers up to the replica count + serverStartPolicy: %SERVER_START_POLICY% + + serverPod: + # an (optional) list of environment variable to be set on the servers + env: + - name: JAVA_OPTIONS + value: "%JAVA_OPTIONS%" + - name: USER_MEM_ARGS + value: "-Djava.security.egd=file:/dev/./urandom " + %OPTIONAL_SERVERPOD_RESOURCES% + %LOG_HOME_ON_PV_PREFIX%volumes: + %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' + %LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim: + %LOG_HOME_ON_PV_PREFIX% claimName: '%DOMAIN_PVC_NAME%' + %LOG_HOME_ON_PV_PREFIX%volumeMounts: + %LOG_HOME_ON_PV_PREFIX% - name: 'weblogic-domain-storage-volume' + %LOG_HOME_ON_PV_PREFIX% mountPath: %DOMAIN_ROOT_DIR% + + # adminServer is used to configure the desired behavior for starting the administration server. + adminServer: + %EXPOSE_ANY_CHANNEL_PREFIX%adminService: + %EXPOSE_ANY_CHANNEL_PREFIX% channels: + # The Admin Server's NodePort + %EXPOSE_ANY_CHANNEL_PREFIX% - channelName: default + %EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT% + # Uncomment to export the T3Channel as a service + %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel + + # References to Cluster resources that describe the lifecycle options for all + # the Managed Server members of a WebLogic cluster, including Java + # options, environment variables, additional Pod content, and the ability to + # explicitly start, stop, or restart cluster members. The Cluster resource + # must describe a cluster that already exists in the WebLogic domain + # configuration. + clusters: + - name: %DOMAIN_UID%-%CLUSTER_NAME% + - name: %DOMAIN_UID%-%CLUSTER_NAME2% + + # Used by WDT's extractDomainResource script to generate Cluster resources. + clusters: + - metadata: + name: %DOMAIN_UID%-%CLUSTER_NAME% + namespace: "%NAMESPACE%" + spec: + clusterName: %CLUSTER_NAME% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% + - metadata: + name: %DOMAIN_UID%-%CLUSTER_NAME2% + namespace: "%NAMESPACE%" + spec: + clusterName: %CLUSTER_NAME2% + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% diff --git a/pom.xml b/pom.xml index 42120fb226b..b158469dd90 100644 --- a/pom.xml +++ b/pom.xml @@ -188,12 +188,12 @@ exec - - bash - - ../validateCLI.sh - .. - + + bash + + ../validateCLI.sh + .. + @@ -659,7 +659,7 @@ 3.23.1 2.11.0 4.2.0 - 16.0.2 + 17.0.0 1.7.22 4.10.0 5.9.1 @@ -675,7 +675,7 @@ 2.14.1 1.33 2.10 - 7.4.0 + 7.4.1 1.2.11 ${project.basedir}/src-generated-swagger ${root-generated-swagger}/main/java