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

[stable/nats] support for deploying nats with "Deployment" #13537

Merged
merged 5 commits into from
May 14, 2019
Merged

[stable/nats] support for deploying nats with "Deployment" #13537

merged 5 commits into from
May 14, 2019

Conversation

guessi
Copy link
Contributor

@guessi guessi commented May 6, 2019

What this PR does / why we need it:

Currently, nats-cluster is deploy via StatefulSets with no volume defined, also, scaling with Deployment is much more faster than StatefulSets.

Which issue this PR fixes

  • Slow scaling
  • Support for "Deployment"

Special notes for your reviewer:

  • N/A

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 contains starts with chart name e.g. [stable/chart]

@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/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels May 6, 2019
@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 May 6, 2019
@k8s-ci-robot
Copy link
Contributor

Hi @guessi. 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.

@guessi
Copy link
Contributor Author

guessi commented May 6, 2019

/assign @tompizmor

@guessi
Copy link
Contributor Author

guessi commented May 6, 2019

rebase

Copy link
Collaborator

@juan131 juan131 left a comment

Choose a reason for hiding this comment

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

Hi @guessi

If we're supporting two different modes: deployment and statefulset, then let's use two different manifests for each of them. It's extremely complex to understand the YAML if it's mixing configuration for the deployment and the statefulset.

Here you have an example (bitnami/minio):

https://github.com/bitnami/charts/blob/master/bitnami/minio/templates/statefulset.yaml
https://github.com/bitnami/charts/blob/master/bitnami/minio/templates/deployment-standalone.yaml

We use one manifest or the other depending on the parameter mode (see https://github.com/bitnami/charts/tree/master/bitnami/minio#configuration)

@guessi
Copy link
Contributor Author

guessi commented May 7, 2019

@juan131 will do, thanks for suggestion

Signed-off-by: guessi <guessi@gmail.com>
@helm-bot helm-bot 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. Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). labels May 7, 2019
@guessi
Copy link
Contributor Author

guessi commented May 7, 2019

@juan131 rebased and merged, please take a look for the diffs, thanks

Signed-off-by: guessi <guessi@gmail.com>
@helm-bot helm-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label May 7, 2019
Signed-off-by: guessi <guessi@gmail.com>
Copy link
Collaborator

@juan131 juan131 left a comment

Choose a reason for hiding this comment

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

Thanks so much for using different manifests. Please take a look to my suggestions when you have a chance.

stable/nats/templates/deployment.yaml Outdated Show resolved Hide resolved
stable/nats/templates/deployment.yaml Outdated Show resolved Hide resolved
stable/nats/templates/deployment.yaml Show resolved Hide resolved
stable/nats/README.md Outdated Show resolved Hide resolved
stable/nats/values.yaml Outdated Show resolved Hide resolved
@helm-bot helm-bot removed the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label May 10, 2019
Signed-off-by: guessi <guessi@gmail.com>
@helm-bot helm-bot added the Contribution Allowed If the contributor has signed the DCO or the CNCF CLA (prior to the move to a DCO). label May 10, 2019
@guessi
Copy link
Contributor Author

guessi commented May 10, 2019

@juan131 just update the PR, would like to have your review again, thanks.

@juan131
Copy link
Collaborator

juan131 commented May 13, 2019

HI @guessi

Why? It's just a path for configuration.

The directory /opt/bitnami/nats/ is the "working directory" and the non-root user (1001 by default) has writing permission on that directory. See: https://github.com/bitnami/bitnami-docker-nats/blob/master/1/debian-9/Dockerfile#L12

…)"

This reverts commit 5d1537d.

See discussion at the following link:
- #13537 (comment)

Signed-off-by: guessi <guessi@gmail.com>
@guessi
Copy link
Contributor Author

guessi commented May 13, 2019

@juan131 Thanks for let me know the trick inside Dockerfile.
Now it reverted, with extra comment on it, please check again.

Copy link
Collaborator

@juan131 juan131 left a comment

Choose a reason for hiding this comment

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

Thanks so much for addressing every suggestion! I'm approving your changes.

@juan131
Copy link
Collaborator

juan131 commented May 14, 2019

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added lgtm Indicates that a PR is ready to be merged. and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels May 14, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: guessi, juan131

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 May 14, 2019
@k8s-ci-robot k8s-ci-robot merged commit 1517cb6 into helm:master May 14, 2019
@guessi guessi deleted the nats-deployment branch May 14, 2019 10:26
goshlanguage pushed a commit to goshlanguage/charts that referenced this pull request May 17, 2019
* [stable/nats] support deploying nats with "Deployment"

Signed-off-by: guessi <guessi@gmail.com>

* [stable/nats] split statefulset/deployment with "mode" flag

Signed-off-by: guessi <guessi@gmail.com>

* [stable/nats] fix missing params in values-production.yaml

Signed-off-by: guessi <guessi@gmail.com>

* [stable/nats] enhanced resource type detection

Signed-off-by: guessi <guessi@gmail.com>

* Revert "[stable/nats] Update configuration path for gnatsd.conf (helm#13505)"

This reverts commit 5d1537d.

See discussion at the following link:
- helm#13537 (comment)

Signed-off-by: guessi <guessi@gmail.com>
eyenx pushed a commit to eyenx/charts that referenced this pull request May 28, 2019
* [stable/nats] support deploying nats with "Deployment"

Signed-off-by: guessi <guessi@gmail.com>

* [stable/nats] split statefulset/deployment with "mode" flag

Signed-off-by: guessi <guessi@gmail.com>

* [stable/nats] fix missing params in values-production.yaml

Signed-off-by: guessi <guessi@gmail.com>

* [stable/nats] enhanced resource type detection

Signed-off-by: guessi <guessi@gmail.com>

* Revert "[stable/nats] Update configuration path for gnatsd.conf (helm#13505)"

This reverts commit 5d1537d.

See discussion at the following link:
- helm#13537 (comment)

Signed-off-by: guessi <guessi@gmail.com>
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/L Denotes a PR that changes 100-499 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants