Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

[stable/prometheus-blackbox-exporter] Fix PodDisruptionBudget configuration #19707

Merged
merged 3 commits into from
Jan 8, 2020

Conversation

darkstarmv
Copy link
Contributor

@darkstarmv darkstarmv commented Dec 19, 2019

Signed-off-by: Maxim Valiarovski maxim.valiarovski@target.com

Is this a new chart

NO

What this PR does / why we need it:

This PR is moving podDisruptionBudget.enabled out of the podDisruptionBudget yaml.
Field enabled breaks helm3 deployment:

helm upgrade --install blackbox-exporter stable/prometheus-blackbox-exporter --version 1.6.0 --dry-run --debug
history.go:52: [debug] getting history for release blackbox-exporter
upgrade.go:79: [debug] preparing upgrade for blackbox-exporter
upgrade.go:369: [debug] copying values from blackbox-exporter (v1) to new release.
Error: UPGRADE FAILED: error validating "": error validating data: ValidationError(PodDisruptionBudget.spec): unknown field "enabled" in io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec
helm.go:76: [debug] error validating "": error validating data: ValidationError(PodDisruptionBudget.spec): unknown field "enabled" in io.k8s.api.policy.v1beta1.PodDisruptionBudgetSpec
helm.sh/helm/v3/pkg/kube.scrubValidationError
	/home/circleci/helm.sh/helm/pkg/kube/client.go:525
helm.sh/helm/v3/pkg/kube.(*Client).Build
	/home/circleci/helm.sh/helm/pkg/kube/client.go:137
helm.sh/helm/v3/pkg/action.validateManifest
	/home/circleci/helm.sh/helm/pkg/action/upgrade.go:376
helm.sh/helm/v3/pkg/action.(*Upgrade).prepareUpgrade
	/home/circleci/helm.sh/helm/pkg/action/upgrade.go:188
helm.sh/helm/v3/pkg/action.(*Upgrade).Run
	/home/circleci/helm.sh/helm/pkg/action/upgrade.go:80
main.newUpgradeCmd.func1
	/home/circleci/helm.sh/helm/cmd/helm/upgrade.go:134
github.com/spf13/cobra.(*Command).execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
github.com/spf13/cobra.(*Command).ExecuteC
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main
	/home/circleci/helm.sh/helm/cmd/helm/helm.go:75
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1357
UPGRADE FAILED
main.newUpgradeCmd.func1
	/home/circleci/helm.sh/helm/cmd/helm/upgrade.go:136
github.com/spf13/cobra.(*Command).execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:826
github.com/spf13/cobra.(*Command).ExecuteC
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:914
github.com/spf13/cobra.(*Command).Execute
	/go/pkg/mod/github.com/spf13/cobra@v0.0.5/command.go:864
main.main
	/home/circleci/helm.sh/helm/cmd/helm/helm.go:75
runtime.main
	/usr/local/go/src/runtime/proc.go:203
runtime.goexit
	/usr/local/go/src/runtime/asm_amd64.s:1357

Special notes for your reviewer:

Checklist

[Place an '[x]' (no spaces) in all applicable fields. Please remove unrelated fields.]

  • DCO signed
  • Chart Version bumped
  • Variables are documented in the README.md
  • Title of the PR starts with chart name (e.g. [stable/mychartname])

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>
@helm-bot helm-bot added Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Dec 19, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @darkstarmv. Thanks for your PR.

I'm waiting for a helm member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@k8s-ci-robot k8s-ci-robot added the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Dec 19, 2019
@darkstarmv
Copy link
Contributor Author

/assign @gianrubio
/assign @desaintmartin

@naseemkullah
Copy link
Collaborator

naseemkullah commented Dec 25, 2019

If I may, values file should look SOMETHING (commented/default values on a per chart basis) like:

podDisruptionBudget: {}
  # maxUnavailable: 0

then template:

{{- if .Values.podDisruptionBudget -}}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
...

As such, the enabled is implicit.

@desaintmartin
Copy link
Collaborator

Thanks!
Because it is a breaking change, you should bump the MAJOR version of this chart and explain (like in other charts like Redis) how to upgrade.
I like the solution shown by David.

/ok-to-test
/assign

@k8s-ci-robot k8s-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Dec 29, 2019
Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>
@helm-bot helm-bot added size/S Denotes a PR that changes 10-29 lines, ignoring generated files. and removed size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Jan 2, 2020
Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>
@desaintmartin
Copy link
Collaborator

Thanks!
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jan 8, 2020
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: darkstarmv, desaintmartin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jan 8, 2020
@k8s-ci-robot k8s-ci-robot merged commit 99b76a2 into helm:master Jan 8, 2020
dargolith pushed a commit to dargolith/charts that referenced this pull request Jan 10, 2020
…ration (helm#19707)

* Fix PodDisruptionBudget configuration

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>

* simplify -podDisruptionBudget configuration management

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>

* Update readme

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>
arturrez pushed a commit to arturrez/stable-charts that referenced this pull request Jan 28, 2020
…ration (helm#19707)

* Fix PodDisruptionBudget configuration

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>

* simplify -podDisruptionBudget configuration management

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>

* Update readme

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>
Signed-off-by: Artur <artur@upbound.io>
arturrez pushed a commit to arturrez/stable-charts that referenced this pull request Jan 28, 2020
…ration (helm#19707)

* Fix PodDisruptionBudget configuration

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>

* simplify -podDisruptionBudget configuration management

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>

* Update readme

Signed-off-by: Maxim Valiarovski <maxim.valiarovski@target.com>
Signed-off-by: Artur <artur@upbound.io>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). lgtm Indicates that a PR is ready to be merged. ok-to-test size/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants