Skip to content

Commit

Permalink
Update feedback
Browse files Browse the repository at this point in the history
Signed-off-by: rickbrouwer <[email protected]>
  • Loading branch information
rickbrouwer authored Oct 29, 2024
1 parent a38df8c commit 803a249
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions pkg/scalers/cassandra_scaler.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ const (
)

func (m *cassandraMetadata) Validate() error {
if meta.TLS == tlsEnable && (meta.Cert == "" || meta.Key == "") {

Check failure on line 51 in pkg/scalers/cassandra_scaler.go

View workflow job for this annotation

GitHub Actions / Static Checks

undefined: meta) (typecheck)

Check failure on line 51 in pkg/scalers/cassandra_scaler.go

View workflow job for this annotation

GitHub Actions / Static Checks

undefined: meta) (typecheck)

Check failure on line 51 in pkg/scalers/cassandra_scaler.go

View workflow job for this annotation

GitHub Actions / Static Checks

undefined: meta (typecheck)

Check failure on line 51 in pkg/scalers/cassandra_scaler.go

View workflow job for this annotation

GitHub Actions / Static Checks

undefined: meta) (typecheck)
return errors.New("both cert and key are required when TLS is enabled")
}

// Handle port in ClusterIPAddress
splitVal := strings.Split(m.ClusterIPAddress, ":")
if len(splitVal) == 2 {
Expand Down Expand Up @@ -139,9 +143,6 @@ func createTempFile(prefix string, content string) (string, error) {

func parseCassandraTLS(meta *cassandraMetadata) error {
if meta.TLS == tlsEnable {
if meta.Cert == "" || meta.Key == "" {
return errors.New("both cert and key are required when TLS is enabled")
}

// Create temp files for certs
certFilePath, err := createTempFile("cert", meta.Cert)
Expand Down

0 comments on commit 803a249

Please sign in to comment.