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

[stable/stolon] Fix issue with secret deletion during helm upgrade - #5903

Merged
k8s-ci-robot merged 8 commits into
helm:masterfrom
rtluckie:bugfix/fix_secret_deletion
Jun 13, 2018
Merged

k8s-ci-robot merged 8 commits into
helm:masterfrom
rtluckie:bugfix/fix_secret_deletion

Conversation

@rtluckie

@rtluckie rtluckie commented Jun 4, 2018 •

Copy link
Copy Markdown
Contributor
  • fix issue with secret deletion during helm upgrade
  • cleanup white-space in secrets
  • add link to inspiration chart
  • add lwolf as chart maintainer

@k8s-ci-robot k8s-ci-robot added the cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. label Jun 4, 2018
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

Hi @rtluckie. Thanks for your PR.

I'm waiting for a kubernetes 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.

I understand the commands that are listed here.

Details

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 needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 4, 2018
@rtluckie rtluckie changed the title Fix issue with secret deletion during helm upgrade [stable/stolon] Fix issue with secret deletion during helm upgrade Jun 4, 2018
@rtluckie

rtluckie commented Jun 4, 2018

Copy link
Copy Markdown
Contributor Author

/assign @unguiculus

Comment thread stable/stolon/Chart.yaml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You should bump the minor version since you're adding features.

Comment thread stable/stolon/templates/secret.yaml Outdated

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain why you remove {{ if .Release.IsInstall }} and add the annotation instead?

@rtluckie rtluckie Jun 5, 2018 •

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@unguiculus I'm still trying to sort this out. Intent is to create the secret on initial install and maintain the secret data with subsequent helm upgrades. With {{ if .Release.IsInstall }} the secret is deleted during helm upgrade. I thought the removal of {{ if .Release.IsInstall }} + addition of annotation would remedy, but it does not appear so.

see gist for details.

any guidance would be appreciated.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The annotation doesn't help here because you don't delete the release.

I would remove {{ if .Release.IsInstall }} and live with the fact that auto-generated passwords are regenerated on upgrade. Many charts have this problem. Using --reuse-values could help here. Alternatively, remove default passwords completely and make them required. You can provide a custom values file with passwords for CI only.

See https://github.com/kubernetes/charts/blob/master/test/README.md#providing-custom-test-values.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to go into the readme.

Ryan Luckie added 4 commits June 6, 2018 12:12
- fix issue with secret deletion during helm update
- add link to inspiration chart
- add lwolf as chart maintainer
- remove `"helm.sh/resource-policy": keep` annotation
- require `superuserPassword` and `replicationPassword`
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/S Denotes a PR that changes 10-29 lines, ignoring generated files. labels Jun 6, 2018
@rtluckie

rtluckie commented Jun 7, 2018

Copy link
Copy Markdown
Contributor Author

/retest

@k8s-ci-robot

Copy link
Copy Markdown
Contributor

@rtluckie: you can't request testing unless you are a kubernetes member.

Details

In response to this:

/retest

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.

Comment thread stable/stolon/values.yaml Outdated
## password for the superuser (default is 40 random chars)
# superuserPassword: ""
## password for the superuser
superuserPassword: "superuserPassword"

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now you are setting default passwords. That's not good. If you don't want to auto-generate them, make them empty and use the required function. Provide an additional values.yaml for CI that sets passwords for CI only.

@k8s-ci-robot k8s-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Jun 11, 2018
@unguiculus

Copy link
Copy Markdown
Member

The values file for CI should only contain values that override the defaults from values.yaml. Please fix linting issues.

- make `superuserPassword` and `replicationPassword` values required
- add CI specific values files
- bump to latest tagged image of stolon
@k8s-ci-robot k8s-ci-robot added size/M Denotes a PR that changes 30-99 lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Jun 11, 2018
@rtluckie

Copy link
Copy Markdown
Contributor Author

@unguiculus all issues/requested changes should be resolved

@unguiculus

Copy link
Copy Markdown
Member

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 13, 2018
@k8s-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: rtluckie, unguiculus

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

The pull request process is described here

Details 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 Jun 13, 2018
@unguiculus unguiculus removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Jun 13, 2018
@k8s-ci-robot
k8s-ci-robot merged commit 15ec2d2 into helm:master Jun 13, 2018
rtluckie added a commit to cisco-sso/charts that referenced this pull request Jun 14, 2018
- changes have been merged upstream helm/charts#5903
jainishshah17 added a commit to jainishshah17/charts that referenced this pull request Jun 14, 2018
* art-ha-static-volumes: (60 commits)
  added support for static pv
  [stable/artifactory] adding support for edge node and replicator (helm#5649)
  [stable/grafana] Set the user and fs group for grafana (helm#5854)
  [stable/stolon] Fix issue with secret deletion during helm upgrade (helm#5903)
  cert-manager: fast-forward to upstream 36289cf0 (helm#5919)
  Split Jenkins readiness and liveness probe periods (helm#5704)
  Kafka release name check (helm#5770)
  Adding JFrog Distribution (helm#5631)
  Correct default zookeeper host to be compatible with zk charts (helm#5824)
  [stable/redis] add RBAC (helm#5971)
  [stable/wordpress] Set dependencies to latest version (helm#6074)
  [stable/rabbitmq] Release 1.1.6 (helm#6095)
  [stable/mariadb] Fix configurable parameters (helm#6092)
  [stable/keycloak] Add option to configure sidecars and misc improvements (helm#6090)
  [stable/kubewatch] - Use maintained bitnami image for kubewatch (helm#5871)
  [stable/ghost] Release 4.0.1 (helm#6085)
  update PROCESSES.md to clarify promotion process (helm#6084)
  [incubator/drone] Move drone from incubator to stable (helm#5780)
  fix for helm#6039 (helm#6042)
  [stable/sonatype-nexus] Update image to 3.12.1 (helm#6076)
  ...
@rtluckie
rtluckie deleted the bugfix/fix_secret_deletion branch July 18, 2018 21:11
voron pushed a commit to dysnix/helm-charts that referenced this pull request Sep 5, 2018
…elm#5903)

* Fix issue with secret deletion during helm upgrade

- fix issue with secret deletion during helm update
- add link to inspiration chart
- add lwolf as chart maintainer

* Add port definition to sentinel deployment manifest

- fix for prometheus scraping

* requested changes

* Suggested changes

- remove `"helm.sh/resource-policy": keep` annotation
- require `superuserPassword` and `replicationPassword`

* Requested changes

- make `superuserPassword` and `replicationPassword` values required
- add CI specific values files
- bump to latest tagged image of stolon

* Update values.yaml

* Update Chart.yaml

* Update README.md

Signed-off-by: voron <[email protected]>
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. cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. lgtm Indicates that a PR is ready to be merged. size/M Denotes a PR that changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants