Skip to content

k8s: Add ability to config trigger name #2777

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Apr 10, 2025

Conversation

lermit
Copy link
Contributor

@lermit lermit commented Apr 10, 2025

User description

Description

This PR add ability to configure trigger name in for Kuda scaledObject.

Motivation and Context

In order to be able to use scalingModifiers we need to have a name for each trigger.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist

  • I have read the contributing document.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

PR Type

Enhancement


Description

  • Added configuration for trigger name in KEDA ScaledObject.

  • Updated Helm chart templates to support trigger name.

  • Introduced triggerName field in values.yaml for customization.


Changes walkthrough 📝

Relevant files
Enhancement
_helpers.tpl
Add trigger name configuration in Helm template                   

charts/selenium-grid/templates/_helpers.tpl

  • Added conditional logic to include name field for triggers.
  • Integrated triggerName from values.yaml into the template.
  • +3/-0     
    values.yaml
    Add `triggerName` field in values.yaml                                     

    charts/selenium-grid/values.yaml

  • Introduced triggerName field under autoscaling configuration.
  • Documented the purpose of triggerName for customization.
  • +2/-0     

    Need help?
  • Type /help how to ... in the comments thread for any questions about Qodo Merge usage.
  • Check out the documentation for more information.
  • @CLAassistant
    Copy link

    CLAassistant commented Apr 10, 2025

    CLA assistant check
    All committers have signed the CLA.

    Copy link

    PR Reviewer Guide 🔍

    Here are some key observations to aid the review process:

    ⏱️ Estimated effort to review: 1 🔵⚪⚪⚪⚪
    🧪 No relevant tests
    🔒 No security concerns identified
    ⚡ Recommended focus areas for review

    Indentation Issue

    The indentation of the new trigger name field appears to be incorrect. The name field should be at the same indentation level as other trigger properties, not indented one level deeper.

    {{- if $.Values.autoscaling.triggerName }}
      name: {{ $.Values.autoscaling.triggerName | quote }}
    {{- end }}

    Copy link

    PR Code Suggestions ✨

    Explore these optional code suggestions:

    CategorySuggestion                                                                                                                                    Impact
    Possible issue
    Fix indentation issue

    The indentation of the name field is incorrect. It should be at the same
    indentation level as other trigger properties like authenticationRef and
    useCachedMetrics, not at the root level of the trigger definition.

    charts/selenium-grid/templates/_helpers.tpl [260-262]

     +  {{- if $.Values.autoscaling.triggerName }}
    -+    name: {{ $.Values.autoscaling.triggerName | quote }}
    ++  name: {{ $.Values.autoscaling.triggerName | quote }}
     +  {{- end }}

    [To ensure code accuracy, apply this suggestion manually]

    Suggestion importance[1-10]: 8

    __

    Why: The suggestion correctly identifies an important indentation issue. The name field is currently indented at the root level of the trigger definition, but it should be at the same level as other trigger properties like authenticationRef. This could cause incorrect YAML structure and potentially break the functionality of the Helm chart.

    Medium
    • More

    @VietND96 VietND96 merged commit 9bd4d8a into SeleniumHQ:trunk Apr 10, 2025
    19 of 28 checks passed
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    3 participants