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

Unable to use "ct install" command #101

Closed
onyxet opened this issue Feb 12, 2019 · 4 comments · Fixed by #104
Closed

Unable to use "ct install" command #101

onyxet opened this issue Feb 12, 2019 · 4 comments · Fixed by #104
Assignees

Comments

@onyxet
Copy link

onyxet commented Feb 12, 2019

Is this a request for help?: No


Is this a BUG REPORT or FEATURE REQUEST? (choose one): BUG REPORT

Version of Helm and Kubernetes:
kubectl:
Client Version: version.Info{Major:"1", Minor:"13", GitVersion:"v1.13.1", GitCommit:"eec55b9ba98609a46fee712359c7b5b365bdd920", GitTreeState:"clean", BuildDate:"2018-12-13T10:39:04Z", GoVersion:"go1.11.2", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"10", GitVersion:"v1.10.11", GitCommit:"637c7e288581ee40ab4ca210618a89a555b6e7e9", GitTreeState:"clean", BuildDate:"2018-11-26T14:25:46Z", GoVersion:"go1.9.3", Compiler:"gc", Platform:"linux/amd64"}

helm
Client: &version.Version{SemVer:"v2.12.2", GitCommit:"7d2b0c73d734f6586ed222a567c5d103fed435be", GitTreeState:"clean"}
Server: &version.Version{SemVer:"v2.11.0", GitCommit:"2e55dbe1fdb5fdb96b75ff144a339489417b146b", GitTreeState:"clean"}

ct:
Version: v2.2.0
Git commit: 00f3726
Date: 2019-01-23T14:30:52Z
License: Apache 2.0

What happened:
I was trying to use official docker container which has a tag: v2.2.0 with own made chart.
During install phase ct generates random release name which is not valid for helm

Error message:

Installing charts...
Version increment checking disabled.

Configuration

Remote: upstream
TargetBranch: master
BuildId:
LintConf: /etc/ct/lintconf.yaml
ChartYamlSchema: chart_schema.yaml
ValidateMaintainers: false
ValidateChartSchema: false
ValidateYaml: false
CheckVersionIncrement: false
ProcessAllCharts: false
Charts: [./]
ChartRepos: []
ChartDirs: [stable incubator]
ExcludedCharts: []
HelmExtraArgs: --timeout 500 --tiller-namespace kube-system --dry-run --debug
HelmRepoExtraArgs: []
Debug: true
Namespace: kube-system
ReleaseLabel: test


Charts to be processed:

./

helm init --client-only
$HELM_HOME has been configured at /root/.helm.
Not installing Tiller due to 'client-only' flag having been set
Happy Helming!
helm dependency build ./
No requirements found in .//charts.
Installing chart './'...
helm install ./ --name .-2cnt7c1osa --namespace kube-system --wait --timeout 500 --tiller-namespace kube-system --dry-run --debug
[debug] Created tunnel using local port: '39759'

[debug] SERVER: "127.0.0.1:39759"

[debug] Original chart version: ""
[debug] CHART PATH: /service-monitors

Error: release name .-2cnt7c1osa is not a valid DNS label: a DNS-1123 label must consist of lower case alphanumeric characters or '-', and must start and end with an alphanumeric character (e.g. 'my-name', or '123-abc', regex used for validation is 'a-z0-9?')
kubectl get pods --no-headers --namespace kube-system --selector test=.-2cnt7c1osa --output jsonpath={.items[*].metadata.name}
Error printing logs: Error running process: exit status 1
Deleting release '.-2cnt7c1osa'...
helm delete --purge .-2cnt7c1osa --timeout 500 --tiller-namespace kube-system --dry-run --debug
[debug] Created tunnel using local port: '45833'

[debug] SERVER: "127.0.0.1:45833"

Error: incompatible versions client[v2.12.2] server[v2.11.0]
Error deleting Helm release: Error waiting for process: exit status 1
Error installing charts: Error processing charts

✖︎ ./ > Error waiting for process: exit status 1

What you expected to happen:
Perform lint and install operations without errors

How to reproduce it (as minimally and precisely as possible):

  1. Download docker image: quay.io/helmpack/chart-testing:v2.2.0
  2. Create simple local chart
  3. Try to run next command inside the container in directory with your chart:
    ct install --debug --charts ./ --release-label=test --helm-extra-args=" --timeout 500 --tiller-namespace kube-system --dry-run --debug" --namespace kube-system

Anything else we need to know:

@unguiculus
Copy link
Member

Your configuration is not correct. The flag --charts must point to valid charts that exist within your configured chart directories (stable and incubator in your case), i. e., if you want to test chart stable/foo you'd specify --charts foo. Note that a chart foo should be in a directory with the same name.

@onyxet
Copy link
Author

onyxet commented Feb 12, 2019

@unguiculus Thank you for reply!
But I want to test local chart which I created. This chart isn't from remote repository. Do I have an ability to use ct tool with local branch of code?

@unguiculus
Copy link
Member

Of course, you can test your own chart. Please familiarize yourself with ct's configuration. You configured it to look for charts in stable and incubator directories. Your charts should be in subdirectories of these directories. If you are not in a Git repo you should be able to specify the charts to test directly as you are trying to do. As I mentioned above, make sure your chart is in a directory that is named after the chart.

@unguiculus unguiculus self-assigned this Feb 12, 2019
@onyxet
Copy link
Author

onyxet commented Feb 14, 2019

@unguiculus Thank you. I'll definitely should reread docs and today I'll try again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants