|
| 1 | +# Copyright (c) 2017, 2020, Oracle Corporation and/or its affiliates. |
| 2 | +# Licensed under the Universal Permissive License v 1.0 as shown at https://oss.oracle.com/licenses/upl. |
| 3 | +# |
| 4 | +# This is an example of how to define a Domain resource. |
| 5 | +# |
| 6 | +apiVersion: "weblogic.oracle/v7" |
| 7 | +kind: Domain |
| 8 | +metadata: |
| 9 | + name: %DOMAIN_UID% |
| 10 | + namespace: %NAMESPACE% |
| 11 | + labels: |
| 12 | + weblogic.resourceVersion: domain-v2 |
| 13 | + weblogic.domainUID: %DOMAIN_UID% |
| 14 | +spec: |
| 15 | + # The WebLogic Domain Home |
| 16 | + domainHome: %DOMAIN_HOME% |
| 17 | + |
| 18 | + # The domain home source type |
| 19 | + # Set to PersistentVolume for domain-in-pv, Image for domain-in-image, or FromModel for model-in-image |
| 20 | + domainHomeSourceType: %DOMAIN_HOME_SOURCE_TYPE% |
| 21 | + |
| 22 | + # The WebLogic Server Docker image that the Operator uses to start the domain |
| 23 | + image: "%WEBLOGIC_IMAGE%" |
| 24 | + |
| 25 | + # imagePullPolicy defaults to "Always" if image version is :latest |
| 26 | + imagePullPolicy: "%WEBLOGIC_IMAGE_PULL_POLICY%" |
| 27 | + |
| 28 | + # Identify which Secret contains the credentials for pulling an image |
| 29 | + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%imagePullSecrets: |
| 30 | + %WEBLOGIC_IMAGE_PULL_SECRET_PREFIX%- name: %WEBLOGIC_IMAGE_PULL_SECRET_NAME% |
| 31 | + |
| 32 | + # Identify which Secret contains the WebLogic Admin credentials (note that there is an example of |
| 33 | + # how to create that Secret at the end of this file) |
| 34 | + webLogicCredentialsSecret: |
| 35 | + name: %WEBLOGIC_CREDENTIALS_SECRET_NAME% |
| 36 | + |
| 37 | + # Whether to include the server out file into the pod's stdout, default is true |
| 38 | + includeServerOutInPodLog: %INCLUDE_SERVER_OUT_IN_POD_LOG% |
| 39 | + |
| 40 | + # Whether to enable log home |
| 41 | + %LOG_HOME_ON_PV_PREFIX%logHomeEnabled: %LOG_HOME_ENABLED% |
| 42 | + |
| 43 | + # Whether to write HTTP access log file to log home |
| 44 | + %LOG_HOME_ON_PV_PREFIX%httpAccessLogInLogHome: %HTTP_ACCESS_LOG_IN_LOG_HOME% |
| 45 | + |
| 46 | + # The in-pod location for domain log, server logs, server out, and Node Manager log files |
| 47 | + %LOG_HOME_ON_PV_PREFIX%logHome: %LOG_HOME% |
| 48 | + # An (optional) in-pod location for data storage of default and custom file stores. |
| 49 | + # If not specified or the value is either not set or empty (e.g. dataHome: "") then the |
| 50 | + # data storage directories are determined from the WebLogic domain home configuration. |
| 51 | + dataHome: "%DATA_HOME%" |
| 52 | + |
| 53 | + # Istio service mesh support is experimental. |
| 54 | + %ISTIO_PREFIX%experimental: |
| 55 | + %ISTIO_PREFIX% istio: |
| 56 | + %ISTIO_PREFIX% enabled: %ISTIO_ENABLED% |
| 57 | + %ISTIO_PREFIX% readinessPort: %ISTIO_READINESS_PORT% |
| 58 | + |
| 59 | + # serverStartPolicy legal values are "NEVER", "IF_NEEDED", or "ADMIN_ONLY" |
| 60 | + # This determines which WebLogic Servers the Operator will start up when it discovers this Domain |
| 61 | + # - "NEVER" will not start any server in the domain |
| 62 | + # - "ADMIN_ONLY" will start up only the administration server (no managed servers will be started) |
| 63 | + # - "IF_NEEDED" will start all non-clustered servers, including the administration server and clustered servers up to the replica count |
| 64 | + serverStartPolicy: "%SERVER_START_POLICY%" |
| 65 | + |
| 66 | + serverPod: |
| 67 | + # an (optional) list of environment variable to be set on the servers |
| 68 | + env: |
| 69 | + - name: JAVA_OPTIONS |
| 70 | + value: "%JAVA_OPTIONS%" |
| 71 | + - name: USER_MEM_ARGS |
| 72 | + value: "-Djava.security.egd=file:/dev/./urandom -Xms256m -Xmx1024m " |
| 73 | + %OPTIONAL_SERVERPOD_RESOURCES% |
| 74 | + %LOG_HOME_ON_PV_PREFIX%volumes: |
| 75 | + %LOG_HOME_ON_PV_PREFIX%- name: weblogic-domain-storage-volume |
| 76 | + %LOG_HOME_ON_PV_PREFIX% persistentVolumeClaim: |
| 77 | + %LOG_HOME_ON_PV_PREFIX% claimName: %DOMAIN_PVC_NAME% |
| 78 | + %LOG_HOME_ON_PV_PREFIX%volumeMounts: |
| 79 | + %LOG_HOME_ON_PV_PREFIX%- mountPath: %DOMAIN_ROOT_DIR% |
| 80 | + %LOG_HOME_ON_PV_PREFIX% name: weblogic-domain-storage-volume |
| 81 | + |
| 82 | + # adminServer is used to configure the desired behavior for starting the administration server. |
| 83 | + adminServer: |
| 84 | + # serverStartState legal values are "RUNNING" or "ADMIN" |
| 85 | + # "RUNNING" means the listed server will be started up to "RUNNING" mode |
| 86 | + # "ADMIN" means the listed server will be start up to "ADMIN" mode |
| 87 | + serverStartState: "RUNNING" |
| 88 | + %EXPOSE_ANY_CHANNEL_PREFIX%adminService: |
| 89 | + %EXPOSE_ANY_CHANNEL_PREFIX% channels: |
| 90 | + # The Admin Server's NodePort |
| 91 | + %EXPOSE_ADMIN_PORT_PREFIX% - channelName: default |
| 92 | + %EXPOSE_ADMIN_PORT_PREFIX% nodePort: %ADMIN_NODE_PORT% |
| 93 | + # Uncomment to export the T3Channel as a service |
| 94 | + %EXPOSE_T3_CHANNEL_PREFIX% - channelName: T3Channel |
| 95 | + serverPod: |
| 96 | + # an (optional) list of environment variable to be set on the admin servers |
| 97 | + env: |
| 98 | + - name: USER_MEM_ARGS |
| 99 | + value: "-Djava.security.egd=file:/dev/./urandom -Xms512m -Xmx1024m " |
| 100 | + |
| 101 | + # clusters is used to configure the desired behavior for starting member servers of a cluster. |
| 102 | + # If you use this entry, then the rules will be applied to ALL servers that are members of the named clusters. |
| 103 | + clusters: |
| 104 | + - clusterName: %CLUSTER_NAME% |
| 105 | + serverStartState: "RUNNING" |
| 106 | + serverPod: |
| 107 | + # Instructs Kubernetes scheduler to prefer nodes for new cluster members where there are not |
| 108 | + # already members of the same cluster. |
| 109 | + affinity: |
| 110 | + podAntiAffinity: |
| 111 | + preferredDuringSchedulingIgnoredDuringExecution: |
| 112 | + - weight: 100 |
| 113 | + podAffinityTerm: |
| 114 | + labelSelector: |
| 115 | + matchExpressions: |
| 116 | + - key: "weblogic.clusterName" |
| 117 | + operator: In |
| 118 | + values: |
| 119 | + - $(CLUSTER_NAME) |
| 120 | + topologyKey: "kubernetes.io/hostname" |
| 121 | + replicas: %INITIAL_MANAGED_SERVER_REPLICAS% |
| 122 | + # The number of managed servers to start for unlisted clusters |
| 123 | + # replicas: 1 |
0 commit comments