Skip to content

Use Secret instead of ConfigMap for pod env #365

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

Merged
merged 1 commit into from
May 13, 2022
Merged

Conversation

eberlep
Copy link
Collaborator

@eberlep eberlep commented May 12, 2022

⚠️ Use Secret instead of ConfigMap for pod environment configuration -> triggers rolling update of running databases

@eberlep eberlep linked an issue May 12, 2022 that may be closed by this pull request
@eberlep
Copy link
Collaborator Author

eberlep commented May 12, 2022

Tested successfully:

  • Created database with old image: it's unsing a configmap
  • Updated image
  • Checked existing database:
    • configmap still existing, but new secret created.
    • k describe pod <DATABASE> refers to secret, not configmap
  • Created new database:
    • no postgres-pod-config configmap, but a secret
    • k describe pod <DATABASE> refers to secret, not configmap
 $ k describe po pgfits-podenvsecretc79a3f32-0                                                                                                                                                                                                                                                  
Name:         pgfits-podenvsecretc79a3f32-0                                                                                                                                                                                                                                                                                                                                
Namespace:    b621eb9948884911-c79a3f32296a4d728099                                                                                                                                                                                                                                                                                                                        
[..]
Containers:                                                                                                                                                                                                                                                                                                                                                                
  postgres:                                                                                                                                                                                                                                                                                                                                                                
    [..]
    Environment:                                                                                                                                                                                                                                                                                                                                                           
      [..]
      AWS_ACCESS_KEY_ID:                 <set to the key 'AWS_ACCESS_KEY_ID' in secret 'postgres-pod-config'>        Optional: false```
   

@eberlep eberlep marked this pull request as ready for review May 12, 2022 17:26
@eberlep eberlep requested a review from majst01 May 12, 2022 17:29
@eberlep eberlep merged commit 8d8afba into main May 13, 2022
@eberlep eberlep deleted the pod_environment_secret branch July 15, 2022 12:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Move to Pod Environment Secret
1 participant