diff --git a/apis/kubedb/v1alpha2/constants.go b/apis/kubedb/v1alpha2/constants.go index da23080d80..8fbcc2787d 100644 --- a/apis/kubedb/v1alpha2/constants.go +++ b/apis/kubedb/v1alpha2/constants.go @@ -437,17 +437,20 @@ const ( // =========================== Redis Constants ============================ RedisConfigKey = "redis.conf" // RedisConfigKey is going to create for the customize redis configuration // DefaultConfigKey is going to create for the default redis configuration - RedisContainerName = ResourceSingularRedis - RedisSentinelContainerName = "redissentinel" - DefaultConfigKey = "default.conf" - RedisShardKey = RedisKey + "/shard" - RedisDatabasePortName = "db" - RedisPrimaryServicePortName = "primary" - RedisDatabasePort = 6379 - RedisSentinelPort = 26379 - RedisGossipPortName = "gossip" - RedisGossipPort = 16379 - RedisSentinelPortName = "sentinel" + RedisContainerName = ResourceSingularRedis + RedisSentinelContainerName = "redissentinel" + DefaultConfigKey = "default.conf" + RedisShardKey = RedisKey + "/shard" + RedisDatabasePortName = "db" + RedisPrimaryServicePortName = "primary" + RedisDatabasePort = 6379 + RedisSentinelPort = 26379 + RedisGossipPortName = "gossip" + RedisGossipPort = 16379 + RedisSentinelPortName = "sentinel" + RedisInitContainerName = "redis-init" + RedisCoordinatorContainerName = "rd-coordinator" + RedisSentinelInitContainerName = "sentinel-init" RedisScriptVolumeName = "script-vol" RedisScriptVolumePath = "/scripts" @@ -460,6 +463,8 @@ const ( RedisSentinelTLSVolumePath = "/sentinel-certs" RedisConfigVolumeName = "redis-config" RedisConfigVolumePath = "/usr/local/etc/redis/" + RedisInitVolumeName = "init-volume" + RedisInitVolumePath = "/init" RedisNodeFlagMaster = "master" RedisNodeFlagNoAddr = "noaddr" @@ -468,8 +473,11 @@ const ( RedisKeyFileSecretSuffix = "key" RedisPEMSecretSuffix = "pem" RedisRootUsername = "default" - EnvRedisUser = "USERNAME" - EnvRedisPassword = "REDISCLI_AUTH" + + EnvRedisUser = "USERNAME" + EnvRedisPassword = "REDISCLI_AUTH" + EnvRedisMode = "REDIS_MODE" + EnvRedisMajorRedisVersion = "MAJOR_REDIS_VERSION" // =========================== PgBouncer Constants ============================ PgBouncerUpstreamServerCA = "upstream-server-ca.crt" @@ -540,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: