DevSpace - The Fastest Developer Tool for Kubernetes ⚡ Automate your deployment workflow with DevSpace and develop software directly inside Kubernetes.
When running devspace init on a directory for a Go project that already had a Helm chart, I get an error message and partially completed generated files after finishing the prompts.
I was trying to do this for a popular open source project that works this way (Go, has a Helm chart already). But I've created a minimal reproduction instead of referencing that open source project for this bug report.
The error:
fatal error rendering deployment: devspace render: exit status 1
The devspace_start.sh file:
#!/bin/bash
set +e # Continue on errors
COLOR_BLUE="\033[0;94m"
COLOR_GREEN="\033[0;92m"
COLOR_RESET="\033[0m"
# Print useful output for user
echo -e "${COLOR_BLUE}
%########%
%###########% ____ _____
%#########% | _ \ ___ __ __ / ___/ ____ ____ ____ ___
%#########% | | | | / _ \\\\\ \ / / \___ \ | _ \ / _ | / __// _ \\
%#############% | |_| |( __/ \ V / ____) )| |_) )( (_| |( (__( __/
%#############% |____/ \___| \_/ \____/ | __/ \__,_| \___\\\\\___|
%###############% |_|
%###########%${COLOR_RESET}
Welcome to your development container!
This is how you can work with it:
- Files will be synchronized between your local machine and this container
- Some ports will be forwarded, so you can access this container via localhost
- Run \`${COLOR_GREEN}go run main.go${COLOR_RESET}\` to start the application
"
# Set terminal prompt
export PS1="\[${COLOR_BLUE}\]devspace\[${COLOR_RESET}\] ./\W \[${COLOR_BLUE}\]\\$\[${COLOR_RESET}\] "
if [ -z "$BASH" ]; then export PS1="$ "; fi
# Include project's bin/ folder in PATH
export PATH="./bin:$PATH"
# Open shell
bash --norc
DevSpace would initialize itself for my Go project with a pre-existing Helm chart.
How can we reproduce the bug? (as minimally and precisely as possible)
Create a test directory, create a new Helm chart within it, initialize the directory to be a Go module, run devspace init, and follow the prompts, specifying that you want it to use the existing Helm chart:
~ > mkdir devspace-test
~ > cd devspace-test/
~/devspace-test > helm create foo
Creating foo
~/devspace-test > go mod init example.com
go: creating new go.mod: module example.com
go: to add module requirements and sums:
go mod tidy
~/devspace-test > touch main.go
~/devspace-test > devspace init
%########%
%###########% ____ _____
%#########% | _ \ ___ __ __ / ___/ ____ ____ ____ ___
%#########% | | | | / _ \\ \ / / \___ \ | _ \ / _ | / __// _ \
%#############% | |_| |( __/ \ V / ____) )| |_) )( (_| |( (__( __/
%#############% |____/ \___| \_/ \____/ | __/ \__,_| \___\\___|
%###############% |_|
%###########%
info Detecting programming language...
? Select the programming language of this project go
? How do you want to deploy this project?
? Do you already have a Helm chart for this project? Yes
? Which Helm chart do you want to use?
? Please enter the relative path to your local Helm chart (e.g. ./chart) foo
? Do you want to develop this project with DevSpace or just deploy it? [Use arrows to move, type to filter] I want to develop this project and my current working dir contains the source code
fatal error rendering deployment: devspace render: exit status 1
Local Environment:
DevSpace Version: 6.3.12
Operating System:
> lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 23.10
Release: 23.10
Codename: mantic
ARCH of the OS: AMD64
Go version: 1.21.9
Anything else we need to know?
Detailed stack trace when running it with --debug too:
What happened?
When running
devspace init
on a directory for a Go project that already had a Helm chart, I get an error message and partially completed generated files after finishing the prompts.I was trying to do this for a popular open source project that works this way (Go, has a Helm chart already). But I've created a minimal reproduction instead of referencing that open source project for this bug report.
The error:
The
devspace_start.sh
file:The
devspace.yaml
file:What did you expect to happen instead?
DevSpace would initialize itself for my Go project with a pre-existing Helm chart.
How can we reproduce the bug? (as minimally and precisely as possible)
Create a test directory, create a new Helm chart within it, initialize the directory to be a Go module, run
devspace init
, and follow the prompts, specifying that you want it to use the existing Helm chart:Local Environment:
Anything else we need to know?
Detailed stack trace when running it with
--debug
too: