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

Add review guidelines around pvcs #4223

Merged
merged 3 commits into from
Mar 23, 2018
Merged

Add review guidelines around pvcs #4223

merged 3 commits into from
Mar 23, 2018

Conversation

rjkernick
Copy link
Collaborator

What this PR does / why we need it:

Which issue this PR fixes (optional, in fixes #<issue number>(, fixes #<issue_number>, ...) format, will close that issue when PR gets merged): fixes #

Special notes for your reviewer:

@k8s-ci-robot k8s-ci-robot added cncf-cla: yes Indicates the PR's author has signed the CNCF CLA. needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Mar 16, 2018
@unguiculus
Copy link
Member

Thanks @rjkernick

@unguiculus
Copy link
Member

/assign

@unguiculus
Copy link
Member

cc @kubernetes/charts-maintainers

## set, choosing the default provisioner. (gp2 on AWS, standard on
## GKE, AWS & OpenStack)
##
# storageClass: "-"
Copy link
Member

Choose a reason for hiding this comment

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

I now think it'd be better to add an empty default value. Thoughts?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'm fine with either way

subPath: data
- mountPath: /opt/sonarqube/extensions
name: sonarqube
subPath: extensions
Copy link
Member

Choose a reason for hiding this comment

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

Maybe don't make it SonarQube-specific. A simpler example should suffice. I'd also remove the subPath from the example. It's optional and could be misleading.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yep. Is there a better place to put the subPath example? I agree it might be confusing here, but I would like to document it somewhere for people to use.

Copy link
Member

Choose a reason for hiding this comment

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

Don't know where to put it. I think it is not specific to charts and we don't have to repeat Kubernetes docs here. I'd remove it.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Makes sense. Done.

Copy link
Member

@prydonius prydonius left a comment

Choose a reason for hiding this comment

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

thanks a lot for this @rjkernick!

@@ -76,6 +76,29 @@ image:
* The use of the `default` function should be avoided if possible in favor of defaults in `values.yaml`.
* It is usually best to not specify defaults for resources and to just provide sensible values that are commented out as a recommendation, especially when resources are rather high. This makes it easier to test charts on small clusters or Minikube. Setting resources should generally be a conscious choice of the user.

## Persistence

* Persistence should be turned off by default
Copy link
Member

Choose a reason for hiding this comment

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

Actually we prefer to have persistence via PVC enabled by default, and it is in most of the existing charts.

size: 10Gi
# existingClaim: ""
```

Copy link
Member

Choose a reason for hiding this comment

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

I think it would be great to also add an example of a PVC using those values:

{{- if and .Values.persistence.enabled (not .Values.persistence.existingClaim) }}
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
  <standard metadata>
spec:
  accessModes:
    - {{ .Values.persistence.accessMode | quote }}
  resources:
    requests:
      storage: {{ .Values.persistence.size | quote }}
{{- if .Values.persistence.storageClass }}
{{- if (eq "-" .Values.persistence.storageClass) }}
  storageClassName: ""
{{- else }}
  storageClassName: "{{ .Values.persistence.storageClass }}"
{{- end }}
{{- end }}
{{- end }}

and in a PodSpec:

      volumes:
      - name: data
      {{- if .Values.persistence.enabled }}
        persistentVolumeClaim:
          claimName: {{ .Values.persistence.existingClaim | default (include "fullname" .) }}
      {{- else }}
        emptyDir: {}
      {{- end -}}

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added the suggested examples


* Persistence should be turned off by default
* PVCs should support specifying an existing claim
* Storage class should be empty by default
Copy link
Member

Choose a reason for hiding this comment

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

Can we elaborate here and mention it should "be empty by default, to use the default storage class"?

@rjkernick
Copy link
Collaborator Author

@prydonius Made the suggested changes as they all made sense. Let me know if there is anything else.

Copy link
Member

@prydonius prydonius left a comment

Choose a reason for hiding this comment

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

Thank you so much for this!

/ok-to-test
/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 23, 2018
@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: prydonius, rjkernick

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 Mar 23, 2018
@prydonius
Copy link
Member

/ok-to-test

@k8s-ci-robot k8s-ci-robot removed the needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. label Mar 23, 2018
@k8s-ci-robot k8s-ci-robot merged commit e067fdd into helm:master Mar 23, 2018
@rjkernick rjkernick deleted the review-guidelines-pvc branch March 23, 2018 15:06
joshuacox added a commit to joshuacox/charts that referenced this pull request Mar 24, 2018
* upstream/master: (944 commits)
  Rename service port to http (helm#4442)
  [stable/neo4j] Change the image of the initContainer examples (helm#4269)
  move burrow to stable repo (helm#3481)
  Upgrade kube-state-metrics to 1.2.0, add new collectors (helm#4146)
  Add review guidelines around pvcs (helm#4223)
  [stable/parse] Release 0.3.10 (helm#4389)
  [stable/phabricator] Release 0.5.19 (helm#4433)
  Support exposing jmx and additional ports (helm#4072)
  Add default of "" for string comparison (helm#4420)
  [incubator/kafka] Makes readiness probe configurable (helm#3948)
  Published stash chart 0.7.0-rc.1 (helm#4410)
  Enable testing charts with test values (helm#4157)
  [incubator/kafka] Fix initContainer failure which did not error (helm#4400)
  [stable/etcd-operator] deployment typos and add tolerations (helm#4139)
  Typo fix in coscale/README.md (helm#4306)
  Typo fix in concourse/README.md (helm#4303)
  Typo fix in cockroachdb/README.md (helm#4302)
  [stable/jenkins] Bump appVersion (helm#4177)
  Typo fix in cluster-autoscaler/README.md (helm#4301)
  [stable/traefik] Bump appVersion to 1.5.4 (helm#4206)
  ...
rolanddb pushed a commit to Eneco/charts that referenced this pull request Apr 9, 2018
* Add review guidelines around pvcs

* Updates to pvc guidelines

* Updates to match existing best practices and examples
ichtar pushed a commit to Bestmile/charts that referenced this pull request May 15, 2018
* Add review guidelines around pvcs

* Updates to pvc guidelines

* Updates to match existing best practices and examples
voron pushed a commit to dysnix/helm-charts that referenced this pull request Sep 5, 2018
* Add review guidelines around pvcs

* Updates to pvc guidelines

* Updates to match existing best practices and examples

Signed-off-by: voron <av@arilot.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. 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.

4 participants