-
Couldn't load subscription status.
- Fork 40
Add regex support in filters #340
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
base: main
Are you sure you want to change the base?
Conversation
|
CLA Assistant Lite bot CLA Assistant Lite bot All contributors have signed the COC ✍️ ✅ |
|
I have read the Code of Conduct and I hereby accept the Terms |
|
I have read the CLA Document and I hereby sign the CLA |
|
@michael-burt are there any ways to promote code reviews? |
|
Hi @moflotas , thank you for the contribution. Have you tried using an ext-var for this use case? I believe it would allow you to accomplish your goal of conditionally deploying your second configMap. https://qbec.io/userguide/usage/runtime-params/#using-qbecioenv You can use a syntax like this: In your component you can reference this variable like this: |
|
Hi, @michael-burt , thank you for the response! I believe it does not solve my problem, probably my example was not clear, I will try to explain better. So I have a component which is made of k8s Deployment and 2 ConfigMaps (there are ingresses and other stuff, but they does not matter for the explanation). Sometimes I need to change only one part of the component (2nd ConfigMap) without redeploying Deployment and changing 1st ConfigMap (even if there is a diff between local and remote). I do not understand, how using your suggestion would allow me to not include some parts of the component for diff evaluation. I can only imagine conditionally include/exclude component, but that would remove it from the remote and it is not what I desire to accomplish. |
|
Hi, @michael-burt ! |
There is currently no way of filtering components by name, when deploying. I have 2 cases that this feature would resolve
Deploying multiple instances of same kind
I am working on the database project. I have 2 ConfigMaps in one component, first one is for the app configuration (when updated, the app should be redeployed), the second is storing the index fields for the database (when updated, the app can automatically fetch new updates from the file). So I somehow need to be able to deploy 2nd ConfigMap separately from the first, however I didn't find a way to filter same kind of k8s objects.
Deploying to particular availability zone
Sometimes there is a need to deploy component only in one availability zone for testing purposes and then deploy to all zones. This can be mitigated with the proper configuration in jsonnet, but it would be easier to just filter components by zone name.
Hope this feature would also benefit other users, since filtering by regexp will allow users to more gradually make deployments using qbec.