hey! I constantly find myself having to nuke the `...
# 💻|contributing
i
hey! I constantly find myself having to nuke the
.garden
folder when switching between envs to avoid deploy failures. is that something you do as well, or am I taking placebo? 🙂
b
Hmm, I almost never find myself doing that. What errors are you seeing when you don't?
i
this time it was trying to apply kubernetes resource from a kubernetes module. the module installs a deployment, but it seems garden tries to apply stuff on the pod:
Copy code
Command "/Users/peterwilcsinszky/.garden/tools/kubectl/f8a39834529cd1ed/kubectl --context=<REDACTED> apply --output=json -f -" failed with code 1:

Warning: resource pods/edge2-76f4d8567b-kzbxm is missing the kubectl.kubernetes.io/last-applied-configuration annotation which is required by kubectl apply. kubectl apply should only be used on resources created declaratively by either kubectl create --save-config or kubectl apply. The missing annotation will be patched automatically.
Error from server (NotFound): error when applying patch:

to:
Resource: "/v1, Resource=pods", GroupVersionKind: "/v1, Kind=Pod"
Name: "edge2-76f4d8567b-kzbxm", Namespace: "<REDACTED>"
for: "STDIN": pods "edge2-76f4d8567b-kzbxm" not found
can that be because of the serviceResource setting?
Copy code
serviceResource:
  podSelector:
    app: "${this.name}"
  containerName: dev
seems to be completely unrelated to the .garden folder 🙂
s
Hmm, interesting. Could you share the stack trace to help narrow this down? I think it should be in
error.log
.
I'm not sure why we'd be calling
kubectl
on resources that are missing this annotation (we specifically filter on only those resources, but it's possible we're missing that filtering in some code path).
5 Views