Skip to content

Commit

Permalink
Update apimachinery Dependency (#146)
Browse files Browse the repository at this point in the history
Signed-off-by: raihankhan <[email protected]>
  • Loading branch information
raihankhan authored Oct 31, 2024
1 parent 8b8905b commit 234b577
Show file tree
Hide file tree
Showing 8 changed files with 25 additions and 27 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ require (
k8s.io/klog/v2 v2.130.1
kmodules.xyz/client-go v0.30.28
kmodules.xyz/custom-resources v0.30.0
kubedb.dev/apimachinery v0.48.1-0.20241028074647-683c8d4491f4
kubedb.dev/apimachinery v0.48.1-0.20241031051422-3b38a0178476
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 @@ -804,8 +804,8 @@ kmodules.xyz/monitoring-agent-api v0.30.2 h1:sAgz5P5EXZqhlj1NzJ+QltAgeIx5bGSMj+a
kmodules.xyz/monitoring-agent-api v0.30.2/go.mod h1:BoZFPDDRB7J39CcUsSDlzgW8PQCwik4ILPleyUob+Mg=
kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI=
kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g=
kubedb.dev/apimachinery v0.48.1-0.20241028074647-683c8d4491f4 h1:1+DrfFOHjsKjZ1+1uqbJSi44D5slbKGv4jNlnh9DVKU=
kubedb.dev/apimachinery v0.48.1-0.20241028074647-683c8d4491f4/go.mod h1:NCiS4uS+F8DUyU9/tUQO3wqyNRNf0busab5/0Q2nYA0=
kubedb.dev/apimachinery v0.48.1-0.20241031051422-3b38a0178476 h1:1hruis2aZfkNZ+BsLN/pS811iRyJQsnV/7vAoIBr0XM=
kubedb.dev/apimachinery v0.48.1-0.20241031051422-3b38a0178476/go.mod h1:NCiS4uS+F8DUyU9/tUQO3wqyNRNf0busab5/0Q2nYA0=
kubeops.dev/petset v0.0.7 h1:F77BTRfUqRVO7kNc8q2oFSSviDmYBqni/osXqu0kgJ4=
kubeops.dev/petset v0.0.7/go.mod h1:lt0SZV4ohRy7RiwLNUnMoauG4lCbcRbSqhMg20rdUQg=
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 @@ -196,14 +196,6 @@ func (k *ConnectCluster) KafkaClientCredentialsSecretName() string {
return meta_util.NameWithSuffix(k.Name, "kafka-client-cred")
}

func (k *ConnectCluster) DefaultUserCredSecretName() string {
return meta_util.NameWithSuffix(k.OffshootName(), "auth")
}

func (k *ConnectCluster) DefaultKeystoreCredSecretName() string {
return meta_util.NameWithSuffix(k.Name, strings.ReplaceAll("connect-keystore-cred", "_", "-"))
}

// CertificateName returns the default certificate name and/or certificate secret name for a certificate alias
func (k *ConnectCluster) CertificateName(alias ConnectClusterCertificateAlias) string {
return meta_util.NameWithSuffix(k.Name, fmt.Sprintf("%s-connect-cert", string(alias)))
Expand All @@ -213,7 +205,14 @@ func (k *ConnectCluster) GetAuthSecretName() string {
if k.Spec.AuthSecret != nil && k.Spec.AuthSecret.Name != "" {
return k.Spec.AuthSecret.Name
}
return k.DefaultUserCredSecretName()
return meta_util.NameWithSuffix(k.OffshootName(), "auth")
}

func (k *ConnectCluster) GetKeystoreSecretName() string {
if k.Spec.KeystoreCredSecret != nil && k.Spec.KeystoreCredSecret.Name != "" {
return k.Spec.KeystoreCredSecret.Name
}
return meta_util.NameWithSuffix(k.OffshootName(), "keystore-cred")
}

// GetCertSecretName returns the secret name for a certificate alias if any,
Expand Down
2 changes: 1 addition & 1 deletion vendor/kubedb.dev/apimachinery/apis/kubedb/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -1645,7 +1645,7 @@ var (
// DefaultResourcesMemoryIntensiveSDB must be used for Singlestore when enabled monitoring or version >= 8.5.x
DefaultResourcesMemoryIntensiveSDB = core.ResourceRequirements{
Requests: core.ResourceList{
core.ResourceCPU: resource.MustParse(".500"),
core.ResourceCPU: resource.MustParse(".600"),
core.ResourceMemory: resource.MustParse("2Gi"),
},
Limits: core.ResourceList{
Expand Down
17 changes: 8 additions & 9 deletions vendor/kubedb.dev/apimachinery/apis/kubedb/v1/kafka_helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,7 +231,14 @@ func (k *Kafka) GetAuthSecretName() string {
if k.Spec.AuthSecret != nil && k.Spec.AuthSecret.Name != "" {
return k.Spec.AuthSecret.Name
}
return k.DefaultUserCredSecretName()
return meta_util.NameWithSuffix(k.OffshootName(), "auth")
}

func (k *Kafka) GetKeystoreSecretName() string {
if k.Spec.KeystoreCredSecret != nil && k.Spec.KeystoreCredSecret.Name != "" {
return k.Spec.KeystoreCredSecret.Name
}
return meta_util.NameWithSuffix(k.OffshootName(), "keystore-cred")
}

func (k *Kafka) GetPersistentSecrets() []string {
Expand All @@ -249,14 +256,6 @@ func (k *Kafka) CruiseControlConfigSecretName() string {
return meta_util.NameWithSuffix(k.OffshootName(), "cruise-control-config")
}

func (k *Kafka) DefaultUserCredSecretName() string {
return meta_util.NameWithSuffix(k.OffshootName(), "auth")
}

func (k *Kafka) DefaultKeystoreCredSecretName() string {
return meta_util.NameWithSuffix(k.Name, strings.ReplaceAll("keystore-cred", "_", "-"))
}

// CertificateName returns the default certificate name and/or certificate secret name for a certificate alias
func (k *Kafka) CertificateName(alias KafkaCertificateAlias) string {
return meta_util.NameWithSuffix(k.Name, fmt.Sprintf("%s-cert", string(alias)))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ func (d *Druid) AppBindingMeta() appcat.AppBindingMeta {

func (d *Druid) GetConnectionScheme() string {
scheme := "http"
//if d.Spec.EnableSSL {
// scheme = "https"
//}
if d.Spec.EnableSSL {
scheme = "https"
}
return scheme
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ spec:
- VerticalScaling
- VolumeExpansion
- Restart
- Configuration
- Reconfigure
- ReconfigureTLS
- RotateAuth
type: string
Expand Down
2 changes: 1 addition & 1 deletion vendor/modules.txt
Original file line number Diff line number Diff line change
Expand Up @@ -1564,7 +1564,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.48.1-0.20241028074647-683c8d4491f4
# kubedb.dev/apimachinery v0.48.1-0.20241031051422-3b38a0178476
## explicit; go 1.22.1
kubedb.dev/apimachinery/apis
kubedb.dev/apimachinery/apis/catalog
Expand Down

0 comments on commit 234b577

Please sign in to comment.