Skip to content

Commit 6256d35

Browse files
committed
Fix certificate management with ECK 2.16.1. The prepare-fs.sh script has been changed such that we now need to set the mount locations manually.
1 parent 1538b9a commit 6256d35

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

pkg/render/logstorage.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,8 @@ func (es *elasticsearchComponent) nodeSetTemplate(pvcTemplate corev1.PersistentV
786786

787787
if es.cfg.Installation.CertificateManagement != nil {
788788
config["xpack.security.http.ssl.certificate_authorities"] = []string{"/usr/share/elasticsearch/config/http-certs/ca.crt"}
789+
config["xpack.security.transport.ssl.key"] = "/usr/share/elasticsearch/config/transport-certs/transport.tls.key"
790+
config["xpack.security.transport.ssl.certificate"] = "/usr/share/elasticsearch/config/transport-certs/transport.tls.crt"
789791
}
790792
if operatorv1.IsFIPSModeEnabled(es.cfg.Installation.FIPSMode) {
791793
config["xpack.security.fips_mode.enabled"] = "true"

pkg/render/logstorage_test.go

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// Copyright (c) 2020-2024 Tigera, Inc. All rights reserved.
1+
// Copyright (c) 2020-2025 Tigera, Inc. All rights reserved.
22

33
// Licensed under the Apache License, Version 2.0 (the "License");
44
// you may not use this file except in compliance with the License.
@@ -18,6 +18,7 @@ import (
1818
"context"
1919
"fmt"
2020

21+
v1 "github.com/elastic/cloud-on-k8s/v2/pkg/apis/common/v1"
2122
. "github.com/onsi/ginkgo"
2223
. "github.com/onsi/ginkgo/extensions/table"
2324
. "github.com/onsi/gomega"
@@ -359,6 +360,16 @@ var _ = Describe("Elasticsearch rendering tests", func() {
359360
compareInitContainer(initContainers[4], "key-cert-elastic-transport", []corev1.VolumeMount{
360361
{Name: "elastic-internal-transport-certificates", MountPath: certificatemanagement.CSRCMountPath},
361362
}, false)
363+
Expect(resultES.Spec.NodeSets[0].Config).To(Equal(&v1.Config{Data: map[string]interface{}{
364+
"node.data": "true",
365+
"node.ingest": "true",
366+
"node.master": "true",
367+
"cluster.max_shards_per_node": 10000,
368+
"ingest.geoip.downloader.enabled": false,
369+
"xpack.security.http.ssl.certificate_authorities": []string{"/usr/share/elasticsearch/config/http-certs/ca.crt"},
370+
"xpack.security.transport.ssl.key": "/usr/share/elasticsearch/config/transport-certs/transport.tls.key",
371+
"xpack.security.transport.ssl.certificate": "/usr/share/elasticsearch/config/transport-certs/transport.tls.crt",
372+
}}))
362373
})
363374

364375
It("should render toleration on GKE", func() {

0 commit comments

Comments
 (0)