appnexus / ankh Goto Github PK
View Code? Open in Web Editor NEWAnother Kubernetes Helper
License: Apache License 2.0
Another Kubernetes Helper
License: Apache License 2.0
repro step
remove slack from your ankh config and try to execute ankh apply --slack, it will throw an error saying that authentication failed
expected:
apply validation if --slack is provided so that
if (sendSlackMessage && (!config.slack || !config.slack.token || !config.slack.format .... )) throw error
Using current-context
is dangerous so let's remove it and instead allow people to use explicit --environment
and --context
flags.
It's not currently possible to switch to a context that comes from an include
:
$ ankh config use-context kube00nym2-staging
# ERROR Context 'kube00nym2-staging' not found in `contexts`
# INFO The following contexts are available:
# INFO - minikube
We've decided that the whole concept of current-context
should go away in the next major release since it's too dangerous to rely on that bit of state. In light of that, let's add a deprecation warning that says
WARNING
current-context
will be removed in the next major version of ankh. It currently does not support values that come frominclude
. Use the--context
flag instead.
ankh config init
should create ~/.ankh/config if it doesn't exist yet
maybe we can enumerate things to tidy up so that we can remove the "experimental" warning?
Helm 3 removes the --name
flag in favor of the following format:
Usage:
helm template [NAME] [CHART] [flags]
This causes failures in ankh templating:
# INFO Templating chart "flotilla" from path "helm/flotilla"
# FATAL error running the helm command: exit status 1 -- the helm process had the following output on stderr:
Error: unknown flag: --name
after a fresh install, running ankh version
prints this error:
$ ankh version
# WARNING /Users/ogupte/.ankh/config: Unable to read ankh config '/Users/ogupte/.ankh/config': open /Users/ogupte/.ankh/config: no such file or directory
# ERROR Context '' not found in `contexts`
# INFO The following contexts are available:
ankh passing templated output through temp files (instead of stdout/stdin pipes) would probably solve:
- ankh erroring immediately if the underlying
kubectl
wrapper prompts stdin for a passwordkubectl apply
error messages to reference an input file line number instead of vaguely saying "from stdin"
https://github.com/appnexus/ankh#chart
https://github.com/appnexus/ankh#chart-1
Is this intentional? If so it's confusing.
In any case what would be helpful to understand this section is to break down models by yaml
file in which they can be found: from what I understand the ones at the top are in ~/.ankh/config
and the ones at the bottom are in any ankh.yaml
.
Currently we print an error and tell the user to init
but this should just be done automatically.
It looks like exactly one newline at the end of any matched document is removed, causing yaml badness when more than one document is matched and they are concatenated.
This is probably fallout from the highly hand-written yaml filter code that attempts to preserve comments and whitespace. More care is needed.
Make a minimal-chart
directory with the following Chart.yaml
:
name: my-app
version: 1.0.0
And the following minimal-chart/templates/config-map.yaml
:
apiVersion: v1
kind: ConfigMap
metadata:
name: "my-app-{{ .Release.Name }}"
labels:
app: "my-app"
release: {{ .Release.Name }}
data:
SOME_CONFIG: "any-value"
Then run ankh lint chart-path=./minimal-chart
, choose some environment, and leave the namespace blank.
Ankh panics with:
panic: attempted to parse unknown event: none [recovered]
panic: attempted to parse unknown event: none [recovered]
panic: attempted to parse unknown event: none
goroutine 1 [running]:
github.com/jawher/mow%2ecli.(*step).run(0xc000368600, 0x14e13a0, 0xc0002280f0)
/Users/dbemiller/go/pkg/mod/github.com/jawher/[email protected]/flow.go:28 +0xd6
github.com/jawher/mow%2ecli.(*step).run(0xc000368660, 0x14e13a0, 0xc0002280f0)
/Users/dbemiller/go/pkg/mod/github.com/jawher/[email protected]/flow.go:20 +0xbe
github.com/jawher/mow%2ecli.(*step).run(0xc0003691d0, 0x14e13a0, 0xc0002280f0)
/Users/dbemiller/go/pkg/mod/github.com/jawher/[email protected]/flow.go:20 +0xbe
github.com/jawher/mow%2ecli.(*step).callDo.func1(0xc000369200, 0x0, 0x0)
/Users/dbemiller/go/pkg/mod/github.com/jawher/[email protected]/flow.go:41 +0x4a
panic(0x14e13a0, 0xc0002280f0)
/usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/panic.go:969 +0x166
gopkg.in/yaml%2ev2.handleErr(0xc00073c798)
/Users/dbemiller/go/pkg/mod/gopkg.in/[email protected]/yaml.go:249 +0x9a
panic(0x14e13a0, 0xc0002280f0)
/usr/local/Cellar/go/1.14.2_1/libexec/src/runtime/panic.go:969 +0x166
gopkg.in/yaml%2ev2.(*parser).parse(0xc000356000, 0xc00007e100)
/Users/dbemiller/go/pkg/mod/gopkg.in/[email protected]/decode.go:158 +0x251
gopkg.in/yaml%2ev2.(*Decoder).Decode(0xc00073c848, 0x14c7bc0, 0xc0001081e0, 0x0, 0x0)
/Users/dbemiller/go/pkg/mod/gopkg.in/[email protected]/yaml.go:122 +0xdf
github.com/appnexus/ankh/helm.helmLint(0xc000362480, 0xc0000fe000, 0xbb, 0x0, 0x0, 0xc000600400)
/Users/dbemiller/code/ankh/helm/lintstage.go:106 +0x232
...
An error message that describes what's broken or missing.
ankh template
ankh chart fetch
(#87)is it possible to use something like git diff --no-index
for a nice +/- view (versus diff
with </>)?
fetch remote chart (as yaml?) and (print to stdout?)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.