kubectl icon indicating copy to clipboard operation
kubectl copied to clipboard

Kustomize sub directory

Open edwardzjl opened this issue 1 year ago • 0 comments

I'm trying to run kubectl kustomize on a sub directory of my project, but I'm encountering an issue when passing the directory as an argument:

- uses: actions-hub/[email protected]
  with:
    args: kustomize ./manifests/overlays/istio

However, I receive the following error:

sh: manifests/overlays/istio: unknown operand
No authorization data found. Please provide KUBE_CONFIG or KUBE_HOST variables. Exiting...

I found that #12 is related, but the fix only checks for string equality, which means I can't pass a directory argument directly after the kustomize keyword.

Additionally, the uses directive in GitHub Actions does not support setting the working-directory.

Would it be possible to update the condition to use a regex pattern for better flexibility with the kustomize argument? For example:

elif [[ $INPUT_ARGS =~ ^kustomize.* ]]; then :;

This change would allow support for passing directories as arguments without encountering the current issue.

edwardzjl avatar Oct 09 '24 16:10 edwardzjl