GoogleContainerTools / GoogleContainerTools/skaffold

Using Kustomize plugins (old style) with Skaffold fails due to undetermined plugin path for Kustomize

Open
#7,623 4 comments 0 reactions 0 assignees View on GitHub
kind/bug priority/p2
Dominant language
Go
Stars
15.9k
Forks
1.7k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

### Expected behavior
Kustomize plugin runs accordingly from the git repo cloned

### Actual behavior
```
$ KUSTOMIZE_PLUGIN_HOME="?????" NAMESPACE=myapp-dev ECR_PATH=develop DEPLOYMENT_COLOR=blue COMPONENT_NAME="my-app" COMPONENT_BUILD=develop skaffold deploy --profile dev -f skaffold.yaml
Tags used in deployment:
Starting deploy...
running [kustomize build --enable-alpha-plugins --enable-exec /home/spstarr/.skaffold/repos/SZ3H6TqRJBxZmak0c_kMWYmFOJ73zJ8i/kustomize/overlays/dev]
- stdout: ""
- stderr: "Error: unable to find plugin root - tried: ('/build/skaffold/kustomize/plugins'; homed in $KUSTOMIZE_PLUGIN_HOME), (''; homed in $XDG_CONFIG_HOME), ('/home/spstarr/.config/kustomize/plugin'; homed in default value of $XDG_CONFIG_HOME), ('/home/spstarr/kustomize/plugin'; homed in home directory)\n"
- cause: exit status 1
-
```

### Information

- Skaffold version: v1.39.1
- Operating system: Fedora
- Installed via: skaffold.dev
- Contents of skaffold.yaml:

Top level `skaffold.yaml`:
```yaml
apiVersion: skaffold/v2beta29
kind: Config
metadata:
name: product
requires:
- configs: ["skaffold-my-app"]
git:
repo: https://github.com/MyCompany/my-app.git
path: skaffold/dev/skaffold.yaml
ref: develop
activeProfiles:
- name: dev
activatedBy: [dev]
profiles:
- name: dev
```

Repo level `skaffold.yaml`:

```yaml
apiVersion: skaffold/v2beta29
kind: Config
metadata:
name: skaffold-my-app

profiles:
- name: dev
activation:
- env: DEPLOY_OVERLAY=dev
deploy:
kustomize:
paths:
- ../kustomize/overlays/dev
flags:
disableValidation: false
defaultNamespace: myapp-dev
buildArgs: ["--enable-alpha-plugins", "--enable-exec"]
```

### Steps to reproduce the behavior

`KUSTOMIZE_PLUGIN_HOME="?????" NAMESPACE=myapp-dev ECR_PATH=develop DEPLOYMENT_COLOR=blue COMPONENT_NAME="my-app" COMPONENT_BUILD=develop skaffold deploy --profile dev -f skaffold.yaml `

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.