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

Separate template processing step from reconciliation to make for better batching capabilities #147

Open
etsauer opened this issue Aug 26, 2019 · 2 comments

Comments

@etsauer
Copy link
Contributor

etsauer commented Aug 26, 2019

Been thinking about this for a while, and would like to propose a solution.

Currently, all templates we process are reconciled at the time of processing.. essentially creating a loop like:

for template, params in my_inventory:
  oc process -f $template --param-file=$params | kubectl apply -f -
done

This creates a 1:1 ratio of API calls to templates, which can take some time if I have a lot of templates to process, or multiple sets of params to the template.

I would like to propose a different strategy where we cache the output of the template processing, and then reconcile the resulting objects en masse. This would look something like:

for template, params in my_inventory:
  oc process -f $template --param-file=$params > tmp/manifests/$action/$counter.yml
done

kubectl apply -f tmp/manifests/apply/
kubectl create -f tmp/manifests/create/
kubectl create -f tmp/manifests/delete/
@pcarney8
Copy link
Contributor

I'm curious to know what failures would look like in this case

@etsauer
Copy link
Contributor Author

etsauer commented Aug 26, 2019

@pcarney8 can you elaborate?

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

No branches or pull requests

2 participants