Skip to content

Commit f052ee8

Browse files
pengzhoumlPeng Zhou
andauthored
Change allowLongHostname to allowLongHostnames (#224)
* Update appVersion to 11.2.0 * Update Reference link for docker image issue and limitation * update readme from PR review * update allowLongHostname to allowLongHostnames * update readme and template test --------- Co-authored-by: Peng Zhou <[email protected]>
1 parent 6ef560c commit f052ee8

File tree

5 files changed

+11
-10
lines changed

5 files changed

+11
-10
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,11 +107,12 @@ 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` |∂
110111
| `group.name` | Group name for joining MarkLogic cluster | `Default` |
111112
| `group.enableXdqpSsl` | SSL encryption for XDQP | `true` |
112113
| `bootstrapHostName` | Host name of MarkLogic bootstrap host (to join a cluster) | `""` |
113114
| `image.repository` | Repository for MarkLogic image | `marklogicdb/marklogic-db` |
114-
| `image.tag` | Image tag for MarkLogic image | `11.1.0-centos-1.1.2` |
115+
| `image.tag` | Image tag for MarkLogic image | `11.2.0-centos-1.1.2` |
115116
| `image.pullPolicy` | Image pull policy for MarkLogic image | `IfNotPresent` |
116117
| `initContainers.configureGroup.image` | Image for configureGroup InitContainer | `curlimages/curl:8.6.0` |
117118
| `initContainers.configureGroup.pullPolicy` | Pull policy for configureGroup InitContainer | `IfNotPresent` |

charts/templates/_helpers.tpl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -145,8 +145,8 @@ Validate values file
145145
*/}}
146146
{{- define "marklogic.checkInputError" -}}
147147
{{- $fqdn := include "marklogic.fqdn" . }}
148-
{{- if and (gt (len $fqdn) 64) (not .Values.allowLongHostname) }}
149-
{{- $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 allowLongHostname: true in your Helm values file." }}
148+
{{- if and (gt (len $fqdn) 64) (not .Values.allowLongHostnames) }}
149+
{{- $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." }}
150150
{{- fail $errorMessage }}
151151
{{- end }}
152152
{{- end }}

charts/values.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ terminationGracePeriod: 120
1515
## Kubernetes cluster domain name
1616
clusterDomain: cluster.local
1717

18-
## To allow deployment with hostname over 64 characters
18+
## Allow deployment with hostname over 64 characters
1919
## This is not remmended as it may cause issues when turning on TLS on MarkLogic Server
2020
## Because MarkLogic Server only supports using CN as hostname in the certificate
2121
## There is a limit of 64 characters for CN in the certificate
22-
allowLongHostname: false
22+
allowLongHostnames: false
2323

2424
## Group related settings
2525
group:

makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ prepare:
7070
.PHONY: lint
7171
lint:
7272
@echo "> Linting helm charts....."
73-
helm lint --set allowLongHostname=true --with-subcharts charts/ $(if $(saveOutput),> helm-lint-output.txt,)
73+
helm lint --set allowLongHostnames=true --with-subcharts charts/ $(if $(saveOutput),> helm-lint-output.txt,)
7474

7575
@echo "> Linting all tests....."
7676
golangci-lint run --timeout=5m $(if $(saveOutput),> test-lint-output.txt,)

test/template/template_test.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ func TestTemplatePersistence(t *testing.T) {
138138
require.Equal(t, statefulset.Spec.VolumeClaimTemplates[1].Spec.Resources.Requests.Storage().String(), additionalVolumeClaimTemplatesResourcesRequestsStorage)
139139
}
140140

141-
func TestAllowLongHostname(t *testing.T) {
141+
func TestAllowLongHostnames(t *testing.T) {
142142
// Path to the helm chart we will test
143143
helmChartPath, err := filepath.Abs("../../charts")
144144
require.NoError(t, err)
@@ -148,7 +148,7 @@ func TestAllowLongHostname(t *testing.T) {
148148
// Setup the args for helm install
149149
options := &helm.Options{
150150
SetValues: map[string]string{
151-
"allowLongHostname": "false",
151+
"allowLongHostnames": "false",
152152
},
153153
KubectlOptions: k8s.NewKubectlOptions("", "", namespaceName),
154154
}
@@ -163,9 +163,9 @@ func TestAllowLongHostname(t *testing.T) {
163163
require.NoError(t, err, "Expected no error due to short release name")
164164

165165
options.SetValues = map[string]string{
166-
"allowLongHostname": "true",
166+
"allowLongHostnames": "true",
167167
}
168168
_, err = helm.RenderTemplateE(t, options, helmChartPath, longReleaseName, []string{"templates/statefulset.yaml"})
169-
require.NoError(t, err, "Expected no error with longReleaseName due to set allowLongHostname to true")
169+
require.NoError(t, err, "Expected no error with longReleaseName due to set allowLongHostnames to true")
170170

171171
}

0 commit comments

Comments
 (0)