Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

invalid skaffold config with v1.27.0 #6254

Closed
MarcoSchaar opened this issue Jul 20, 2021 · 4 comments · Fixed by #6294
Closed

invalid skaffold config with v1.27.0 #6254

MarcoSchaar opened this issue Jul 20, 2021 · 4 comments · Fixed by #6294
Labels
area/config kind/bug Something isn't working priority/p1 High impact feature/bug.

Comments

@MarcoSchaar
Copy link

MarcoSchaar commented Jul 20, 2021

Hi
I'm facing some issues while trying to run existing builds with updated version v1.27.0

Expected behavior

successful operation like with v1.26.0

Actual behavior

$ skaffold run --profile build-app '--filename=./skaffold.yaml'
invalid skaffold config: skaffold config named "/home/jenkins/agent/workspace/<folder>/skaffold.yaml" referenced file "k8s/*.yaml" that could not be found. Verify that file "k8s/*.yaml" referenced in config "/home/jenkins/agent/workspace/<folder>/skaffold.yaml" exists and the path and naming are correct.

Information

  • Skaffold version: 1.27.0
  • Operating system: alpine 3.14
  • Installed via: skaffold.dev
  • Contents of skaffold.yaml:
apiVersion: skaffold/v2beta18
kind: Config
...
profiles:
- name: build-app
  build:
    artifacts:
    - image: <image>
      context: <folder>
      kaniko:
        dockerfile: Dockerfile 
        image: gcr.io/kaniko-project/executor:debug
        volumeMounts:
        - name: kaniko-secret
          readonly: false
          mountpath: /kaniko/.docker
          subpath: ""
          mountpropagation: null
          subpathexpr: ""
        - name: kaniko-secret
          readonly: false
          mountpath: /kaniko/ssl/certs/<cert>
          subpath: <cert>
          mountpropagation: null
          subpathexpr: ""
    tagPolicy:
      envTemplate:
        template: '{{.APP_VERSION}}'
    cluster:
      pullSecretName: kaniko-secret
      namespace: jenkins

Steps to reproduce the behavior

  1. a clonable repository with the sample skaffold project
  2. skaffold run --profile <profile>
  3. ...
ska$ ffold run --profile build-app '--filename=./skaffold.yaml' -v debug
level=info msg="Skaffold &{Version:v1.27.0 ConfigVersion:skaffold/v2beta18 GitVersion: GitCommit:1f46f249c832bb2a99e3285ad327647c95ff4bb9 BuildDate:2021-06-29T21:37:08Z GoVersion:go1.14.14 Compiler:gc Platform:linux/amd64 User:}"
level=info msg="Loaded Skaffold defaults from \"/home/build/.skaffold/config\""
level=debug msg="parsed 1 configs from configuration file /home/jenkins/agent/workspace/<folder>/skaffold.yaml"
level=info msg="applying profile: build-app"
level=debug msg="overlaying profile on config for field Build"
level=debug msg="overlaying profile on config for field artifacts"
level=debug msg="overlaying profile on config for field insecureRegistries"
level=debug msg="overlaying profile on config for field tagPolicy"
level=debug msg="overlaying profile on config for field BuildType"
level=debug msg="overlaying profile on config for field Test"
level=debug msg="overlaying profile on config for field Deploy"
level=debug msg="overlaying profile on config for field DeployType"
level=debug msg="overlaying profile on config for field helm"
level=debug msg="overlaying profile on config for field kpt"
level=debug msg="overlaying profile on config for field kubectl"
level=debug msg="overlaying profile on config for field kustomize"
level=debug msg="overlaying profile on config for field statusCheck"
level=debug msg="overlaying profile on config for field statusCheckDeadlineSeconds"
level=debug msg="overlaying profile on config for field kubeContext"
level=debug msg="overlaying profile on config for field logs"
level=debug msg="overlaying profile on config for field prefix"
level=debug msg="overlaying profile on config for field PortForward"
level=debug msg="Defaulting deploy type to kubectl"
level=debug msg="Running command: [tput colors]"
level=debug msg="error checking for color support: checking terminal colors: starting command tput colors: exec: \"tput\": executable file not found in $PATH"
invalid skaffold config: skaffold config named "/home/jenkins/agent/workspace/<folder>/skaffold.yaml" referenced file "k8s/*.yaml" that could not be found. Verify that file "k8s/*.yaml" referenced in config 

"/home/jenkins/agent/workspace//skaffold.yaml" exists and the path and naming are correct.

after installing package "ncurses"

error checking for color support: checking terminal colors: running [tput colors]\n - stdout: \"\"\n - stderr: \"tput: No value for $TERM and no -T specified\\n\"\n - cause: exit status 2"
@gsquared94 gsquared94 added kind/bug Something isn't working priority/p1 High impact feature/bug. labels Jul 22, 2021
@briandealwis
Copy link
Member

briandealwis commented Jul 23, 2021

@MarcoSchaar from that error, your skaffold.yaml does not seem to have a deploy: section setup and so Skaffold's default is being used instead. The kubectl defaults are the equivalent of:

deploy:
  kubectl:
   manifests: ["k8s/*.yaml"]

We need more information here, particularly the full skaffold.yaml (with any sensitive info redacted).

@MarcoSchaar
Copy link
Author

Thanks for reply. @briandealwis
I would rather bet that the issue is not with deploy section.
it might be something related to tput colors command that works fine locally but some issue occurs in a container environment.
version v1.26.0 works in both

@MarcoSchaar
Copy link
Author

MarcoSchaar commented Jul 27, 2021

dear support team,
my bad ...
switching from command skaffold run --profile <profile> to skaffold build --profile <profile> helped to get successful build with v1.28.1
in addition I've set a default environment variable $TERM

@gsquared94
Copy link
Contributor

thanks for the update @MarcoSchaar.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/config kind/bug Something isn't working priority/p1 High impact feature/bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants