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

Provide annotations to exclude reloading resources #764

Merged
merged 4 commits into from
Nov 16, 2024

Conversation

LochanRn
Copy link
Contributor

@LochanRn LochanRn commented Oct 10, 2024

This PR fixes : #740

Provide annotations to exclude reloading resources based on the annotation set on the owner resources.
Exclude Configmaps Annotation: configmaps.exclude.reloader.stakater.com/reload
Exclude Secrets Annotation: secrets.exclude.reloader.stakater.com/reload

Example for excluding nginx-cm-1,nginx-cm-2 configmap in a deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    configmaps.exclude.reloader.stakater.com/reload: "nginx-cm-1,nginx-cm-2"
spec:
  template: 
    metadata:
...

Example for excluding nginx-secret secret in a deployment

apiVersion: apps/v1
kind: Deployment
metadata:
  annotations:
    secrets.exclude.reloader.stakater.com/reload: nginx-secret
spec:
  template: 
    metadata:
...

@karl-johan-grahn
Copy link
Contributor

@LochanRn I think we need unit tests for this - test for both the positive and negative use cases

@LochanRn
Copy link
Contributor Author

LochanRn commented Nov 3, 2024

@karl-johan-grahn PTAL added test cases.

@karl-johan-grahn karl-johan-grahn merged commit 53b650a into stakater:master Nov 16, 2024
5 checks passed
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.

Can we have an exclude option introduced that can be configured at deployment/sts level
2 participants