Created
March 26, 2026 23:18
-
-
Save gamerson/4cca09ee37b1d67107bdfa0b860d3d42 to your computer and use it in GitHub Desktop.
liferay statefulset
This file contains hidden or 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
| # Please edit the object below. Lines beginning with a '#' will be ignored, | |
| # and an empty file will abort the edit. If an error occurs while saving this file will be | |
| # reopened with the relevant failures. | |
| # | |
| apiVersion: apps/v1 | |
| kind: StatefulSet | |
| metadata: | |
| annotations: | |
| argocd.argoproj.io/tracking-id: dogfood-prd-app:apps/StatefulSet:liferay-dogfood-prd/liferay-default | |
| instrumentation.opentelemetry.io/inject-dotnet: "false" | |
| instrumentation.opentelemetry.io/inject-java: "false" | |
| instrumentation.opentelemetry.io/inject-nodejs: "false" | |
| instrumentation.opentelemetry.io/inject-python: "false" | |
| kubectl.kubernetes.io/last-applied-configuration: | | |
| {"apiVersion":"apps/v1","kind":"StatefulSet","metadata":{"annotations":{"argocd.argoproj.io/tracking-id":"dogfood-prd-app:apps/StatefulSet:liferay-dogfood-prd/liferay-default","instrumentation.opentelemetry.io/inject-dotnet":"false","instrumentation.opentelemetry.io/inject-java":"false","instrumentation.opentelemetry.io/inject-nodejs":"false","instrumentation.opentelemetry.io/inject-python":"false","sidecar.opentelemetry.io/inject":"false"},"labels":{"app":"liferay-default","app.kubernetes.io/instance":"dogfood-prd-app","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"liferay-default","app.kubernetes.io/version":"latest","component":"liferay","helm.sh/chart":"liferay-default-0.4.4","origin":"liferay-aws"},"name":"liferay-default","namespace":"liferay-dogfood-prd"},"spec":{"replicas":1,"selector":{"matchLabels":{"app":"liferay-default","app.kubernetes.io/instance":"dogfood-prd-app","app.kubernetes.io/name":"liferay-default"}},"serviceName":"liferay-default","template":{"metadata":{"annotations":{"checksum/config":"2ef596aa4ab39ef9c9d8651a6ac05692198e8ff5672696747092ba4dcd2c717b","instrumentation.opentelemetry.io/inject-dotnet":"false","instrumentation.opentelemetry.io/inject-java":"false","instrumentation.opentelemetry.io/inject-nodejs":"false","instrumentation.opentelemetry.io/inject-python":"false","sidecar.opentelemetry.io/inject":"false"},"labels":{"app":"liferay-default","app.kubernetes.io/instance":"dogfood-prd-app","app.kubernetes.io/managed-by":"Helm","app.kubernetes.io/name":"liferay-default","app.kubernetes.io/version":"latest","component":"liferay","helm.sh/chart":"liferay-default-0.4.4","origin":"liferay-aws"}},"spec":{"containers":[{"env":[{"name":"DNS_MEMBERSHIP_SERVICE_NAME","value":"liferay-default-headless"},{"name":"LIFERAY_CLUSTER_PERIOD_LINK_PERIOD_BIND_PERIOD_ADDR_OPENBRACKET__QUOTE_CLUSTER_MINUS_LINK_MINUS_CONTROL_QUOTE__CLOSEBRACKET_","value":"${env.POD_IP}"},{"name":"LIFERAY_CLUSTER_PERIOD_LINK_PERIOD_BIND_PERIOD_ADDR_OPENBRACKET__QUOTE_CLUSTER_MINUS_LINK_MINUS_UDP_QUOTE__CLOSEBRACKET_","value":"${env.POD_IP}"},{"name":"LIFERAY_PORTAL_PERIOD_INSTANCE_PERIOD_INET_PERIOD_SOCKET_PERIOD_ADDRESS","value":"${env.POD_IP}:8080"},{"name":"LIFERAY_PORTLET_PERIOD_SESSION_PERIOD_REPLICATE_PERIOD_ENABLED","value":"true"},{"name":"LIFERAY_TOMCAT_SESSION_REPLICATION_ENABLED","value":"true"},{"name":"LIFERAY_VIRTUAL_PERIOD_HOSTS_PERIOD_IGNORE_PERIOD_HOSTS","value":"127.0.0.1,localhost,${env:POD_IP}"},{"name":"POD_APP","valueFrom":{"fieldRef":{"fieldPath":"metadata.labels['app.kubernetes.io/name']"}}},{"name":"POD_IP","valueFrom":{"fieldRef":{"fieldPath":"status.podIP"}}},{"name":"POD_NAME","valueFrom":{"fieldRef":{"fieldPath":"metadata.name"}}},{"name":"POD_NAMESPACE","valueFrom":{"fieldRef":{"fieldPath":"metadata.namespace"}}},{"name":"LIFERAY_DISABLE_TRIAL_LICENSE","value":"true"},{"name":"LIFERAY_DL_PERIOD_STORE_PERIOD_IMPL","value":"com.liferay.portal.store.s3.S3Store"},{"name":"LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_DRIVER_UPPERCASEC_LASS_UPPERCASEN_AME","value":"org.postgresql.Driver"},{"name":"LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_PASSWORD","value":"${env.DATABASE_PASSWORD}"},{"name":"LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_URL","value":"jdbc:postgresql://${env.DATABASE_ENDPOINT}:${env.DATABASE_PORT}/lportal?useUnicode=true\u0026characterEncoding=UTF-8\u0026useFastDateParsing=false"},{"name":"LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_USERNAME","value":"${env.DATABASE_USERNAME}"},{"name":"LIFERAY_NETWORK_HOST_ADDRESSES","value":"https://$(OPENSEARCH_ENDPOINT):443"},{"name":"LIFERAY_OPENSEARCH_ENABLED","value":"true"},{"name":"LIFERAY_OPENSEARCH_PASSWORD","value":"$(OPENSEARCH_PASSWORD)"},{"name":"LIFERAY_WEB_PERIOD_SERVER_PERIOD_FORWARDED_PERIOD_PORT_PERIOD_ENABLED","value":"true"},{"name":"LIFERAY_WEB_PERIOD_SERVER_PERIOD_FORWARDED_PERIOD_PROTOCOL_PERIOD_ENABLED","value":"true"}],"envFrom":[{"secretRef":{"name":"liferay-default"}},{"secretRef":{"name":"managed-service-details"}}],"image":"liferay/dxp:2025.q1.22-lts","imagePullPolicy":"IfNotPresent","livenessProbe":{"failureThreshold":3,"httpGet":{"path":"/c/portal/robots","port":"http"},"initialDelaySeconds":60,"periodSeconds":30,"timeoutSeconds":5},"name":"liferay-default","ports":[{"containerPort":4000,"name":"glowroot","protocol":"TCP"},{"containerPort":7800,"name":"cluster","protocol":"TCP"},{"containerPort":8000,"name":"debug","protocol":"TCP"},{"containerPort":8080,"name":"http","protocol":"TCP"}],"readinessProbe":{"failureThreshold":2,"httpGet":{"path":"/c/portal/robots","port":"http"},"initialDelaySeconds":0,"periodSeconds":10,"timeoutSeconds":5},"resources":{"limits":{"cpu":"4000m","memory":"12Gi"},"requests":{"cpu":"2000m","memory":"4Gi"}},"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"fsGroup":1000,"readOnlyRootFilesystem":true,"runAsGroup":1000,"runAsNonRoot":true,"runAsUser":1000,"seccompProfile":{"type":"RuntimeDefault"}},"startupProbe":{"failureThreshold":90,"httpGet":{"path":"/c/portal/robots","port":"http"},"initialDelaySeconds":60,"periodSeconds":10,"timeoutSeconds":5},"volumeMounts":[{"mountPath":"/opt/liferay/data","name":"liferay-persistent-volume","subPath":"liferay/data"},{"mountPath":"/opt/liferay/deploy","name":"liferay-persistent-volume","subPath":"liferay/deploy"},{"mountPath":"/opt/liferay/glowroot","name":"liferay-persistent-volume","subPath":"liferay/glowroot"},{"mountPath":"/opt/liferay/liferay.pid","name":"liferay-persistent-volume","subPath":"liferay/liferay.pid"},{"mountPath":"/opt/liferay/logs","name":"liferay-persistent-volume","subPath":"liferay/logs"},{"mountPath":"/opt/liferay/metrics","name":"liferay-persistent-volume","subPath":"liferay/metrics"},{"mountPath":"/opt/liferay/osgi/client-extensions","name":"liferay-persistent-volume","subPath":"osgi/client-extensions"},{"mountPath":"/opt/liferay/osgi/configs","name":"liferay-persistent-volume","subPath":"osgi/configs"},{"mountPath":"/opt/liferay/osgi/configs/com.liferay.portal.k8s.agent.configuration.PortalK8sAgentConfiguration.config","name":"liferay-configmap","subPath":"com.liferay.portal.k8s.agent.configuration.PortalK8sAgentConfiguration.config"},{"mountPath":"/opt/liferay/osgi/modules","name":"liferay-persistent-volume","subPath":"osgi/modules"},{"mountPath":"/opt/liferay/osgi/state","name":"liferay-persistent-volume","subPath":"osgi/state"},{"mountPath":"/opt/liferay/portal-cloud.properties","name":"liferay-configmap","subPath":"portal-cloud.properties"},{"mountPath":"/opt/liferay/portal-ext.properties","name":"liferay-configmap","subPath":"portal-ext.properties"},{"mountPath":"/opt/liferay/reports","name":"liferay-persistent-volume","subPath":"liferay/reports"},{"mountPath":"/opt/liferay/routes","name":"liferay-persistent-volume","subPath":"liferay/routes"},{"mountPath":"/opt/liferay/tomcat/conf/logging.properties","name":"liferay-persistent-volume","subPath":"tomcat/conf/logging.properties"},{"mountPath":"/opt/liferay/tomcat/conf/server.xml","name":"liferay-persistent-volume","subPath":"tomcat/conf/server.xml"},{"mountPath":"/opt/liferay/tomcat/logs","name":"liferay-persistent-volume","subPath":"tomcat/logs"},{"mountPath":"/opt/liferay/tomcat/temp","name":"liferay-persistent-volume","subPath":"tomcat/temp"},{"mountPath":"/opt/liferay/tomcat/work","name":"liferay-persistent-volume","subPath":"tomcat/work"},{"mountPath":"/opt/liferay/unicast.xml","name":"liferay-configmap","subPath":"unicast.xml"},{"mountPath":"/opt/liferay/work","name":"liferay-persistent-volume","subPath":"liferay/work"},{"mountPath":"/tmp","name":"liferay-persistent-volume","subPath":"system/tmp"},{"mountPath":"/usr/local/liferay/scripts/pre-configure/000_jdk_java_options.sh","name":"liferay-configmap","subPath":"000_jdk_java_options.sh"},{"mountPath":"/usr/local/liferay/scripts/pre-configure/010_install_prometheus_jmx_agent.sh","name":"liferay-configmap","subPath":"010_install_prometheus_jmx_agent.sh"},{"mountPath":"/etc/liferay/mount/files/deploy","name":"developer-clustered"},{"mountPath":"/opt/liferay/osgi/configs/com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config","name":"liferay-configmap","subPath":"com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config"},{"mountPath":"/opt/liferay/osgi/configs/com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config","name":"liferay-configmap","subPath":"com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config"},{"mountPath":"/opt/liferay/osgi/configs/com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config","name":"liferay-configmap","subPath":"com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config"}]}],"initContainers":[{"command":["bash","-c","","chown -R liferay:liferay /temp"],"image":"liferay/dxp:2025.q1.22-lts","imagePullPolicy":"IfNotPresent","name":"liferay-fix-permissions","securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}},"volumeMounts":[{"mountPath":"/temp","name":"liferay-persistent-volume"}]},{"command":["bash","-c","function download_module {\n local product_version=\"2025.q1.22-lts\"\n\n local url=\"https://releases.liferay.com/opensearch2/dxp/${product_version}/com.liferay.portal.search.opensearch2.${1}.jar\"\n\n local http_code=$( \\\n curl \\\n --location \\\n --output-dir /temp/liferay/deploy \\\n --remote-name \\\n --retry 5 \\\n --retry-all-errors \\\n --retry-delay 2 \\\n --write-out \"%{http_code}\" \\\n \"${url}\")\n\n if [ \"${http_code}\" != \"200\" ]\n then\n echo \"Unable to download OpenSearch modules for product version ${product_version}.\" \u003e\u00262\n\n rm --force --verbose /temp/liferay/deploy/com.liferay.portal.search.opensearch2.${1}.jar\n\n exit 0\n fi\n}\n\nfunction install_existing_opensearch_modules {\n if ls /opt/liferay/deploy/com.liferay.portal.search.opensearch2* 1\u003e /dev/null 2\u003e\u00261\n then\n echo \"Found existing OpenSearch modules.\"\n\n cp --verbose /opt/liferay/deploy/com.liferay.portal.search.opensearch2* /temp/liferay/deploy\n\n echo \"Install successful. Skipping download.\"\n\n return 0\n else\n echo \"No existing OpenSearch modules found in folder /opt/liferay/deploy.\"\n\n return 1\n fi\n}\n\nfunction main {\n mkdir --parents /temp/liferay/deploy\n\n install_existing_opensearch_modules\n\n local exit_code=$?\n\n if [ \"${exit_code}\" -ne 0 ]\n then\n echo \"Downloading OpenSearch modules.\"\n\n download_module \"api\"\n download_module \"impl\"\n fi\n\n rm --force --verbose \"/temp/osgi/modules/com.liferay.portal.search.opensearch2\"*\n}\n\nmain\n"],"image":"liferay/dxp:2025.q1.22-lts","imagePullPolicy":"IfNotPresent","name":"liferay-install-opensearch-modules","securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}},"volumeMounts":[{"mountPath":"/temp","name":"liferay-persistent-volume"}]},{"command":["bash","-c","echo \"Overlay is not enabled.\"\n"],"image":"liferay/dxp:2025.q1.22-lts","imagePullPolicy":"IfNotPresent","name":"liferay-overlay","securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}}},{"command":["bash","-c","rm --force --recursive /temp/liferay/liferay.pid 2\u003e/dev/null\n\nmkdir --parents /temp/liferay\n\ntouch /temp/liferay/liferay.pid\n\nif [ ! -d /temp/liferay/data ] || [ -z \"$(ls --all /temp/liferay/data)\" ]\nthen\n mkdir --parents /temp/liferay/data\n\n cp --force --recursive --verbose /opt/liferay/data/* /temp/liferay/data\nfi\n\nif [ ! -d /temp/liferay/glowroot ] || [ -z \"$(ls --all /temp/liferay/glowroot)\" ]\nthen\n mkdir --parents /temp/liferay/glowroot\n\n cp --force --recursive --verbose /opt/liferay/glowroot/* /temp/liferay/glowroot\nfi\n\nif [ ! -f /temp/tomcat/conf/server.xml ]\nthen\n mkdir --parents /temp/tomcat/conf\n\n cp /opt/liferay/tomcat/conf/logging.properties /temp/tomcat/conf/logging.properties\n\n echo -e \"\\norg.apache.catalina.tribes.membership.cloud.level=SEVERE\" \u003e\u003e /temp/tomcat/conf/logging.properties\n\n cat /opt/liferay/tomcat/conf/server.xml | sed '/\u003c!--.*--\u003e/d' | sed '/\u003c!--/,/--\u003e/d' \u003e /temp/tomcat/conf/server.xml\n\n IFS='' read -r -d '' SERVER_XML_CLUSTER \u003c\u003cEOF\n \u003cCluster className=\"org.apache.catalina.ha.tcp.SimpleTcpCluster\"\u003e\n \u003cManager className=\"com.liferay.support.tomcat.session.LiferayDeltaManager\" /\u003e\n \u003cChannel className=\"org.apache.catalina.tribes.group.GroupChannel\"\u003e\n \u003cMembership\n className=\"org.apache.catalina.tribes.membership.cloud.CloudMembershipService\"\n membershipProviderClassName=\"org.apache.catalina.tribes.membership.cloud.DNSMembershipProvider\"\n /\u003e\n \u003cSender className=\"org.apache.catalina.tribes.transport.ReplicationTransmitter\"\u003e\n \u003cTransport\n className=\"org.apache.catalina.tribes.transport.nio.PooledParallelSender\"\n timeout=\"300000\"\n /\u003e\n \u003c/Sender\u003e\n \u003c/Channel\u003e\n \u003c/Cluster\u003e\nEOF\n\n sed --in-place '/\u003cEngine/r'\u003c(echo \"${SERVER_XML_CLUSTER}\") /temp/tomcat/conf/server.xml\nfi\n\nif [ -d /opt/liferay/deploy ] \u0026\u0026 [ -z \"$(ls --all /temp/liferay/deploy/*license* 2\u003e/dev/null)\" ]\nthen\n if [ ! -d /temp/liferay/data/license ] || [ -z \"$(ls --all /temp/liferay/data/license/*.li)\" ]\n then\n mkdir --parents /temp/liferay/deploy\n\n cp --force --verbose /opt/liferay/deploy/* /temp/liferay/deploy\n fi\nfi\n"],"image":"liferay/dxp:2025.q1.22-lts","imagePullPolicy":"IfNotPresent","name":"liferay-prepopulate-data","securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}},"volumeMounts":[{"mountPath":"/temp","name":"liferay-persistent-volume"}]},{"command":["bash","-c","trap \"echo 'Received signal to terminate.'; exit 0\" SIGINT SIGTERM\n"],"image":"liferay/dxp:2025.q1.22-lts","imagePullPolicy":"IfNotPresent","name":"liferay-wait-on-services","securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"seccompProfile":{"type":"RuntimeDefault"}}}],"securityContext":{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"fsGroup":1000,"runAsNonRoot":true,"runAsUser":1000,"type":"RuntimeDefault"},"serviceAccountName":"liferay-default","volumes":[{"configMap":{"name":"liferay-default","optional":true},"name":"liferay-configmap"},{"name":"developer-clustered","secret":{"items":[{"key":"license.xml","path":"license.xml"}],"secretName":"developer-clustered"}}]}},"updateStrategy":{"type":"RollingUpdate"},"volumeClaimTemplates":[{"metadata":{"name":"liferay-persistent-volume"},"spec":{"accessModes":["ReadWriteOnce"],"resources":{"requests":{"storage":"10Gi"}},"storageClassName":"gp3"}}]},"status":{"availableReplicas":0,"collisionCount":0,"currentReplicas":1,"currentRevision":"liferay-default-75955c5c66","observedGeneration":9,"replicas":1,"updateRevision":"liferay-default-75955c5c66","updatedReplicas":1}} | |
| sidecar.opentelemetry.io/inject: "false" | |
| creationTimestamp: "2026-03-26T20:20:16Z" | |
| generation: 28 | |
| labels: | |
| app: liferay-default | |
| app.kubernetes.io/instance: dogfood-prd-app | |
| app.kubernetes.io/managed-by: Helm | |
| app.kubernetes.io/name: liferay-default | |
| app.kubernetes.io/version: latest | |
| component: liferay | |
| helm.sh/chart: liferay-default-0.4.4 | |
| origin: liferay-aws | |
| name: liferay-default | |
| namespace: liferay-dogfood-prd | |
| resourceVersion: "160706" | |
| uid: ba68a48a-9ce3-44e4-85fb-0c2f21c2d49f | |
| spec: | |
| persistentVolumeClaimRetentionPolicy: | |
| whenDeleted: Retain | |
| whenScaled: Retain | |
| podManagementPolicy: OrderedReady | |
| replicas: 1 | |
| revisionHistoryLimit: 10 | |
| selector: | |
| matchLabels: | |
| app: liferay-default | |
| app.kubernetes.io/instance: dogfood-prd-app | |
| app.kubernetes.io/name: liferay-default | |
| serviceName: liferay-default | |
| template: | |
| metadata: | |
| annotations: | |
| checksum/config: 2ef596aa4ab39ef9c9d8651a6ac05692198e8ff5672696747092ba4dcd2c717b | |
| cloudwatch.aws.amazon.com/auto-annotate-dotnet: "true" | |
| cloudwatch.aws.amazon.com/auto-annotate-java: "true" | |
| cloudwatch.aws.amazon.com/auto-annotate-nodejs: "true" | |
| cloudwatch.aws.amazon.com/auto-annotate-python: "true" | |
| instrumentation.opentelemetry.io/inject-dotnet: "false" | |
| instrumentation.opentelemetry.io/inject-java: "false" | |
| instrumentation.opentelemetry.io/inject-nodejs: "false" | |
| instrumentation.opentelemetry.io/inject-python: "false" | |
| sidecar.opentelemetry.io/inject: "false" | |
| labels: | |
| app: liferay-default | |
| app.kubernetes.io/instance: dogfood-prd-app | |
| app.kubernetes.io/managed-by: Helm | |
| app.kubernetes.io/name: liferay-default | |
| app.kubernetes.io/version: latest | |
| component: liferay | |
| helm.sh/chart: liferay-default-0.4.4 | |
| origin: liferay-aws | |
| spec: | |
| containers: | |
| - env: | |
| - name: DNS_MEMBERSHIP_SERVICE_NAME | |
| value: liferay-default-headless | |
| - name: LIFERAY_CLUSTER_PERIOD_LINK_PERIOD_BIND_PERIOD_ADDR_OPENBRACKET__QUOTE_CLUSTER_MINUS_LINK_MINUS_CONTROL_QUOTE__CLOSEBRACKET_ | |
| value: ${env.POD_IP} | |
| - name: LIFERAY_CLUSTER_PERIOD_LINK_PERIOD_BIND_PERIOD_ADDR_OPENBRACKET__QUOTE_CLUSTER_MINUS_LINK_MINUS_UDP_QUOTE__CLOSEBRACKET_ | |
| value: ${env.POD_IP} | |
| - name: LIFERAY_PORTAL_PERIOD_INSTANCE_PERIOD_INET_PERIOD_SOCKET_PERIOD_ADDRESS | |
| value: ${env.POD_IP}:8080 | |
| - name: LIFERAY_PORTLET_PERIOD_SESSION_PERIOD_REPLICATE_PERIOD_ENABLED | |
| value: "true" | |
| - name: LIFERAY_TOMCAT_SESSION_REPLICATION_ENABLED | |
| value: "true" | |
| - name: LIFERAY_VIRTUAL_PERIOD_HOSTS_PERIOD_IGNORE_PERIOD_HOSTS | |
| value: 127.0.0.1,localhost,${env:POD_IP} | |
| - name: POD_APP | |
| valueFrom: | |
| fieldRef: | |
| apiVersion: v1 | |
| fieldPath: metadata.labels['app.kubernetes.io/name'] | |
| - name: POD_IP | |
| valueFrom: | |
| fieldRef: | |
| apiVersion: v1 | |
| fieldPath: status.podIP | |
| - name: POD_NAME | |
| valueFrom: | |
| fieldRef: | |
| apiVersion: v1 | |
| fieldPath: metadata.name | |
| - name: POD_NAMESPACE | |
| valueFrom: | |
| fieldRef: | |
| apiVersion: v1 | |
| fieldPath: metadata.namespace | |
| - name: LIFERAY_DISABLE_TRIAL_LICENSE | |
| value: "true" | |
| - name: LIFERAY_DL_PERIOD_STORE_PERIOD_IMPL | |
| value: com.liferay.portal.store.s3.S3Store | |
| - name: LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_DRIVER_UPPERCASEC_LASS_UPPERCASEN_AME | |
| value: org.postgresql.Driver | |
| - name: LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_PASSWORD | |
| value: ${env.DATABASE_PASSWORD} | |
| - name: LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_URL | |
| value: jdbc:postgresql://${env.DATABASE_ENDPOINT}:${env.DATABASE_PORT}/lportal?useUnicode=true&characterEncoding=UTF-8&useFastDateParsing=false | |
| - name: LIFERAY_JDBC_PERIOD_DEFAULT_PERIOD_USERNAME | |
| value: ${env.DATABASE_USERNAME} | |
| - name: LIFERAY_NETWORK_HOST_ADDRESSES | |
| value: https://$(OPENSEARCH_ENDPOINT):443 | |
| - name: LIFERAY_OPENSEARCH_ENABLED | |
| value: "true" | |
| - name: LIFERAY_OPENSEARCH_PASSWORD | |
| value: $(OPENSEARCH_PASSWORD) | |
| - name: LIFERAY_WEB_PERIOD_SERVER_PERIOD_FORWARDED_PERIOD_PORT_PERIOD_ENABLED | |
| value: "true" | |
| - name: LIFERAY_WEB_PERIOD_SERVER_PERIOD_FORWARDED_PERIOD_PROTOCOL_PERIOD_ENABLED | |
| value: "true" | |
| envFrom: | |
| - secretRef: | |
| name: liferay-default | |
| - secretRef: | |
| name: managed-service-details | |
| image: liferay/dxp:2025.q1.22-lts | |
| imagePullPolicy: IfNotPresent | |
| livenessProbe: | |
| failureThreshold: 3 | |
| httpGet: | |
| path: /c/portal/robots | |
| port: http | |
| scheme: HTTP | |
| initialDelaySeconds: 60 | |
| periodSeconds: 30 | |
| successThreshold: 1 | |
| timeoutSeconds: 5 | |
| name: liferay-default | |
| ports: | |
| - containerPort: 4000 | |
| name: glowroot | |
| protocol: TCP | |
| - containerPort: 7800 | |
| name: cluster | |
| protocol: TCP | |
| - containerPort: 8000 | |
| name: debug | |
| protocol: TCP | |
| - containerPort: 8080 | |
| name: http | |
| protocol: TCP | |
| readinessProbe: | |
| failureThreshold: 2 | |
| httpGet: | |
| path: /c/portal/robots | |
| port: http | |
| scheme: HTTP | |
| periodSeconds: 10 | |
| successThreshold: 1 | |
| timeoutSeconds: 5 | |
| resources: | |
| limits: | |
| cpu: "4" | |
| memory: 12Gi | |
| requests: | |
| cpu: "2" | |
| memory: 4Gi | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| capabilities: | |
| drop: | |
| - ALL | |
| runAsGroup: 1000 | |
| runAsNonRoot: true | |
| runAsUser: 1000 | |
| seccompProfile: | |
| type: RuntimeDefault | |
| startupProbe: | |
| failureThreshold: 90 | |
| httpGet: | |
| path: /c/portal/robots | |
| port: http | |
| scheme: HTTP | |
| initialDelaySeconds: 60 | |
| periodSeconds: 10 | |
| successThreshold: 1 | |
| timeoutSeconds: 5 | |
| terminationMessagePath: /dev/termination-log | |
| terminationMessagePolicy: File | |
| volumeMounts: | |
| - mountPath: /opt/liferay/data | |
| name: liferay-persistent-volume | |
| subPath: liferay/data | |
| - mountPath: /opt/liferay/deploy | |
| name: liferay-persistent-volume | |
| subPath: liferay/deploy | |
| - mountPath: /opt/liferay/glowroot | |
| name: liferay-persistent-volume | |
| subPath: liferay/glowroot | |
| - mountPath: /opt/liferay/liferay.pid | |
| name: liferay-persistent-volume | |
| subPath: liferay/liferay.pid | |
| - mountPath: /opt/liferay/logs | |
| name: liferay-persistent-volume | |
| subPath: liferay/logs | |
| - mountPath: /opt/liferay/metrics | |
| name: liferay-persistent-volume | |
| subPath: liferay/metrics | |
| - mountPath: /opt/liferay/osgi/client-extensions | |
| name: liferay-persistent-volume | |
| subPath: osgi/client-extensions | |
| - mountPath: /opt/liferay/osgi/configs | |
| name: liferay-persistent-volume | |
| subPath: osgi/configs | |
| - mountPath: /opt/liferay/osgi/configs/com.liferay.portal.k8s.agent.configuration.PortalK8sAgentConfiguration.config | |
| name: liferay-configmap | |
| subPath: com.liferay.portal.k8s.agent.configuration.PortalK8sAgentConfiguration.config | |
| - mountPath: /opt/liferay/osgi/modules | |
| name: liferay-persistent-volume | |
| subPath: osgi/modules | |
| - mountPath: /opt/liferay/osgi/state | |
| name: liferay-persistent-volume | |
| subPath: osgi/state | |
| - mountPath: /opt/liferay/portal-cloud.properties | |
| name: liferay-configmap | |
| subPath: portal-cloud.properties | |
| - mountPath: /opt/liferay/portal-ext.properties | |
| name: liferay-configmap | |
| subPath: portal-ext.properties | |
| - mountPath: /opt/liferay/reports | |
| name: liferay-persistent-volume | |
| subPath: liferay/reports | |
| - mountPath: /opt/liferay/routes | |
| name: liferay-persistent-volume | |
| subPath: liferay/routes | |
| - mountPath: /opt/liferay/tomcat/conf/logging.properties | |
| name: liferay-persistent-volume | |
| subPath: liferay/tomcat/conf/logging.properties | |
| - mountPath: /opt/liferay/tomcat/conf/server.xml | |
| name: liferay-persistent-volume | |
| subPath: liferay/tomcat/conf/server.xml | |
| - mountPath: /opt/liferay/tomcat/logs | |
| name: liferay-persistent-volume | |
| subPath: liferay/tomcat/logs | |
| - mountPath: /opt/liferay/tomcat/temp | |
| name: liferay-persistent-volume | |
| subPath: liferay/tomcat/temp | |
| - mountPath: /opt/liferay/tomcat/work | |
| name: liferay-persistent-volume | |
| subPath: liferay/tomcat/work | |
| - mountPath: /opt/liferay/unicast.xml | |
| name: liferay-configmap | |
| subPath: unicast.xml | |
| - mountPath: /opt/liferay/work | |
| name: liferay-persistent-volume | |
| subPath: liferay/work | |
| - mountPath: /tmp | |
| name: liferay-persistent-volume | |
| subPath: system/tmp | |
| - mountPath: /usr/local/liferay/scripts/pre-configure/000_jdk_java_options.sh | |
| name: liferay-configmap | |
| subPath: 000_jdk_java_options.sh | |
| - mountPath: /usr/local/liferay/scripts/pre-configure/010_install_prometheus_jmx_agent.sh | |
| name: liferay-configmap | |
| subPath: 010_install_prometheus_jmx_agent.sh | |
| - mountPath: /etc/liferay/mount/files/deploy | |
| name: developer-clustered | |
| - mountPath: /opt/liferay/osgi/configs/com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config | |
| name: liferay-configmap | |
| subPath: com.liferay.portal.search.opensearch2.configuration.OpenSearchConfiguration.config | |
| - mountPath: /opt/liferay/osgi/configs/com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config | |
| name: liferay-configmap | |
| subPath: com.liferay.portal.search.opensearch2.configuration.OpenSearchConnectionConfiguration-REMOTE.config | |
| - mountPath: /opt/liferay/osgi/configs/com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config | |
| name: liferay-configmap | |
| subPath: com.liferay.portal.store.s3.configuration.S3StoreConfiguration.config | |
| dnsPolicy: ClusterFirst | |
| initContainers: | |
| - command: | |
| - bash | |
| - -c | |
| - | | |
| mkdir --parents \ | |
| /temp/liferay \ | |
| /temp/liferay/logs \ | |
| /temp/liferay/metrics \ | |
| /temp/liferay/reports \ | |
| /temp/liferay/routes \ | |
| /temp/liferay/work \ | |
| /temp/liferay/osgi/client-extensions \ | |
| /temp/liferay/osgi/configs \ | |
| /temp/liferay/osgi/modules \ | |
| /temp/liferay/osgi/state \ | |
| /temp/liferay/tomcat/logs \ | |
| /temp/liferay/tomcat/temp \ | |
| /temp/liferay/tomcat/work | |
| image: liferay/dxp:2025.q1.22-lts | |
| imagePullPolicy: IfNotPresent | |
| name: liferay-create-required-dirs | |
| resources: {} | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| capabilities: | |
| drop: | |
| - ALL | |
| runAsGroup: 1000 | |
| runAsNonRoot: true | |
| runAsUser: 1000 | |
| seccompProfile: | |
| type: RuntimeDefault | |
| terminationMessagePath: /dev/termination-log | |
| terminationMessagePolicy: File | |
| volumeMounts: | |
| - mountPath: /temp | |
| name: liferay-persistent-volume | |
| - command: | |
| - bash | |
| - -c | |
| - | | |
| function download_module { | |
| local product_version="2025.q1.22-lts" | |
| local url="https://releases.liferay.com/opensearch2/dxp/${product_version}/com.liferay.portal.search.opensearch2.${1}.jar" | |
| local http_code=$( \ | |
| curl \ | |
| --location \ | |
| --output-dir /temp/liferay/deploy \ | |
| --remote-name \ | |
| --retry 5 \ | |
| --retry-all-errors \ | |
| --retry-delay 2 \ | |
| --write-out "%{http_code}" \ | |
| "${url}") | |
| if [ "${http_code}" != "200" ] | |
| then | |
| echo "Unable to download OpenSearch modules for product version ${product_version}." >&2 | |
| rm --force --verbose /temp/liferay/deploy/com.liferay.portal.search.opensearch2.${1}.jar | |
| exit 0 | |
| fi | |
| } | |
| function install_existing_opensearch_modules { | |
| if ls /opt/liferay/deploy/com.liferay.portal.search.opensearch2* 1> /dev/null 2>&1 | |
| then | |
| echo "Found existing OpenSearch modules." | |
| cp --verbose /opt/liferay/deploy/com.liferay.portal.search.opensearch2* /temp/liferay/deploy | |
| echo "Install successful. Skipping download." | |
| return 0 | |
| else | |
| echo "No existing OpenSearch modules found in folder /opt/liferay/deploy." | |
| return 1 | |
| fi | |
| } | |
| function main { | |
| mkdir --parents /temp/liferay/deploy | |
| install_existing_opensearch_modules | |
| local exit_code=$? | |
| if [ "${exit_code}" -ne 0 ] | |
| then | |
| echo "Downloading OpenSearch modules." | |
| download_module "api" | |
| download_module "impl" | |
| fi | |
| rm --force --verbose "/temp/osgi/modules/com.liferay.portal.search.opensearch2"* | |
| } | |
| main | |
| image: liferay/dxp:2025.q1.22-lts | |
| imagePullPolicy: IfNotPresent | |
| name: liferay-install-opensearch-modules | |
| resources: {} | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| capabilities: | |
| drop: | |
| - ALL | |
| seccompProfile: | |
| type: RuntimeDefault | |
| terminationMessagePath: /dev/termination-log | |
| terminationMessagePolicy: File | |
| volumeMounts: | |
| - mountPath: /temp | |
| name: liferay-persistent-volume | |
| - command: | |
| - bash | |
| - -c | |
| - | | |
| echo "Overlay is not enabled." | |
| image: liferay/dxp:2025.q1.22-lts | |
| imagePullPolicy: IfNotPresent | |
| name: liferay-overlay | |
| resources: {} | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| capabilities: | |
| drop: | |
| - ALL | |
| seccompProfile: | |
| type: RuntimeDefault | |
| terminationMessagePath: /dev/termination-log | |
| terminationMessagePolicy: File | |
| - command: | |
| - bash | |
| - -c | |
| - | | |
| rm --force --recursive /temp/liferay/liferay.pid 2>/dev/null | |
| mkdir --parents /temp/liferay | |
| touch /temp/liferay/liferay.pid | |
| if [ ! -d /temp/liferay/data ] || [ -z "$(ls --all /temp/liferay/data)" ] | |
| then | |
| mkdir --parents /temp/liferay/data | |
| cp --force --recursive --verbose /opt/liferay/data/* /temp/liferay/data | |
| fi | |
| if [ ! -d /temp/liferay/glowroot ] || [ -z "$(ls --all /temp/liferay/glowroot)" ] | |
| then | |
| mkdir --parents /temp/liferay/glowroot | |
| cp --force --recursive --verbose /opt/liferay/glowroot/* /temp/liferay/glowroot | |
| fi | |
| if [ ! -f /temp/liferay/tomcat/conf/server.xml ] | |
| then | |
| mkdir --parents /temp/liferay/tomcat/conf | |
| cp /opt/liferay/tomcat/conf/logging.properties /temp/liferay/tomcat/conf/logging.properties | |
| echo -e "\norg.apache.catalina.tribes.membership.cloud.level=SEVERE" >> /temp/liferay/tomcat/conf/logging.properties | |
| cat /opt/liferay/tomcat/conf/server.xml | sed '/<!--.*-->/d' | sed '/<!--/,/-->/d' > /temp/liferay/tomcat/conf/server.xml | |
| IFS='' read -r -d '' SERVER_XML_CLUSTER <<EOF | |
| <Cluster className="org.apache.catalina.ha.tcp.SimpleTcpCluster"> | |
| <Manager className="com.liferay.support.tomcat.session.LiferayDeltaManager" /> | |
| <Channel className="org.apache.catalina.tribes.group.GroupChannel"> | |
| <Membership | |
| className="org.apache.catalina.tribes.membership.cloud.CloudMembershipService" | |
| membershipProviderClassName="org.apache.catalina.tribes.membership.cloud.DNSMembershipProvider" | |
| /> | |
| <Sender className="org.apache.catalina.tribes.transport.ReplicationTransmitter"> | |
| <Transport | |
| className="org.apache.catalina.tribes.transport.nio.PooledParallelSender" | |
| timeout="300000" | |
| /> | |
| </Sender> | |
| </Channel> | |
| </Cluster> | |
| EOF | |
| sed --in-place '/<Engine/r'<(echo "${SERVER_XML_CLUSTER}") /temp/liferay/tomcat/conf/server.xml | |
| fi | |
| if [ -d /opt/liferay/deploy ] && [ -z "$(ls --all /temp/liferay/deploy/*license* 2>/dev/null)" ] | |
| then | |
| if [ ! -d /temp/liferay/data/license ] || [ -z "$(ls --all /temp/liferay/data/license/*.li)" ] | |
| then | |
| mkdir --parents /temp/liferay/deploy | |
| cp --force --verbose /opt/liferay/deploy/* /temp/liferay/deploy | |
| fi | |
| fi | |
| image: liferay/dxp:2025.q1.22-lts | |
| imagePullPolicy: IfNotPresent | |
| name: liferay-prepopulate-data | |
| resources: {} | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| capabilities: | |
| drop: | |
| - ALL | |
| seccompProfile: | |
| type: RuntimeDefault | |
| terminationMessagePath: /dev/termination-log | |
| terminationMessagePolicy: File | |
| volumeMounts: | |
| - mountPath: /temp | |
| name: liferay-persistent-volume | |
| - command: | |
| - bash | |
| - -c | |
| - | | |
| trap "echo 'Received signal to terminate.'; exit 0" SIGINT SIGTERM | |
| image: liferay/dxp:2025.q1.22-lts | |
| imagePullPolicy: IfNotPresent | |
| name: liferay-wait-on-services | |
| resources: {} | |
| securityContext: | |
| allowPrivilegeEscalation: false | |
| capabilities: | |
| drop: | |
| - ALL | |
| seccompProfile: | |
| type: RuntimeDefault | |
| terminationMessagePath: /dev/termination-log | |
| terminationMessagePolicy: File | |
| restartPolicy: Always | |
| schedulerName: default-scheduler | |
| securityContext: | |
| fsGroup: 1000 | |
| runAsNonRoot: true | |
| runAsUser: 1000 | |
| serviceAccount: liferay-default | |
| serviceAccountName: liferay-default | |
| terminationGracePeriodSeconds: 30 | |
| volumes: | |
| - configMap: | |
| defaultMode: 420 | |
| name: liferay-default | |
| optional: true | |
| name: liferay-configmap | |
| - name: developer-clustered | |
| secret: | |
| defaultMode: 420 | |
| items: | |
| - key: license.xml | |
| path: license.xml | |
| secretName: developer-clustered | |
| updateStrategy: | |
| type: RollingUpdate | |
| volumeClaimTemplates: | |
| - apiVersion: v1 | |
| kind: PersistentVolumeClaim | |
| metadata: | |
| name: liferay-persistent-volume | |
| spec: | |
| accessModes: | |
| - ReadWriteOnce | |
| resources: | |
| requests: | |
| storage: 10Gi | |
| storageClassName: gp3 | |
| volumeMode: Filesystem | |
| status: | |
| phase: Pending | |
| status: | |
| availableReplicas: 1 | |
| collisionCount: 0 | |
| currentReplicas: 1 | |
| currentRevision: liferay-default-6bdd48b874 | |
| observedGeneration: 28 | |
| readyReplicas: 1 | |
| replicas: 1 | |
| updateRevision: liferay-default-6bdd48b874 | |
| updatedReplicas: 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment