Skip to content

[🐛 Bug]: node.lifecycle is not being rendered as expected #2419

@brunobritorj

Description

@brunobritorj

What happened?

The Helm values that we supply in chromeNode.lifecycle aren't being rendered in K8s Deployment.

How to reproduce:

For simplicity, create a values files which disables Edge and Firefox, and set a lifecycle command such as the postStart. In this example certutil is being used to import a custom certificate authority to nssdb.

# my-values.yaml
chromeNode:
  lifecycle:
    postStart:
      exec:
        command:
          - bash
          - -c
          - |
            certutil -d sql:/home/seluser/.pki/nssdb -A -t "C,," -n my-internal-ca -i /usr/local/share/ca-certificates/my-internal-ca.crt
edgeNode:
  enabled: false
firefoxNode:
  enabled: false

Installing the chart in the cluster (or just render the values as bellow).

helm template selenium-grid/ --values my-values.yaml | grep 'lifecycle:' -A 7
          lifecycle:
            preStop:
              exec:
                command:
                - bash
                - -c
                - '/opt/bin/nodePreStop.sh '
          startupProbe

Filtering the output as above, note that the supplied postStart was not rendered, instead, the default preStop remains there. If you installed chart in the cluster you can check the chromeNode deployment.

According values file description for that value, this "overwrites the defined preStop in deregisterLifecycle if any" but it's not working.

Command used to start Selenium Grid with Docker (or Kubernetes)

# my-values.yaml
chromeNode:
  lifecycle:
    postStart:
      exec:
        command:
          - bash
          - -c
          - |
            certutil -d sql:/home/seluser/.pki/nssdb -A -t "C,," -n my-internal-ca -i /usr/local/share/ca-certificates/my-internal-ca.crt
  edgeNode:
    enabled: false
  firefoxNode:
    enabled: false
helm template selenium-grid/ --values my-values.yaml

Relevant log output

helm template selenium-grid/ --values my-values.yaml | grep 'lifecycle:' -A 7
          lifecycle:
            preStop:
              exec:
                command:
                - bash
                - -c
                - '/opt/bin/nodePreStop.sh '
          startupProbe

Operating System

Ubuntu running helm

Docker Selenium version (image tag)

4.25.0-20240922

Selenium Grid chart version (chart version)

0.36.1

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions