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

Lovely throws an error when kustomize includes a base or directory up in tree #66

Closed
Tyrion85 opened this issue Oct 13, 2022 · 5 comments
Assignees

Comments

@Tyrion85
Copy link

Tyrion85 commented Oct 13, 2022

Given a simple kustomization like

apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ../../../../base/namespaces

and ArgoCD Application without lovely plugin, it works as expected, base is included and deployed properly.

However, when lovely plugin is included in the same Application:

apiVersion: argoproj.io/v1alpha1
kind: Application
...
spec:
  source:
    ...
    path: k8s/[omitted]/overlays/_cluster/namespaces
    plugin:
      name: argocd-lovely-plugin
...

an error is thrown:

rpc error: code = Unknown desc = Manifest generation error (cached):
 `argocd-lovely-plugin` failed exit status 1: 2022/10/13 15:19:41 
Error: accumulating resources: accumulation 
err='accumulating resources from '../../../../base/namespaces': 
evalsymlink failure on '/base/namespaces' : 
lstat /base: no such file or directory': 
evalsymlink failure on '/base/namespaces' : 
lstat /base: no such file or directory

Does lovely plugin support inclusion of base?

ArgoCD version: 2.4.12
Lovely version: 0.6.4
Kustomize version: 4.4.1

@Tyrion85
Copy link
Author

After giving it a quick look at source code, looks like a copy is made of the working dir, and no regard seems to be given to the fact that kustomization might include other dirs.

Are there any plans to support this? Including base or indeed other paths in kustomize is one of its core features, and widely used.

I'd be happy to contribute with a PR, but honestly have no idea what design considerations are and where to start in regards to tmp copy of working dir, as it exists now.

@Joibel
Copy link
Contributor

Joibel commented Oct 14, 2022

I'll implement something that solves your issue with a flag for the moment.

@Joibel
Copy link
Contributor

Joibel commented Oct 14, 2022

I've released 0.7.0 with a new flag. Make sure you read the instructions and set the lockRepo flag before you enable it. Let me know if it fixes your issue please.

@Tyrion85
Copy link
Author

Tyrion85 commented Oct 17, 2022

I've managed to test this today @Joibel works great! Thank you! ❤️

Defining two lovely-plugins configs, as you suggested (one with lockRepo and lovely's feature flag on, and one without) if good for my use-cases, as I can choose on case-by-case basis whether a performance hit is worth it 👍🏼

@Joibel
Copy link
Contributor

Joibel commented Oct 17, 2022

Glad to hear it.

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