Skip to content

Commit

Permalink
Fix #1107: disable camel case conversion by default
Browse files Browse the repository at this point in the history
  • Loading branch information
nicolaferraro committed Jan 12, 2022
1 parent 7c9596c commit 371150f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addons/keda/keda.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ type kedaTrait struct {
trait.BaseTrait `property:",squash"`
// Enables automatic configuration of the trait.
Auto *bool `property:"auto" json:"auto,omitempty"`
// Convert metadata properties to camelCase (needed because trait properties use kebab-case). Enabled by default.
// Convert metadata properties to camelCase (needed because trait properties use kebab-case). Disabled by default.
CamelCaseConversion *bool `property:"camel-case-conversion" json:"camelCaseConversion,omitempty"`
// Set the spec->replicas field on the top level controller to an explicit value if missing, to allow KEDA to recognize it as a scalable resource
HackControllerReplicas *bool `property:"hack-controller-replicas" json:"hackControllerReplicas,omitempty"`
Expand Down Expand Up @@ -164,7 +164,7 @@ func (t *kedaTrait) addScalingResources(e *trait.Environment) error {
meta := make(map[string]string)
for k, v := range trigger.Metadata {
kk := k
if t.CamelCaseConversion == nil || *t.CamelCaseConversion {
if t.CamelCaseConversion != nil && *t.CamelCaseConversion {
kk = scase.LowerCamelCase(k)
}
meta[kk] = v
Expand Down

0 comments on commit 371150f

Please sign in to comment.