- 
                Notifications
    You must be signed in to change notification settings 
- Fork 67
K8SPG-882 determine patroni version without using the special patroni version check pod #1334
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
          
     Open
      
      
            gkech
  wants to merge
  11
  commits into
  main
  
    
      
        
          
  
    
      Choose a base branch
      
     
    
      
        
      
      
        
          
          
        
        
          
            
              
              
              
  
           
        
        
          
            
              
              
           
        
       
     
  
        
          
            
          
            
          
        
       
    
      
from
K8SPG-882
  
      
      
   
  
    
  
  
  
 
  
      
    base: main
Could not load branches
            
              
  
    Branch not found: {{ refName }}
  
            
                
      Loading
              
            Could not load tags
            
            
              Nothing to show
            
              
  
            
                
      Loading
              
            Are you sure you want to change the base?
            Some commits from the old base branch may be removed from the timeline,
            and old review comments may become outdated.
          
          
      
        
          +905
        
        
          −469
        
        
          
        
      
    
  
Conversation
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
    … version check pod
              
                    egegunes
  
              
              previously approved these changes
              
                  
                    Oct 28, 2025 
                  
              
              
            
            
              
                    hors
  
              
              previously approved these changes
              
                  
                    Oct 28, 2025 
                  
              
              
            
            
              
                    nmarukovich
  
              
              previously approved these changes
              
                  
                    Oct 28, 2025 
                  
              
              
            
            
              
                    pooknull
  
              
              previously approved these changes
              
                  
                    Oct 29, 2025 
                  
              
              
            
            
        cdb5c8d
      
    | @gkech please check unit tests | 
              
                    egegunes
  
              
              previously approved these changes
              
                  
                    Oct 31, 2025 
                  
              
              
            
            
| 
 
 commit: baeed56 | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
CHANGE DESCRIPTION
Problem:
The current patroni version check implementation can be completely skipped. We can assume by default patroni version 4.x and utilize the custom version annotation if we want to specify an older or a later one e.g. 3.x. The version configured is going to appear to the PG object status and also used to determine the primary pod for postgres - because =<3.x patroni versions utilize the
masterterminology while never versions (4.x) utilize theprimaryterminology. If the annotation is not used, the operator gets the patroni version frompatronictl versionthrough an instance pod.For instance, configuring an instance image version which is using patroni 3.x. but specifying a patroni version which is newer, will appear in the status like that and will cause the operator to try to find primary with the
primaryterminology. And vice versa, using patroni 4.x and configuring the labels to use an older patroni version than 4.x, will cause the operator to try to find the primary using themasterterminology. These scenarios can cause problems and should be avoided.Cause:
Short explanation of the root cause of the issue if applicable.
Solution:
Short explanation of the solution we are providing with this PR.
CHECKLIST
Jira
Needs Doc) and QA (Needs QA)?Tests
Config/Logging/Testability