Skip to content

Commit

Permalink
refactor constants
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewazores committed Jan 21, 2025
1 parent a5e5398 commit bfe99e4
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1856,7 +1856,7 @@ func NewDatabaseContainer(cr *model.CryostatInstance, imageTag string, tls *TLSC
}
mounts = append(mounts, tlsSecretMount)

args = append(args, "-c", "ssl=on", "-c", fmt.Sprintf("ssl_cert_file=%s/tls.crt", tlsPath), "-c", fmt.Sprintf("ssl_key_file=%s/tls.key", tlsPath))
args = append(args, "-c", "ssl=on", "-c", fmt.Sprintf("ssl_cert_file=%s/%s", tlsPath, corev1.TLSCertKey), "-c", fmt.Sprintf("ssl_key_file=%s/%s", tlsPath, corev1.TLSPrivateKeyKey))
}

return corev1.Container{
Expand Down
8 changes: 4 additions & 4 deletions internal/test/resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -2089,10 +2089,10 @@ func (r *TestResources) NewReportsEnvironmentVariables(resources *corev1.Resourc
Value: "10000",
}, corev1.EnvVar{
Name: "QUARKUS_HTTP_SSL_CERTIFICATE_KEY_FILES",
Value: fmt.Sprintf("/var/run/secrets/operator.cryostat.io/%s-reports-tls/tls.key", r.Name),
Value: fmt.Sprintf("/var/run/secrets/operator.cryostat.io/%s-reports-tls/%s", r.Name, corev1.TLSPrivateKeyKey),
}, corev1.EnvVar{
Name: "QUARKUS_HTTP_SSL_CERTIFICATE_FILES",
Value: fmt.Sprintf("/var/run/secrets/operator.cryostat.io/%s-reports-tls/tls.crt", r.Name),
Value: fmt.Sprintf("/var/run/secrets/operator.cryostat.io/%s-reports-tls/%s", r.Name, corev1.TLSCertKey),
}, corev1.EnvVar{
Name: "QUARKUS_HTTP_INSECURE_REQUESTS",
Value: "disabled",
Expand Down Expand Up @@ -2213,9 +2213,9 @@ func (r *TestResources) NewDatabaseArgs() []string {
"-c",
"ssl=on",
"-c",
fmt.Sprintf("ssl_cert_file=/var/run/secrets/operator.cryostat.io/%s-database-tls/tls.crt", r.Name),
fmt.Sprintf("ssl_cert_file=/var/run/secrets/operator.cryostat.io/%s-database-tls/%s", r.Name, corev1.TLSCertKey),
"-c",
fmt.Sprintf("ssl_key_file=/var/run/secrets/operator.cryostat.io/%s-database-tls/tls.key", r.Name),
fmt.Sprintf("ssl_key_file=/var/run/secrets/operator.cryostat.io/%s-database-tls/%s", r.Name, corev1.TLSPrivateKeyKey),
)
}

Expand Down

0 comments on commit bfe99e4

Please sign in to comment.