Skip to content

Commit 3bb893f

Browse files
authored
Merge pull request #242 from marklogic/sync-master-develop
Sync Master and Develop Branch
2 parents 7e40b1e + 8faa70f commit 3bb893f

15 files changed

+238
-79
lines changed

README.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,13 @@ Following table lists all the parameters supported by the latest MarkLogic Helm
107107
| `updateStrategy.type` | Update strategy for MarkLogic pods | `OnDelete` |
108108
| `terminationGracePeriod` | Seconds the MarkLogic Pod terminate gracefully | `120` |
109109
| `clusterDomain` | Domain for the Kubernetes cluster | `cluster.local` |
110+
| `allowLongHostnames` | Allow deployment with hostname over 64 characters | `false` |
111+
| `useLegacyHostnames` | Use the lagecy hostnames that is used before 1.1.0 version. | `false` |
110112
| `group.name` | Group name for joining MarkLogic cluster | `Default` |
111113
| `group.enableXdqpSsl` | SSL encryption for XDQP | `true` |
112114
| `bootstrapHostName` | Host name of MarkLogic bootstrap host (to join a cluster) | `""` |
113115
| `image.repository` | Repository for MarkLogic image | `marklogicdb/marklogic-db` |
114-
| `image.tag` | Image tag for MarkLogic image | `11.1.0-centos-1.1.2` |
116+
| `image.tag` | Image tag for MarkLogic image | `11.2.0-centos-1.1.2` |
115117
| `image.pullPolicy` | Image pull policy for MarkLogic image | `IfNotPresent` |
116118
| `initContainers.configureGroup.image` | Image for configureGroup InitContainer | `curlimages/curl:8.6.0` |
117119
| `initContainers.configureGroup.pullPolicy` | Pull policy for configureGroup InitContainer | `IfNotPresent` |
@@ -226,7 +228,8 @@ Following table lists all the parameters supported by the latest MarkLogic Helm
226228
2. The MarkLogic Docker image must be run in privileged mode. At the moment if the image isn't run as privileged many calls that use sudo during the startup script will fail due to lack of required permissions as the image will not be able to create a user with the required permissions.
227229
3. The latest released version of CentOS 7 has known security vulnerabilities with respect to glib2 CVE-2016-3191, CVE-2015-8385, CVE-2015-8387, CVE-2015-8390, CVE-2015-8394, CVE-2016-3191, glibc CVE-2019-1010022, pcre CVE-2015-8380, CVE-2015-8387, CVE-2015-8390, CVE-2015-8393, CVE-2015-8394, SQLite CVE-2019-5827. These libraries are included in the CentOS base image but, to-date, no fixes have been made available. Even though these libraries may be present in the base image that is used by MarkLogic Server, they are not used by MarkLogic Server itself, hence there is no impact or mitigation required.
228230
4. The latest released version of fluent/fluent-bit:2.2.2 has known security vulnerabilities with respect to libcom-err2 CVE-2022-1304, libgcrypt20 CVE-2021-33560, libgnutls30 CVE-2024-0567, libldap-2.4-2 CVE-2023-2953, libzstd1 CVE-2022-4899, zlib1g CVE-2023-45853. These libraries are included in the Debian base image but, to-date, no fixes have been made available. For libpq5 CVE-2024-0985, we wait for a future upgrade of the fluent-bit image to include the fix. We will provide updates and mitigation strategies as soon as more information becomes available.
229-
5. The latest released version of redhat/ubi9:9.3 has known security vulnerabilities with respect to setuptools GHSA-r9hx-vwmv-q579, we wait for a future upgrade of the redhad ubi image to include the fix.
231+
5. The latest released version of redhat/ubi9:9.3 has known security vulnerabilities with respect to setuptools GHSA-r9hx-vwmv-q579. We wait for a future upgrade of the redhad ubi image to include the fix.
230232
6. The security context “allowPrivilegeEscalation” is set to TRUE by default in values.yaml file and cannot be changed to run the current MarkLogic container. Work is in progress to run MarkLogic container in "rootless" mode.
231-
7. The Readiness and Startup Probe are not compatible with HA deployment. At the moment these probes may fail in the case of Security database failover. As of the 1.0.2 helm chart release, the startup and readiness probes are disabled by default.
232-
8. Path based routing and Ingress features are only supported with MarkLogic 11.1 and higher.
233+
7. Known Issues and Limitations for the MarkLogic Server Docker image can be viewed using the link: https://github.com/marklogic/marklogic-docker?tab=readme-ov-file#Known-Issues-and-Limitations
234+
8. The Readiness and Startup Probe are not compatible with HA deployment. At the moment these probes may fail in the case of Security database failover. As of the 1.0.2 helm chart release, the startup and readiness probes are disabled by default.
235+
9. Path based routing and Ingress features are only supported with MarkLogic 11.1 and higher.

charts/Chart.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ dependencies:
88
version: "1.18.0"
99
name: marklogic
1010
description: MarkLogic Server is a multi-model database that has both NoSQL and trusted enterprise data management capabilities.
11-
appVersion: "11.1.0"
11+
appVersion: "11.2.0"
1212
type: application
1313
keywords:
1414
- marklogic
@@ -17,4 +17,4 @@ keywords:
1717
sources:
1818
- https://github.com/marklogic/marklogic-kubernetes
1919
- https://www.marklogic.com/
20-
version: 1.1.0
20+
version: 1.1.2

charts/templates/NOTES.txt

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,7 @@ WARNING
3636
FQDN is {{ include "marklogic.fqdn" . }}
3737
{{- if gt (len (include "marklogic.fqdn" .)) 64 }}
3838
WARNING: The hostname is greater than 64 characters
39-
There may be issues with certificates
40-
The certificates may shorten the name or use SANs for hostnames in the certificates
39+
There may be issues with certificates in MarkLogic App Server
4140
{{- end }}
4241

4342
Group {{ .Values.group.name }} is created on the MarkLogic cluster.

charts/templates/_helpers.tpl

Lines changed: 95 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,84 @@ Expand the name of the chart.
55
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
66
{{- end }}
77

8+
{{/*
9+
newFullname is the name used after 1.1.x release, in an effort to make the release name shorter.
10+
*/}}
11+
{{- define "marklogic.newFullname" -}}
12+
{{- if .Values.fullnameOverride }}
13+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
14+
{{- else }}
15+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
16+
{{- end }}
17+
{{- end }}
18+
19+
20+
{{/*
21+
oldFullname is the name used before 1.1.x release
22+
*/}}
23+
{{- define "marklogic.oldFullname" -}}
24+
{{- if .Values.fullnameOverride }}
25+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
26+
{{- else }}
27+
{{- $name := default .Chart.Name .Values.nameOverride }}
28+
{{- if contains $name .Release.Name }}
29+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
30+
{{- else }}
31+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
32+
{{- end }}
33+
{{- end }}
34+
{{- end }}
35+
36+
{{- define "marklogic.shouldUseNewName" -}}
37+
{{- if .Release.IsInstall -}}
38+
{{- true }}
39+
{{- else }}
40+
{{- if eq .Values.useLegacyHostnames true -}}
41+
{{- false }}
42+
{{- else }}
43+
{{- true }}
44+
{{- end }}
45+
{{- end }}
46+
{{- end }}
47+
48+
{{- define "marklogic.checkUpgradeError" -}}
49+
{{- if and .Release.IsUpgrade (ne .Values.useLegacyHostnames true) -}}
50+
{{- $stsName := trim (include "marklogic.oldFullname" .) -}}
51+
{{- if .Values.fullnameOverride -}}
52+
{{- $stsName := trim .Values.fullnameOverride -}}
53+
{{- end }}
54+
{{- $sts := lookup "apps/v1" "StatefulSet" .Release.Namespace $stsName }}
55+
{{- if $sts }}
56+
{{- $labels := $sts.metadata.labels }}
57+
{{- $chartVersionFull := get $labels "helm.sh/chart" }}
58+
{{- if $chartVersionFull }}
59+
{{- $chartVersionWithDot := trimPrefix "marklogic-" $chartVersionFull }}
60+
{{- $chartVersionString := $chartVersionWithDot | replace "." "" }}
61+
{{- $chartVersionDigit := int $chartVersionString }}
62+
{{- if lt $chartVersionDigit 110 -}}
63+
{{- $errorMessage := printf "A new algorithm for generating hostnames was introduced in version 1.1.0. When upgrading from version %s to version %s, the \"useLegacyHostnames\" setting must be set to true to prevent the StatefulSet from being recreated. Please add the following to the values file and attempt the upgrade again: \n\nuseLegacyHostnames: true\n" $chartVersionWithDot .Chart.Version }}
64+
{{- fail $errorMessage }}
65+
{{- end }}
66+
{{- end }}
67+
{{- end }}
68+
{{- end }}
69+
{{- end }}
70+
71+
{{/*
72+
{{- end }}
73+
{{- end }}
74+
875
{{/*
976
Create a default fully qualified app name.
1077
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11-
The release name will be used as full name
78+
To surrport the upgrade from 1.0.x to 1.1.x, we keep the old name when doing upgrade from 1.0.x.
79+
For the new install, we use the new name, which is the release name.
1280
*/}}
1381
{{- define "marklogic.fullname" -}}
14-
{{- if .Values.fullnameOverride }}
15-
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
82+
{{- if eq (include "marklogic.shouldUseNewName" .) "true" -}}
83+
{{- include "marklogic.newFullname" . }}
1684
{{- else }}
17-
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
85+
{{- include "marklogic.oldFullname" . }}
1886
{{- end }}
1987
{{- end }}
2088

@@ -29,7 +97,27 @@ Create chart name and version as used by the chart label.
2997
Create headless service name for statefulset
3098
*/}}
3199
{{- define "marklogic.headlessServiceName" -}}
32-
{{- include "marklogic.fullname" . }}
100+
{{- if eq (include "marklogic.shouldUseNewName" .) "true" -}}
101+
{{- include "marklogic.newFullname" . }}
102+
{{- else }}
103+
{{- printf "%s-headless" (include "marklogic.oldFullname" .) }}
104+
{{- end }}
105+
{{- end }}
106+
{{/*
107+
{{- end}}
108+
109+
110+
{{/*
111+
Create cluster service name for statefulset
112+
*/}}
113+
{{- define "marklogic.clusterServiceName" -}}
114+
{{- if eq (include "marklogic.shouldUseNewName" .) "true" -}}
115+
{{- include "marklogic.newFullname" . }}-cluster
116+
{{- else }}
117+
{{- include "marklogic.oldFullname" . }}
118+
{{- end }}
119+
{{- end }}
120+
{{/*
33121
{{- end}}
34122

35123

@@ -102,8 +190,8 @@ Validate values file
102190
*/}}
103191
{{- define "marklogic.checkInputError" -}}
104192
{{- $fqdn := include "marklogic.fqdn" . }}
105-
{{- if gt (len $fqdn) 64}}
106-
{{- $errorMessage := printf "%s%s%s" "The FQDN: " $fqdn " is longer than 64. Please use a shorter release name and try again." }}
193+
{{- if and (gt (len $fqdn) 64) (not .Values.allowLongHostnames) }}
194+
{{- $errorMessage := printf "%s%s%s" "The FQDN: " $fqdn " is longer than 64. Please use a shorter release name and try again. MarkLogic App Server does not support turning on SSL with FQDN over 64 characters. If you still want to install with an FQDN longer than 64 characters, you can override this restriction by setting allowLongHostnames: true in your Helm values file." }}
107195
{{- fail $errorMessage }}
108196
{{- end }}
109197
{{- end }}

charts/templates/configmap-haproxy.yaml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
{{- if .Values.haproxy.enabled }}
22
{{- $replicas := int .Values.replicaCount }}
33
{{- $releaseName := include "marklogic.fullname" . }}
4+
{{- $headlessServiceName := include "marklogic.headlessServiceName" . }}
45
{{- $namespace := .Release.Namespace }}
56
{{- $clusterDomain := .Values.clusterDomain }}
67
{{- $haproxyTlsEnabled := .Values.haproxy.tls.enabled }}
@@ -76,12 +77,12 @@ data:
7677
{{- if .Values.haproxy.tcpports.enabled }}
7778
{{- range $_, $v := .Values.haproxy.tcpports.ports }}
7879
{{ $portNumber := printf "%v" (default $v.port $v.targetPort) }}
79-
listen odbc
80+
listen marklogic-TCP-{{$portNumber}}
8081
bind :{{ $portNumber }}
8182
mode tcp
8283
balance leastconn
8384
{{- range $i := until $replicas }}
84-
server {{ printf "ml-%s-%s-%v" $releaseName $portNumber $i }} {{ $releaseName }}-{{ $i }}.{{ $releaseName }}.{{ $namespace }}.svc.{{ $clusterDomain }}:{{ $portNumber }} check resolvers dns init-addr none
85+
server {{ printf "ml-%s-%s-%v" $releaseName $portNumber $i }} {{ $releaseName }}-{{ $i }}.{{ $headlessServiceName }}.{{ $namespace }}.svc.{{ $clusterDomain }}:{{ $portNumber }} check resolvers dns init-addr none
8586
{{- end }}
8687
{{- end }}
8788
{{- end }}
@@ -308,9 +309,9 @@ data:
308309
default-server check
309310
{{- range $i := until $replicas }}
310311
{{- if $appServerTlsEnabled }}
311-
server {{ printf "%s-%s-%v" $releaseName $portNumber $i }} {{ $releaseName }}-{{ $i }}.{{ $releaseName }}.{{ $namespace }}.svc.{{ $clusterDomain }}:{{ $portNumber }} resolvers dns init-addr none cookie {{ $releaseName }}-{{ $portNumber }}-{{ $i }} ssl verify none
312+
server {{ printf "ml-%s-%s-%v" $releaseName $portNumber $i }} {{ $releaseName }}-{{ $i }}.{{ $headlessServiceName }}.{{ $namespace }}.svc.{{ $clusterDomain }}:{{ $portNumber }} resolvers dns init-addr none cookie {{ $releaseName }}-{{ $portNumber }}-{{ $i }} ssl verify none
312313
{{- else }}
313-
server {{ printf "%s-%s-%v" $releaseName $portNumber $i }} {{ $releaseName }}-{{ $i }}.{{ $releaseName }}.{{ $namespace }}.svc.{{ $clusterDomain }}:{{ $portNumber }} resolvers dns init-addr none cookie {{ $releaseName }}-{{ $portNumber }}-{{ $i }}
314+
server {{ printf "ml-%s-%s-%v" $releaseName $portNumber $i }} {{ $releaseName }}-{{ $i }}.{{ $headlessServiceName }}.{{ $namespace }}.svc.{{ $clusterDomain }}:{{ $portNumber }} resolvers dns init-addr none cookie {{ $releaseName }}-{{ $portNumber }}-{{ $i }}
314315
{{- end }}
315316
{{- end }}
316317
{{- end }}

charts/templates/configmap-scripts.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: ConfigMap
33
metadata:
4-
name: {{ .Release.Name }}-scripts
4+
name: {{ include "marklogic.fullname" . }}-scripts
55
data:
66
liveness-probe.sh: |
77
#!/bin/bash

charts/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
apiVersion: v1
22
kind: Service
33
metadata:
4-
name: {{ include "marklogic.fullname" . }}-cluster
4+
name: {{ include "marklogic.clusterServiceName" . }}
55
namespace: {{ .Values.namespace}}
66
labels:
77
{{- include "marklogic.labels" . | nindent 4 }}

0 commit comments

Comments
 (0)