planetscale / planetscale/vitess-operator

The customization of the storage size of the etcd lockserver doesn't work

Open
#117 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
372
Forks
102
Avg merge
3d 5h
Merged PRs (30d)
15

Description

Added the following configuration to cell:

  cells:                                                                                                                                                       
  - name: samplecell                                                                                                                                        
    lockserver:                                                                                                                                                
      etcd:                                                                                                                                                    
        createClientService: true                                                                                                                              
        createPDB: true                                                                                                                                        
        createPeerService: true                                                                                                                                
        dataVolumeClaimTemplate:                                                                                                                               
          accessModes:                                                                                                                                         
          - ReadWriteOnce                                                                                                                                      
          dataSource: null                                                                                                                                     
          resources:                                                                                                                                           
            requests:                                                                                                                                          
              storage: 20Gi                                                                                                                                    
        image: quay.io/coreos/etcd:v3.3.13                                                                                                                     
        resources:                                                                                                                                             
          limits:                                                                                                                                              
            memory: 256Mi                                                                                                                                      
          requests:                                                                                                                                            
            cpu: 100m                                                                                                                                          
            memory: 256Mi

here is the generated EtcdLockServer crd printed by command kubectl get etcdlockservers --output yaml:

apiVersion: planetscale.com/v2                                                                                                                                 
kind: EtcdLockserver                                                                                                                                           
metadata:                                                                                                                                                                                                                                                                          
  ...                                                                                                                  
spec:                                                                                                                                                          
  createClientService: true                                                                                                                                    
  createPDB: true                                                                                                                                              
  createPeerService: true                                                                                                                                      
  dataVolumeClaimTemplate:                                                                                                                                     
    accessModes:                                                                                                                                               
    - ReadWriteOnce                                                                                                                                            
    dataSource: null                                                                                                                                           
    resources:                                                                                                                                                 
      requests:                                                                                                                                                
        storage: 20Gi                                                                                                                                          
  image: quay.io/coreos/etcd:v3.3.13                                                                                                                           
  resources:                                                                                                                                                   
    limits:                                                                                                                                                    
      memory: 256Mi                                                                                                                                            
    requests:                                                                                                                                                  
      cpu: 100m                                                                                                                                                
      memory: 256Mi

however the generated PVC spec still has a default storage size 1Gi:

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
  ...
spec:
  accessModes:
  - ReadWriteOnce
  resources:
    requests:
      storage: 1Gi

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the issue from the cell configuration and inspect how the EtcdLockserver dataVolumeClaimTemplate is converted into the generated PVC. Compare the requested 20Gi value with the PVC's 1Gi default; done means the generated PVC preserves the configured storage size.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, kubernetes
Domain
distributed-systems, infrastructure
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.