diff --git a/go.mod b/go.mod index 072ebdd2..de058185 100644 --- a/go.mod +++ b/go.mod @@ -33,7 +33,7 @@ require ( k8s.io/klog/v2 v2.130.1 kmodules.xyz/client-go v0.30.13 kmodules.xyz/custom-resources v0.30.0 - kubedb.dev/apimachinery v0.47.1-0.20240905094616-0f3ede79a000 + kubedb.dev/apimachinery v0.47.1-0.20240916095012-c4598e143fee sigs.k8s.io/controller-runtime v0.18.4 xorm.io/xorm v1.3.6 ) diff --git a/go.sum b/go.sum index 0f3aaa28..226d4449 100644 --- a/go.sum +++ b/go.sum @@ -802,8 +802,8 @@ kmodules.xyz/monitoring-agent-api v0.29.0 h1:gpFl6OZrlMLb/ySMHdREI9EwGtnJ91oZBn9 kmodules.xyz/monitoring-agent-api v0.29.0/go.mod h1:iNbvaMTgVFOI5q2LJtGK91j4Dmjv4ZRiRdasGmWLKQI= kmodules.xyz/offshoot-api v0.30.0 h1:dq9F93pu4Q8rL9oTcCk+vGGy8vpS7RNt0GSwx7Bvhec= kmodules.xyz/offshoot-api v0.30.0/go.mod h1:o9VoA3ImZMDBp3lpLb8+kc2d/KBxioRwCpaKDfLIyDw= -kubedb.dev/apimachinery v0.47.1-0.20240905094616-0f3ede79a000 h1:eU5wtcyAPXJpGqiJ7yWrYBFoT4QsGT5t95bCE56w/os= -kubedb.dev/apimachinery v0.47.1-0.20240905094616-0f3ede79a000/go.mod h1:iD6XKg9Blvfd9iYEO0N9GKiSz6r+yzEPZnfkYdESNG4= +kubedb.dev/apimachinery v0.47.1-0.20240916095012-c4598e143fee h1:RMFhW05n0VbzB3sTt4H3UqlKocCWW6m3h7DCAVsEwKE= +kubedb.dev/apimachinery v0.47.1-0.20240916095012-c4598e143fee/go.mod h1:iD6XKg9Blvfd9iYEO0N9GKiSz6r+yzEPZnfkYdESNG4= kubeops.dev/petset v0.0.5-0.20240603165102-e2d9decb8abe h1:uWyps3VIDFwGuL0yQa0eMGaLg4ofVwpy59U14Trxnz8= kubeops.dev/petset v0.0.5-0.20240603165102-e2d9decb8abe/go.mod h1:A15vh0r979NsvL65DTIZKWsa/NoX9VapHBAEw1ZsdYI= lukechampine.com/uint128 v1.1.1/go.mod h1:c4eWIwlEGaxC/+H1VguhU4PHXNWDCDMUlWdIWl2j1gk= diff --git a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgbouncer_version_helpers.go b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgbouncer_version_helpers.go index 945e3765..9fe9fb1c 100644 --- a/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgbouncer_version_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/catalog/v1alpha1/pgbouncer_version_helpers.go @@ -63,3 +63,7 @@ spec.exporter.image.`, p.Name) } return nil } + +func (p PgBouncerVersion) IsDeprecated() bool { + return p.Spec.Deprecated +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go index 3e9a55a5..ed4c7cc0 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go @@ -1348,11 +1348,27 @@ const ( // =========================== Cassandra Constants ============================ const ( - CassandraNativeTcpPort = 9042 - CassandraInterNodePort = 7000 - CassandraJmxPort = 7199 - - CassandraUserAdmin = "admin" + CassandraNativeTcpPort = 9042 + CassandraInterNodePort = 7000 + CassandraInterNodeSslPort = 7001 + CassandraJmxPort = 7199 + + CassandraNativeTcpPortName = "cql" + CassandraInterNodePortName = "internode" + CassandraInterNodeSslPortName = "internode-ssl" + CassandraJmxPortName = "jmx" + + CassandraUserAdmin = "admin" + CassandraStandaloneSeed = "cassandra-sample-0.cassandra-sample-pods.default.svc.cluster.local" + CassandraAuthCommand = "/usr/local/bin/docker-entrypoint.sh cassandra -f & /tmp/sc/cassandra-auth.sh" + CassandraMetadataName = "metadata.name" + CassandraMetadataNamespace = "metadata.namespace" + CassandraStatusPodIP = "status.podIP" + + CassandraPasswordAuthenticator = "PasswordAuthenticator" + CassandraAllowAllAuthenticator = "AllowAllAuthenticator" + + CassandraTopology = "CASSANDRA_TOPOLOGY" CassandraOperatorConfigDir = "/tmp/config/operator-config" CassandraMainConfigDir = "/etc/cassandra" diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go index d84dcdea..dcb40443 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_helpers.go @@ -180,7 +180,7 @@ func (r *Cassandra) GetConnectionScheme() string { func (r *Cassandra) SetHealthCheckerDefaults() { if r.Spec.HealthChecker.PeriodSeconds == nil { - r.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(60) + r.Spec.HealthChecker.PeriodSeconds = pointer.Int32P(30) } if r.Spec.HealthChecker.TimeoutSeconds == nil { r.Spec.HealthChecker.TimeoutSeconds = pointer.Int32P(10) @@ -212,7 +212,6 @@ func (r *Cassandra) SetDefaults() { ExternallyManaged: false, } } - } var casVersion catalog.CassandraVersion @@ -332,3 +331,19 @@ func (r *Cassandra) assignDefaultContainerSecurityContext(csVersion *catalog.Cas rc.SeccompProfile = secomp.DefaultSeccompProfile() } } + +func (r *Cassandra) GetSeed() string { + seed := " " + if r.Spec.Topology == nil { + seed = kubedb.CassandraStandaloneSeed + " , " + return seed + } + for _, rack := range r.Spec.Topology.Rack { + rackCount := min(*rack.Replicas, 3) + for i := int32(0); i < rackCount; i++ { + current_seed := fmt.Sprintf("cassandra-sample-rack-%s-%d.cassandra-sample-rack-%s-pods.default.svc.cluster.local", rack.Name, i, rack.Name) + seed += current_seed + " , " + } + } + return seed +} diff --git a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_types.go b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_types.go index 7ebb6a87..5cf6a657 100644 --- a/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_types.go +++ b/vendor/kubedb.dev/apimachinery/apis/kubedb/v1alpha2/cassandra_types.go @@ -96,7 +96,7 @@ type CassandraSpec struct { // HealthChecker defines attributes of the health checker // +optional - // +kubebuilder:default={periodSeconds: 30, timeoutSeconds: 10, failureThreshold: 3} + // +kubebuilder:default={periodSeconds: 20, timeoutSeconds: 10, failureThreshold: 3} HealthChecker kmapi.HealthCheckSpec `json:"healthChecker"` } diff --git a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_cassandras.yaml b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_cassandras.yaml index 7c7626f9..1aa309c9 100644 --- a/vendor/kubedb.dev/apimachinery/crds/kubedb.com_cassandras.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/kubedb.com_cassandras.yaml @@ -74,7 +74,7 @@ spec: healthChecker: default: failureThreshold: 3 - periodSeconds: 30 + periodSeconds: 20 timeoutSeconds: 10 properties: disableWriteCheck: diff --git a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml index 818e86fb..ff8aff8c 100644 --- a/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml +++ b/vendor/kubedb.dev/apimachinery/crds/ops.kubedb.com_pgbounceropsrequests.yaml @@ -42,13 +42,6 @@ spec: type: object spec: properties: - UpdateVersion: - properties: - readinessCriteria: - type: object - targetVersion: - type: string - type: object apply: default: IfReady enum: @@ -183,7 +176,13 @@ spec: enum: - HorizontalScaling - VerticalScaling + - UpdateVersion type: string + updateVersion: + properties: + targetVersion: + type: string + type: object verticalScaling: properties: exporter: diff --git a/vendor/modules.txt b/vendor/modules.txt index 4d9e6d36..743ee9b6 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -1561,7 +1561,7 @@ kmodules.xyz/offshoot-api/api/v1 kmodules.xyz/offshoot-api/api/v1/conversion kmodules.xyz/offshoot-api/api/v2 kmodules.xyz/offshoot-api/util -# kubedb.dev/apimachinery v0.47.1-0.20240905094616-0f3ede79a000 +# kubedb.dev/apimachinery v0.47.1-0.20240916095012-c4598e143fee ## explicit; go 1.22.1 kubedb.dev/apimachinery/apis kubedb.dev/apimachinery/apis/catalog