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

Provider should behave the same way as kubectl apply works #68

Open
rishi-anand opened this issue Jan 31, 2021 · 3 comments
Open

Provider should behave the same way as kubectl apply works #68

rishi-anand opened this issue Jan 31, 2021 · 3 comments

Comments

@rishi-anand
Copy link

Is your feature request related to a problem? Please describe.

If a resource exists then it should be patched in create call as well.

Describe the solution you'd like to see

If a resource exists, it should be modified existing content. So that desired state is what is there in the content.

Describe alternatives you've considered

Additional context

k8s_manifest.nginx-deployment[5]: Creation complete after 18s [id=default::apps/v1::Deployment::nginx]
Error: priorityclasses.scheduling.k8s.io "nginx-critical" already exists
  on k8s_manifest.tf line 9, in resource "k8s_manifest" "nginx-deployment":
   9: resource "k8s_manifest" "nginx-deployment" {

Error: configmaps "log-parser-config" already exists
  on k8s_manifest.tf line 9, in resource "k8s_manifest" "nginx-deployment":
   9: resource "k8s_manifest" "nginx-deployment" {

rishi@Spectro k8s (brownfield) $ 
@rishi-anand
Copy link
Author

I can work on the dev changes to patch resource.

@pepov
Copy link

pepov commented Feb 1, 2021

Hey, thanks for the report! I beleive the correct workflow for existing resources is to import them first, or am I missing something?

@rishi-anand
Copy link
Author

@pepov, You are right!
I made a few changes in forked repo of banzai in which I added multi resource support in manifest and then I faced this issue as few resource was existing.

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