GoogleContainerTools / skaffold

Easy and Repeatable Kubernetes Development
https://skaffold.dev/
Apache License 2.0
14.84k stars 1.61k forks source link

skaffold does not handle tilde sign (home directory) under kubectl > manifests #6983

Open michaelmohamed opened 2 years ago

michaelmohamed commented 2 years ago

Related to: https://github.com/GoogleContainerTools/skaffold/issues/2123 and https://github.com/GoogleContainerTools/skaffold/pull/2233

Expected behavior

skaffold should be able to use manifests from files in the home directory

Actual behavior

skaffold fails with:

invalid skaffold config: skaffold config file "skaffold.yml" referenced file "~/.secrets/timescaledb/timescaledb-secrets.yml" that could not be found.

Verify that file "~/.secrets/timescaledb/timescaledb-secrets.yml" referenced in config "skaffold.yml" exists and the path and naming are correct.

Information

apiVersion: skaffold/v2beta26
kind: Config
metadata:
  name: timescaledb

deploy:
  helm:
    releases:
      - name: timescaledb
        namespace: timescaledb
        createNamespace: true
        chartPath: ../../../shared/charts/timescaledb/charts/timescaledb-single
        valuesFiles:
          - ./services/timescaledb/default_values.yml
        setValues: {}

  kubectl:
    manifests:
      - ./.secrets/timescaledb/timescaledb-secrets.yml
    defaultNamespace: timescaledb
gsquared94 commented 2 years ago

Although we did a fix for https://github.com/GoogleContainerTools/skaffold/issues/2123 there are several fields in the skaffold config schema that don't handle ~ sign for home directory. Instead of fixing these individually, I think we should either globally enable this behavior throughout the config or disallow it. Added it to triage discuss, unless there's a more authoritative answer from someone else.

tejal29 commented 2 years ago

I feel we should support ~ elsewhere or nowhere. Since we already have partial support, we should resolve them in skaffold.yamls