GoogleContainerTools/skaffold

Configuration dependencies don't resolve paths to deploy hooks

開放

#7,250 建立於 2022年3月31日

 (10 則留言) (0 個反應) (0 位負責人)Go (1,416 個分叉)batch import
area/hookshelp wantedkind/bugpriority/p3

倉庫指標

星標
 (12,822 顆星)
PR 合併指標
 (平均合併 3天 6小時) (30 天內合併 16 個 PR)

描述

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

貢獻者指南