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

[stable/concourse] Make values.yaml more consistent #11296

Merged
merged 1 commit into from
Feb 25, 2019

Conversation

cirocosta
Copy link
Collaborator

@cirocosta cirocosta commented Feb 9, 2019

What this PR does / why we need it:

Previously, the values.yaml for stable/concourse didn't look much consistent, having some values with totally different commenting formats compared to others, making hard for us to establish a baseline of how those values should be documented and enforce them when reviewing PRs.

This commit also improves the documentation around some of those values that are not very easy to infer what they're all about.

Which issue this PR fixes

Special notes for your reviewer:

These changes do not change any behavior, and should not introduce any backward incompatibility - it's all about style and improving the documentation around the values.

However:

  • there are many changes here! Please let me know if you spot any typo or a dumb change that I erroneously made; and
  • garden properties are unchanged: that's on purpose as in 5.x (to be released very soon), those will all go away in favor of a garden config file (if you don't agree with not applying the changes to them, please let me know!)

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

cc @william-tran

@helm-bot helm-bot added size/XL Denotes a PR that changes 500-999 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 Feb 9, 2019
@k8s-ci-robot k8s-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 9, 2019
@helm-bot helm-bot added size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 9, 2019
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. labels Feb 17, 2019
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 17, 2019
@cirocosta
Copy link
Collaborator Author

As a result, now the templates from this Chart are all "kubeval"-ready:

find ./templates/ -name "*.yaml" | xargs -I[] helm template . -x [] | kubeval
The document stdin contains a valid Deployment
The document stdin contains a valid Service
The document stdin contains a valid Secret
The document stdin contains a valid ClusterRole
The document stdin is empty
The document stdin contains a valid PodDisruptionBudget
The document stdin is empty
The document stdin contains a valid RoleBinding
The document stdin contains a valid Role
The document stdin contains a valid RoleBinding
The document stdin contains a valid StatefulSet
The document stdin contains a valid ServiceAccount
The document stdin is empty
The document stdin contains a valid Namespace
The document stdin contains a valid ServiceAccount
The document stdin contains a valid Service

@@ -1,8 +0,0 @@
web:
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

damn, this one was me being stupid and using git add --all .. Lesson learned 👍

@cirocosta
Copy link
Collaborator Author

Hey,

As a result of this huge PR, we now have:

If you're curious, running charts-values-check, we can identify that the chart has 325 values that can be possibly set (wow!).


cc @xulsitatirev @william-tran

Would you mind taking a look too @ralekseenkov ?

Thx!

@ghost
Copy link

ghost commented Feb 17, 2019

I would split it into two separate pull requests.

  • The one does changes.
  • The other that documents things.
    At the moment it is super-large to review, but I will sit down and review that tomorrow.

@romangithub1024
Copy link

looks reasonable from the first glance. as long as there are no unexpected side effects related to uncommenting a bunch of values...

@cirocosta
Copy link
Collaborator Author

Oh yeah, I totally agree with you @xulsitatirev 👍 This one is just about making values.yaml parseable and having the comments consistent. The other (documenting in the README) is then up to a PR that addresses #11300

@ralekseenkov true! Thanks!

@william-tran
Copy link
Collaborator

Assuming empty values fail the condition {{- if .Values.concourse.web.someValue }} then I see no issues with this. It wouldn't be good if values that are defined but empty pass that condition, which would then introduce a ton of empty env vars. While the application wouldn't behave differently, kubectl describe pod would be a lot less readable.

@cirocosta
Copy link
Collaborator Author

cirocosta commented Feb 19, 2019

Yeah, that's a good point, I'll give it another check at the values that I got uncommented here in this PR to make sure the diff between what gets set right now and after this PR doesn't change much.

Thx!

@cirocosta
Copy link
Collaborator Author

oh yeah, the changes here indeed introduce a bunch of extra env vars that we don't really need:

web

diff --git a/tmp/before b/tmp/after
index dbfde672..12eb94b3 100644
--- a/tmp/before
+++ b/tmp/after
@@ -1,5 +1,14 @@
 CONCOURSE_ADD_LOCAL_USER
+CONCOURSE_AUTH_DURATION
+CONCOURSE_BAGGAGECLAIM_RESPONSE_HEADER_TIMEOUT
+CONCOURSE_BIND_IP
 CONCOURSE_BIND_PORT
+CONCOURSE_BUILD_TRACKER_INTERVAL
+CONCOURSE_CONTAINER_PLACEMENT_STRATEGY
+CONCOURSE_DEBUG_BIND_IP
+CONCOURSE_DEBUG_BIND_PORT
+CONCOURSE_GLOBAL_RESOURCE_CHECK_TIMEOUT
+CONCOURSE_INTERCEPT_IDLE_TIMEOUT
 CONCOURSE_KUBERNETES_IN_CLUSTER
 CONCOURSE_KUBERNETES_NAMESPACE_PREFIX
 CONCOURSE_MAIN_TEAM_LOCAL_USER
@@ -8,8 +17,14 @@ CONCOURSE_POSTGRES_DATABASE
 CONCOURSE_POSTGRES_HOST
 CONCOURSE_POSTGRES_PASSWORD
 CONCOURSE_POSTGRES_USER
+CONCOURSE_RESOURCE_CHECKING_INTERVAL
+CONCOURSE_RESOURCE_TYPE_CHECKING_INTERVAL
 CONCOURSE_SESSION_SIGNING_KEY
 CONCOURSE_TSA_AUTHORIZED_KEYS
+CONCOURSE_TSA_BIND_DEBUG_PORT
+CONCOURSE_TSA_BIND_IP
 CONCOURSE_TSA_BIND_PORT
+CONCOURSE_TSA_HEARTBEAT_INTERVAL
 CONCOURSE_TSA_HOST_KEY
+CONCOURSE_TSA_LOG_LEVEL
 POD_IP

worker

diff --git a/tmp/before b/tmp/after
index f96f5649..3e93f5b5 100644
--- a/tmp/before
+++ b/tmp/after
@@ -1,5 +1,16 @@
+CONCOURSE_BAGGAGECLAIM_BIND_DEBUG_PORT
+CONCOURSE_BAGGAGECLAIM_BIND_IP
+CONCOURSE_BAGGAGECLAIM_BIND_PORT
+CONCOURSE_BAGGAGECLAIM_BTRFS_BIN
 CONCOURSE_BAGGAGECLAIM_DRIVER
+CONCOURSE_BAGGAGECLAIM_LOG_LEVEL
+CONCOURSE_BAGGAGECLAIM_MKFS_BIN
+CONCOURSE_BAGGAGECLAIM_REAP_INTERVAL
+CONCOURSE_BIND_DEBUG_PORT
+CONCOURSE_BIND_IP
+CONCOURSE_BIND_PORT
 CONCOURSE_GARDEN_BIND_PORT
+CONCOURSE_LOG_LEVEL
 CONCOURSE_TSA_HOST
 CONCOURSE_TSA_PUBLIC_KEY
 CONCOURSE_TSA_WORKER_PRIVATE_KEY

I'll follow up with some changes to get that number of env vars back to the original.

@william-tran
Copy link
Collaborator

Maybe a helper function could help with that?

@ghost
Copy link

ghost commented Feb 20, 2019

@william-tran What do you think about, Will?

@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 21, 2019
The `values.yaml` for `stable/concourse` didn't look much consistent,
having some values with totally different commenting formats compared
to others.

This commit also improves the documentation around some of those values
that are not very easy to infer what they're all about.

By making the values uncommented we can leverage tools that parse yaml
files to make sure we have all variables documented.

He we also remove an unused debug values file and fix few values check.

With the use of default values under `values.yaml` as opposed to
commented fields, few values (like default `storageClass`) needed to be
updated, as well as adding few checks.

Also, Previously we allowed the creation of objects that wouldn't pass
`kubeval`'s validation. Now `kubeval` is ok with all of our objects.

Signed-off-by: Ciro S. Costa <cscosta@pivotal.io>
@helm-bot helm-bot added size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Feb 21, 2019
@cirocosta
Copy link
Collaborator Author

Maybe a helper function could help with that?

Sorry, but In terms of what? I didn't understand 🤔


I just pushed a final squashed commit with all of those default values that got introduced removed so that concourse can use what it thinks good default values are and we don't end with a bunch of env vars that are just passing the default ones.

Now the diff shows .. no differences 😁

@ghost
Copy link

ghost commented Feb 22, 2019

@cirocosta Approved.

@cirocosta
Copy link
Collaborator Author

Thanks for reviewing it @xulsitatirev !

cc @william-tran
cc @cpanato

@cirocosta
Copy link
Collaborator Author

/test all

@cirocosta
Copy link
Collaborator Author

cc @william-tran

@paulczar
Copy link
Collaborator

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 25, 2019
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: cirocosta, paulczar

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 merged commit bfd68b1 into helm:master Feb 25, 2019
monotek pushed a commit to monotek/charts that referenced this pull request Mar 7, 2019
helm#11296)

The `values.yaml` for `stable/concourse` didn't look much consistent,
having some values with totally different commenting formats compared
to others.

This commit also improves the documentation around some of those values
that are not very easy to infer what they're all about.

By making the values uncommented we can leverage tools that parse yaml
files to make sure we have all variables documented.

He we also remove an unused debug values file and fix few values check.

With the use of default values under `values.yaml` as opposed to
commented fields, few values (like default `storageClass`) needed to be
updated, as well as adding few checks.

Also, Previously we allowed the creation of objects that wouldn't pass
`kubeval`'s validation. Now `kubeval` is ok with all of our objects.

Signed-off-by: Ciro S. Costa <cscosta@pivotal.io>
rmccorm4 pushed a commit to rmccorm4/charts that referenced this pull request Mar 26, 2019
helm#11296)

The `values.yaml` for `stable/concourse` didn't look much consistent,
having some values with totally different commenting formats compared
to others.

This commit also improves the documentation around some of those values
that are not very easy to infer what they're all about.

By making the values uncommented we can leverage tools that parse yaml
files to make sure we have all variables documented.

He we also remove an unused debug values file and fix few values check.

With the use of default values under `values.yaml` as opposed to
commented fields, few values (like default `storageClass`) needed to be
updated, as well as adding few checks.

Also, Previously we allowed the creation of objects that wouldn't pass
`kubeval`'s validation. Now `kubeval` is ok with all of our objects.

Signed-off-by: Ciro S. Costa <cscosta@pivotal.io>
devnulled pushed a commit to devnulled/charts that referenced this pull request Apr 25, 2019
helm#11296)

The `values.yaml` for `stable/concourse` didn't look much consistent,
having some values with totally different commenting formats compared
to others.

This commit also improves the documentation around some of those values
that are not very easy to infer what they're all about.

By making the values uncommented we can leverage tools that parse yaml
files to make sure we have all variables documented.

He we also remove an unused debug values file and fix few values check.

With the use of default values under `values.yaml` as opposed to
commented fields, few values (like default `storageClass`) needed to be
updated, as well as adding few checks.

Also, Previously we allowed the creation of objects that wouldn't pass
`kubeval`'s validation. Now `kubeval` is ok with all of our objects.

Signed-off-by: Ciro S. Costa <cscosta@pivotal.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. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants