Skip to content

fix: liveness probe would include invalid value enable#5369

Merged
Skarlso merged 2 commits intoexternal-secrets:mainfrom
Skarlso:fix-liveness-probe
Sep 25, 2025
Merged

fix: liveness probe would include invalid value enable#5369
Skarlso merged 2 commits intoexternal-secrets:mainfrom
Skarlso:fix-liveness-probe

Conversation

@Skarlso
Copy link
Copy Markdown
Contributor

@Skarlso Skarlso commented Sep 24, 2025

Problem Statement

Since it's including the entire body enabled would have been part of the rendered thing in Kubernetes manifest leading to a potential failure:

        enabled: true
        initialDelaySeconds: 10
        periodSeconds: 10
        timeoutSeconds: 10
        failureThreshold: 10
        successThreshold: 10
        httpGet:
          path: /healthz
          port: "8080"
          scheme: HTTP

enabled: true here is invalid. We need an internal field that can be used for entire field parsing here:

          {{- if .Values.livenessProbe.enabled }}
          livenessProbe:
          {{- toYaml .Values.livenessProbe.spec | nindent 12 }}
          {{- end }}

Note that spec.template.spec.containers[0].livenessProbe.httpGet.port should still be the path and not spec.template.spec.containers[0].livenessProbe.spec.httpGet.port. Because that would mean it includes spec.

Related Issue

Fixes #...

Proposed Changes

How do you like to solve the issue and why?

Format

Please ensure that your PR follows the following format for the title:

feat(scope): add new feature
fix(scope): fix bug
docs(scope): update documentation
chore(scope): update build tool or dependencies
ref(scope): refactor code
clean(scope): provider cleanup
test(scope): add tests
perf(scope): improve performance
desig(scope): improve design

Where scope is optionally one of:

  • charts
  • release
  • testing
  • security
  • templating

Checklist

  • I have read the contribution guidelines
  • All commits are signed with git commit --signoff
  • My changes have reasonable test coverage
  • All tests pass with make test
  • I ensured my PR is ready for review with make reviewable

Signed-off-by: Gergely Brautigam <182850+Skarlso@users.noreply.github.com>
@github-actions github-actions bot added kind/bug Categorizes issue or PR as related to a bug. size/m labels Sep 24, 2025
@Skarlso Skarlso moved this to In Review in External Secrets Sep 24, 2025
@sonarqubecloud
Copy link
Copy Markdown

@rkferreira
Copy link
Copy Markdown
Contributor

rkferreira commented Sep 24, 2025

I would suggest

{{- if .Values.livenessProbe }}

Values:

  livenessProbe: {}
    # initialDelaySeconds: 10
    # periodSeconds: 10
    # timeoutSeconds: 10
    # failureThreshold: 10
    # successThreshold: 10
      # httpGet:
      # path: /healthz
        # port: "8080"
        # scheme: HTTP

@Skarlso
Copy link
Copy Markdown
Contributor Author

Skarlso commented Sep 25, 2025

That would exclude the values from the docs and the schema that is there to help auto completion and the likes.

@Skarlso Skarlso merged commit 47d8814 into external-secrets:main Sep 25, 2025
29 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in External Secrets Sep 25, 2025
SamuelMolling pushed a commit to SamuelMolling/external-secrets that referenced this pull request Oct 24, 2025
…crets#5369)

Signed-off-by: Samuel Molling <samuelmolling@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/bug Categorizes issue or PR as related to a bug. size/m

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants