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

local helm on windows uses incorrect path to values files #122

Open
eyammer opened this issue Nov 17, 2022 · 3 comments
Open

local helm on windows uses incorrect path to values files #122

eyammer opened this issue Nov 17, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@eyammer
Copy link

eyammer commented Nov 17, 2022

What happened?

ran deck get using:

- type: helm 
        ref: ./redis/ 
        releaseName: redis 
        chart: redis 
        namespace: default 
        valueFiles: 
          - ./inf.yaml 

This exited with an error:

ocker.errors.ContainerError: Command 'bash -c "helm dep up ./redis/ && helm template redis /sources/redis/ --include-crds --namespace default --values /sources\redis/inf.yaml --output-dir /output --kube-version 1.24 --api-versions 1.24"' in image 'deck-tooler:0.10.1' returned non-zero exit status 1: b'Error: open /sourcesredis/inf.yaml: no such file or directory\n' 

[CRITICAL] There was an error running deck: Command 'bash -c "helm dep up ./redis/ && helm template redis /sources/redis/ --include-crds --namespace default --values /sources\redis/inf.yaml --output-dir /output --kube-version 1.24 --api-versions 1.24"' in image 'deck-tooler:0.10.1' returned non-zero exit status 1: b'Error: open /sourcesredis/inf.yaml: no such file or directory\n' 

What did you expect to happen?

the deck to start

How can we reproduce it (as minimally and precisely as possible)?

on windows run deck get deck.yaml

What is the content of the Deckfile you are using?

version: "1"

cluster:

provider: beiboot

name: beka

nativeConfig:

timeouts: 

 api: 60  # in seconds, defaults to 30 

 cluster: 720  # in seconds, defaults to 180 

context: arn:aws:eks:us-east-1:236287118453:cluster/crb-devops-devops 

ports: 

  - port: 8080:80 

decks:

  • name: beka

    namespace: default

    sources:

    • type: file

      ref: ./image_pull_secret_chron.yaml

    • type: helm

      ref: ./redis/

      releaseName: redis

      chart: redis

      namespace: default

      valueFiles:

      • ./inf.yaml

OS version

# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here

# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
BuildNumber  Caption                                   OSArchitecture  Version 

17763        Microsoft Windows Server 2019 Datacenter  64-bit          10.0.17763 

 

Anything else we need to know?

full error:

Traceback (most recent call last): 

  File "getdeck.__main__", line 143, in main 

    run_deck( 

  File "getdeck.api.utils", line 10, in wrapper 

    result = func(*args, **kwargs) 

  File "getdeck.api.get", line 75, in run_deck 

    raise e 

  File "getdeck.api.get", line 65, in run_deck 

    generated_deck = prepare_k8s_workload_for_deck( 

  File "getdeck.sources.utils", line 56, in prepare_k8s_workload_for_deck 

    source_files = fetcher_context.fetch_source_files() 

  File "getdeck.sources.fetcher", line 84, in fetch_source_files 

    source_files = self._strategy.fetch() 

  File "getdeck.sources.fetcher", line 43, in fetch 

    return handler(self) 

  File "getdeck.sources.tooler", line 140, in fetch_local 

    self.run_tooler(cmd) 

  File "getdeck.sources.tooler", line 183, in run_tooler 

    tooler.run( 

  File "getdeck.sources.tooler", line 45, in run 

    content = config.DOCKER.containers.run( 

  File "docker.models.containers", line 875, in run 

    raise ContainerError( 

docker.errors.ContainerError: Command 'bash -c "helm dep up ./redis/ && helm template redis /sources/redis/ --include-crds --namespace default --values /sources\redis/inf.yaml --output-dir /output --kube-version 1.24 --api-versions 1.24"' in image 'deck-tooler:0.10.1' returned non-zero exit status 1: b'Error: open /sourcesredis/inf.yaml: no such file or directory\n' 

[CRITICAL] There was an error running deck: Command 'bash -c "helm dep up ./redis/ && helm template redis /sources/redis/ --include-crds --namespace default --values /sources\redis/inf.yaml --output-dir /output --kube-version 1.24 --api-versions 1.24"' in image 'deck-tooler:0.10.1' returned non-zero exit status 1: b'Error: open /sourcesredis/inf.yaml: no such file or directory\n' 

@eyammer eyammer added the bug Something isn't working label Nov 17, 2022
@eyammer
Copy link
Author

eyammer commented Nov 17, 2022

I upgraded to deck 0.11.1 it still failed, the error was a bit different.

[INFO] Now deleting Beiboot 'beka-eyammercvm-eyammer'. 

Traceback (most recent call last): 

  File "getdeck.__main__", line 159, in main 

    command(args=args) 

  File "getdeck.cli.get", line 182, in get_command 

    run_deck( 

  File "getdeck.cli.utils", line 10, in wrapper 

    result = func(*args, **kwargs) 

  File "getdeck.cli.get", line 77, in run_deck 

    raise e 

  File "getdeck.cli.get", line 69, in run_deck 

    generated_deck = prepare_k8s_workload_for_deck(config, data_aux, deck_name) 

  File "getdeck.sources.utils", line 69, in prepare_k8s_workload_for_deck 

    source_files = resource_generator.render( 

  File "getdeck.sources.generator", line 66, in render 

    source_files = self._render_behavior.render( 

  File "getdeck.sources.tooler", line 147, in render 

    self.run_tooler(cmd) 

  File "getdeck.sources.tooler", line 170, in run_tooler 

    tooler.run( 

  File "getdeck.sources.tooler", line 45, in run 

    content = config.DOCKER.containers.run( 

  File "docker.models.containers", line 876, in run 

    raise ContainerError( 

docker.errors.ContainerError: Command 'bash -c "helm dep up ./redis/ && helm template redis /sources/redis/ --include-crds --namespace default --values /sources\redis/inf.yaml --output-dir /output --kube-version 1.24 --api-versions 1.24"' in image 'deck-tooler:0.11.1' returned non-zero exit status 1: b'Error: could not find redis: stat redis: no such file or directory\n' 

[CRITICAL] There was an error running deck: Command 'bash -c "helm dep up ./redis/ && helm template redis /sources/redis/ --include-crds --namespace default --values /sources\redis/inf.yaml --output-dir /output --kube-version 1.24 --api-versions 1.24"' in image 'deck-tooler:0.11.1' returned non-zero exit status 1: b'Error: could not find redis: stat redis: no such file or directory\n' 

@buschNT
Copy link
Collaborator

buschNT commented Nov 18, 2022

Hello @eyammer Thanks for reporting this issue. The path in version 10.1 is clearly wrong:
b'Error: open /sourcesredis/inf.yaml: no such file or directory\n'
This looks like some path parsing/merging errors depending on the operating system. Even if the error message is slightly different in version 11.1, it might still be the underlying cause of this error.

@eyammer
Copy link
Author

eyammer commented Nov 20, 2022

Makes sense. The workaround was to put the absolute path for the values file using the path it hsould have in the deck container:

valueFiles:
  - /sources/redis/inf.yaml

this fixed the issue however it is less than ideal.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants