Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parameterize PVC storage class (ingester, querier, compactor) #2718

Merged
merged 1 commit into from
Nov 9, 2020
Merged

parameterize PVC storage class (ingester, querier, compactor) #2718

merged 1 commit into from
Nov 9, 2020

Conversation

halcyondude
Copy link
Contributor

What this PR does / why we need it:

Improve the initial UX for folks deploying Loki via ksonnet to clusters where VMWare Cloud is not being used.

  • surface the StorageClass used for the Persistent Volume Claim(s) in loki/config.libsonnet when running the Ingester and/or Querier as a StatefulSet (instead of a Deployment)
  • It leaves the default to 'fast' (see below) to not break any existing users/systems
  • While this could be patched from a consumer (of loki's ksonnet), this is brittle. By parking it here it's immediately clear to newcomers that OOTB it's using a specific PVC StorageClass.
  • The default/current behavior fails unless the VMware Cloud Provisioner is configured in a cluster, and will require folks to figure out why it does not work. Those folks will also have to figure out why changing the StorageClass to what they need then running tk apply don't work either, as the PVC needs to be deleted then re-added.

Background / Context

The current StorageClass is of type 'fast' and config like below will be generated.

apiVersion: apps/v1
kind: StatefulSet
metadata:
  name: ingester
  namespace: loki

...

spec:
  volumeClaimTemplates:
  - apiVersion: v1
    kind: PersistentVolumeClaim
    metadata:
      name: ingester-data
    spec:
      accessModes:
      - ReadWriteOnce
      resources:
        requests:
          storage: 10Gi
      storageClassName: fast

While making the default "" would also make sense, it would have the potential to break existing deployments (that use VMW Cloud) if the cluster admin's have not configured the DefaultStorageClass.

@CLAassistant
Copy link

CLAassistant commented Oct 3, 2020

CLA assistant check
All committers have signed the CLA.

@codecov-commenter
Copy link

Codecov Report

Merging #2718 into master will decrease coverage by 0.01%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #2718      +/-   ##
==========================================
- Coverage   61.46%   61.44%   -0.02%     
==========================================
  Files         173      173              
  Lines       13421    13421              
==========================================
- Hits         8249     8247       -2     
- Misses       4421     4422       +1     
- Partials      751      752       +1     
Impacted Files Coverage Δ
pkg/logql/evaluator.go 92.38% <0.00%> (-0.43%) ⬇️

@stale
Copy link

stale bot commented Nov 3, 2020

This issue has been automatically marked as stale because it has not had any activity in the past 30 days. It will be closed in 7 days if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale A stale issue or PR that will automatically be closed. label Nov 3, 2020
Copy link
Collaborator

@slim-bean slim-bean left a comment

Choose a reason for hiding this comment

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

LGTM, thanks!

@stale stale bot removed the stale A stale issue or PR that will automatically be closed. label Nov 4, 2020
@slim-bean
Copy link
Collaborator

@halcyondude not sure what happened to cause the conflict, if you have a chance could you see if you could rebase?

@cyriltovena
Copy link
Contributor

indentation changed, I tried to push to the branch but I'm not allowed.

@halcyondude halcyondude changed the title parameterize PVC storage class (ingester, querier) parameterize PVC storage class (ingester, querier, compactor) Nov 7, 2020
@halcyondude
Copy link
Contributor Author

@halcyondude not sure what happened to cause the conflict, if you have a chance could you see if you could rebase?

done!

halcyondude added a commit to community-config/observe that referenced this pull request Nov 9, 2020
halcyondude added a commit to community-config/observe that referenced this pull request Nov 9, 2020
halcyondude added a commit to community-config/observe that referenced this pull request Nov 9, 2020
@cyriltovena cyriltovena merged commit 34311b4 into grafana:master Nov 9, 2020
halcyondude added a commit to community-config/observe that referenced this pull request Nov 25, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants