GoogleContainerTools/skaffold

Configuration dependencies don't resolve paths to deploy hooks

Open

#7 250 ouverte le 31 mars 2022

Voir sur GitHub
 (10 commentaires) (0 réactions) (0 assignés)Go (1 416 forks)batch import
area/hookshelp wantedkind/bugpriority/p3

Métriques du dépôt

Stars
 (12 822 stars)
Métriques de merge PR
 (Merge moyen 1j 18h) (18 PRs mergées en 30 j)

Description

Expected behavior

When having a toplevel configution like this:

apiVersion: skaffold/v2beta25
kind: Config
requires:
  - configs: ["cfg1"]
    path: cfg1/skaffold.yaml
  - configs: ["cfg2"]
    path: cfg2/skaffold.yaml

When the skaffold.yaml files in ./cfg1 and ./cfg2 define deploy hooks, the paths to these hooks should resolved relative to the ./cfg1, or ./cfg2 directory. For instance if ./cfg2 has:

deploy:
  kubectl:
    manifests:
    - deploy/kubernetes.yaml
    hooks:
      before:
        - host:
            command: ["sh", "-c", "deploy/skaffold-before-hook.sh"]

it should look for skaffold-before-hook.sh in ./cfg2/deploy/ and not in ./deploy. Also, any files that are created or referenced by this hook should be relative to ./cfg2

Actual behavior

hooks are resolved relative to the toplevel directory. I have to make a symlink ./deploy/skaffold-before-hook.sh --> ../cfg2/deploy/skaffold-before-hook.sh

Information

  • Skaffold version: 1.37.0
  • Operating system: Linux Ubuntu 20.04
  • Installed via: skaffold.dev

Guide contributeur