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

Create a web client to replace the actions configmap #39

Open
isaaguilar opened this issue Jun 4, 2021 · 0 comments
Open

Create a web client to replace the actions configmap #39

isaaguilar opened this issue Jun 4, 2021 · 0 comments

Comments

@isaaguilar
Copy link
Collaborator

Currently the actions a user has to take in order to review a plan before applying is "hacky" to say the least.

Steps to take are:

First the user has to configure *all of applyOnCreate, applyOnUpdate, and applyOnDelete in the tf resource.

Then the user creates the resource, waits for the pod to be created, and has to do a kubectl logs on the pod.

Finally, after the user view the plan, the user has to go find the RESOURCE_NAME-actions ConfigMap and edit the data value with "apply".

*all -- this is technically not true, Just one of the applyOn*'s need to be defined depending on the lifecycle of the tf resource, but that's so confusing might as well do all of them just in case.

 

This is a horrible design (and I am ashamed) 👎🏾

I think a better solution would be to make an internal web-client a user can interact with. The web-client would be a refreshing take on how to view plans and trigger applys. Perhaps something like:

# View a plan
curl http://terraform-operator.tf-system.svc.cluster.local/<namespace>/<tf-resource-name>/view

# Apply
curl http://terraform-operator.tf-system.svc.cluster.local/<namespace>/<tf-resource-name>/apply

This work should come after #26 (https://github.com/isaaguilar/terraform-operator/blob/feature/terraform-runner-container-states/docs/container-states.md) since pods will be split up between init/plan/apply stages and the controller will have more control between each stage.

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

1 participant