Skip to content

Commit

Permalink
Update go.mod
Browse files Browse the repository at this point in the history
Signed-off-by: Sabbir <[email protected]>
  • Loading branch information
sabbir-hossain70 committed Sep 16, 2024
1 parent 43d5672 commit b4df79f
Show file tree
Hide file tree
Showing 9 changed files with 54 additions and 20 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -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
)
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -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=
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,3 +63,7 @@ spec.exporter.image.`, p.Name)
}
return nil
}

func (p PgBouncerVersion) IsDeprecated() bool {
return p.Spec.Deprecated
}
26 changes: 21 additions & 5 deletions vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -212,7 +212,6 @@ func (r *Cassandra) SetDefaults() {
ExternallyManaged: false,
}
}

}

var casVersion catalog.CassandraVersion
Expand Down Expand Up @@ -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
}
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ spec:
healthChecker:
default:
failureThreshold: 3
periodSeconds: 30
periodSeconds: 20
timeoutSeconds: 10
properties:
disableWriteCheck:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ spec:
type: object
spec:
properties:
UpdateVersion:
properties:
readinessCriteria:
type: object
targetVersion:
type: string
type: object
apply:
default: IfReady
enum:
Expand Down Expand Up @@ -183,7 +176,13 @@ spec:
enum:
- HorizontalScaling
- VerticalScaling
- UpdateVersion
type: string
updateVersion:
properties:
targetVersion:
type: string
type: object
verticalScaling:
properties:
exporter:
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b4df79f

Please sign in to comment.