From 3a9f337b099c1183dacef994da2f611caff6f3a8 Mon Sep 17 00:00:00 2001 From: Abdullah Al Shaad <67102615+AbdullahAlShaad@users.noreply.github.com> Date: Thu, 8 Feb 2024 14:36:57 +0600 Subject: [PATCH] Add ZooKeeper SASL auth variables (#1141) Signed-off-by: Shaad7 --- apis/kubedb/v1alpha2/constants.go | 7 ++++++- apis/kubedb/v1alpha2/openapi_generated.go | 9 ++++++++- apis/kubedb/v1alpha2/zookeeper_types.go | 3 +++ crds/kubedb.com_zookeepers.yaml | 5 +++++ 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/apis/kubedb/v1alpha2/constants.go b/apis/kubedb/v1alpha2/constants.go index d2cd6a8b49..00488fcfea 100644 --- a/apis/kubedb/v1alpha2/constants.go +++ b/apis/kubedb/v1alpha2/constants.go @@ -548,7 +548,12 @@ const ( EnvZooKeeperClusterSize = "CLUSTER_SIZE" EnvZooKeeperUser = "ZK_USER" EnvZooKeeperPassword = "ZK_PASSWORD" - ZooKeeperSuperUsername = "super" + EnvZooKeeperJaasFilePath = "ZK_JAAS_FILE_PATH" + EnvZooKeeperJVMFLags = "JVMFLAGS" + + ZooKeeperSuperUsername = "super" + ZooKeeperSASLAuthLoginConfig = "-Djava.security.auth.login.config" + ZooKeeperJaasFilePath = "/data/jaas.conf" ) // List of possible condition types for a KubeDB object diff --git a/apis/kubedb/v1alpha2/openapi_generated.go b/apis/kubedb/v1alpha2/openapi_generated.go index 0ebcb134a4..96a6b3b98c 100644 --- a/apis/kubedb/v1alpha2/openapi_generated.go +++ b/apis/kubedb/v1alpha2/openapi_generated.go @@ -31116,6 +31116,13 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ZooKeeperSpec(ref common.Reference Format: "int32", }, }, + "adminServerPort": { + SchemaProps: spec.SchemaProps{ + Default: 0, + Type: []string{"integer"}, + Format: "int32", + }, + }, "storage": { SchemaProps: spec.SchemaProps{ Description: "Storage to specify how storage shall be used.", @@ -31184,7 +31191,7 @@ func schema_apimachinery_apis_kubedb_v1alpha2_ZooKeeperSpec(ref common.Reference }, }, }, - Required: []string{"version"}, + Required: []string{"version", "adminServerPort"}, }, }, Dependencies: []string{ diff --git a/apis/kubedb/v1alpha2/zookeeper_types.go b/apis/kubedb/v1alpha2/zookeeper_types.go index d8f5a009b0..210cdc4773 100644 --- a/apis/kubedb/v1alpha2/zookeeper_types.go +++ b/apis/kubedb/v1alpha2/zookeeper_types.go @@ -60,6 +60,9 @@ type ZooKeeperSpec struct { // +optional Replicas *int32 `json:"replicas"` + // +kubebuilder:default=8080 + AdminServerPort int32 `json:"adminServerPort"` + // Storage to specify how storage shall be used. Storage *core.PersistentVolumeClaimSpec `json:"storage,omitempty"` diff --git a/crds/kubedb.com_zookeepers.yaml b/crds/kubedb.com_zookeepers.yaml index e66264664a..0058aa123c 100644 --- a/crds/kubedb.com_zookeepers.yaml +++ b/crds/kubedb.com_zookeepers.yaml @@ -41,6 +41,10 @@ spec: type: object spec: properties: + adminServerPort: + default: 8080 + format: int32 + type: integer authSecret: properties: externallyManaged: @@ -2732,6 +2736,7 @@ spec: version: type: string required: + - adminServerPort - version type: object status: