Commit Graph
100 Commits
Author SHA1 Message Date
Erin CallandGitHub f24a8e44ca Merge pull request #79 from pelotech/versions-in-bugs
Ask for version information in the bug template
2020-01-22 11:24:10 -08:00
Erin CallandGitHub 8cb8a5d95d Merge branch 'master' into versions-in-bugs 2020-01-22 11:21:37 -08:00
Erin CallandGitHub a4834dd4f7 Merge pull request #77 from pelotech/interpolate-secrets
Interpolate environment variables into cfg.Values and cfg.StringValues
2020-01-22 11:18:17 -08:00
Erin Call 8b6a8fdd4b Ask for version information in the bug template [#78] 2020-01-22 10:06:57 -08:00
Erin Call dbcef2699e Avoid polluted-env problems in config tests [#34]
I mean...it's *possible* someone will have SECRET_WATER set in their
env, right? Might as well be paranoid; it doesn't cost much.
2020-01-21 16:25:58 -08:00
Erin Call 22aa1df894 Don't bother trying to hide secrets in values [#34]
While testing this I discovered the secrets are revealed anyway, since
the lint/upgrade jobs' debug output includes the command they generated.
Might as well make the code a little simpler.
2020-01-21 16:23:55 -08:00
Erin Call 8f7b481934 Log debug information in loadValuesSecrets [#34] 2020-01-21 16:04:05 -08:00
Erin Call e843b26759 Expand env vars in Values/StringValues [#34] 2020-01-21 15:46:32 -08:00
Erin CallandGitHub 713dcd8317 Merge pull request #76 from pelotech/repo-certificates
Replace repo_ca_file setting with repo_certificate and repo_ca_certificate
2020-01-21 13:06:42 -08:00
Erin Call 18313eeb5c Use base64 strings for chart repo certs [#74]
This should be a more flexible option since certificates aren't likely
to be part of the actual workspace and may be environment-dependent. It
also mirrors the kube_certificate, which is nice.
2020-01-20 15:40:36 -08:00
Erin CallandGitHub ee6d8d1724 Merge pull request #73 from pelotech/godiomaticity
More-idiomatic initialization of Steps
2020-01-20 11:48:08 -08:00
Erin Call fcddc6e077 Merge branch 'master' into godiomaticity 2020-01-20 11:24:28 -08:00
Erin CallandGitHub c4b11795e3 Merge pull request #75 from pelotech/repo-ca-file
Add a setting for chart repository CA certificates
2020-01-20 11:03:00 -08:00
Erin Call ffa636ce47 Use lowercase envconfig tags throughout Config
Followup to discussion on #75. The important part is to have them
consistent, and I like the lowercase a little better since it matches
the casing in parameter_reference.md (and the code doesn't yell at me
:))
2020-01-20 10:54:52 -08:00
Erin Call c38537ac32 Pass --ca-file to helm upgrade when applicable [#74] 2020-01-20 10:48:21 -08:00
Erin Call 1f7b6bb389 Add a setting for chart repository CA certificates [#74] 2020-01-20 09:15:56 -08:00
Erin Call 79532e7635 Extract the debug/namespace flags into run.Config [#67]
This is a general-purpose cleanup commit; every step except InitKube had
the same six "add the --debug and --namespace flags if applicable" code.
2020-01-17 11:12:53 -08:00
Erin Call a21848484b Initialize run.Configs in the NewSTEP functions [#67]
This fixes the run package's leaky abstraction; other packages no longer
need to know or care that run.Config even exists.

Note that since the various Steps now depend on having a non-nil pointer
to a run.Config, it's unsafe (or at least risky) to initialize them
directly. They should be created with their NewSTEPNAME functions. All
their fields are now private, to reflect this.
2020-01-17 10:55:12 -08:00
Erin Call d8ddb79ef4 Test InitKube's use of the Debug flag [#67]
(Just something I happened across while writing the previous commit)
2020-01-16 15:32:40 -08:00
Erin Call 231138563c Remove the cfg argument from Step.Execute [#67]
This is the first step toward removing run.Config entirely. InitKube was
the only Step that even used cfg in its Execute function; the rest just
discarded it.
2020-01-16 15:30:40 -08:00
Erin Call 88bb8085b0 Deduplicate the kubeValues data in InitKube [#67]
Now that the InitKube initialization happens inside its own package, the
private .values field can be populated at the same time, rather than
having to wait for Prepare().

Also clarified the config/template filename fields (configFile vs.
ConfigFile was particularly ambiguous).
2020-01-16 15:12:15 -08:00
Erin Call 21b9d32329 Remove the tiny helper functions from plan.go [#67]
Now that InitKube, AddRepo, and UpdateDependencies are initialized with
NewSTEPNAME functions, the helper functions in plan.go are
unnecessary--they do too little to be a useful abstraction, and they
aren't complex or frequently-used enough to be worth extracting.
2020-01-16 13:57:28 -08:00
Erin Call 588c7cb9f7 Initialize Steps with a NewSTEPNAME function [#67]
This seems to be be a more natural separation of concerns--the knowledge
of which config fields map to which parts of a Step belong to the Step,
not to the Plan.
2020-01-16 13:50:04 -08:00
Erin Call 16117eea2f Put the Config in a new env package [#67]
I'd like to be able to make calls like NewUpgrade(cfg) rather than
Upgrade{...}.Prepare, but I wouldn't be able to define a NewUpgrade
function while Config is in the helm package; there would be a circular
import when Plan tried to import run.
2020-01-14 10:32:20 -08:00
Erin CallandGitHub 8a9cf23ab9 Merge pull request #71 from pelotech/alias-settings
Use clearer setting names, with backward-compatibility aliases
2020-01-09 11:45:11 -08:00
Erin Call 3d1a2227da Mention aliased settings in parameter_reference [#66] 2020-01-09 10:20:20 -08:00
Erin Call a826f66425 Test settings aliases without the plugin_ prefix [#66] 2020-01-08 12:37:34 -08:00
Erin Call 71421fbaa5 Fix godotenv dependency in go.mod
go.mod got an update when I ran the tests. It should've happened in
51058470e; I'm not sure why it was never updated.
2020-01-08 11:08:39 -08:00
Erin Call cfd8e33995 Use "backward-compatible", not "backwardS"
While writing docs in the previous commit, I noticed that we'd been
inconsistent in the naming scheme. Wikipedia's back-compat article
redirects from "backwards" to "backward", so I figure that's a
reasonable source of authority for which form to use.
2020-01-08 11:04:30 -08:00
Erin Call a5342d7bac Default to the canonical setting names [#66]
The goal with these changes was to give users a clearer, more readable
interface, so we should present that interface up front and only
document the aliases as a backward-compatibility option.

I've renamed the envconfig tags to reflect the switch, but I left the
actual field names the same. I think they're sufficiently meaningful
inside the code, and leaving them unchanged avoids making a bunch of
churn in the rest of the code.
2020-01-08 11:02:29 -08:00
Erin Call 6aa1d79d56 Stabilize the logic for setting-alias conflicts [#66]
This includes a refactor to the way aliases are processed. I had been
thinking in terms of locking down the aliases names pretty tightly, in
order to provide an error if there are conflicts. After discussion with
@josmo, though, it seems like we can do it the same way we do for
"PLUGIN_"/non-prefixed variables, i.e. quietly override them.
2020-01-08 09:35:14 -08:00
Erin Call 1d1117ba49 Use "kube" in setting aliases [#66]
Nobody likes typing "kubernetes"! Writing out that whole word without
typos is the third hard problem in computer science.
2020-01-07 15:40:58 -08:00
Erin Call 04de280821 Rough draft of aliased settings [#66] 2020-01-07 15:25:54 -08:00
Erin CallandGitHub 7cfe20db1f Merge pull request #69 from pelotech/cleanup-on-fail
Pass --cleanup-on-fail when so instructed
2020-01-07 13:18:31 -08:00
Erin CallandGitHub 7fc8212451 Merge branch 'master' into cleanup-on-fail 2020-01-07 13:17:58 -08:00
Erin CallandGitHub 7cb7ecec90 Merge pull request #70 from pelotech/external-param-reference
Mention the external docs in the PR template
2020-01-07 13:17:46 -08:00
Erin Call 55017eed0f Mention the external docs in the PR template [#63]
I just opened a PR with a config change and forgot about the plugin-
index docs...must be time to get around to this issue.
2020-01-07 13:04:21 -08:00
Erin Call b6ba856c31 Pass CleanupOnFail to the Upgrade Step [#65]
I don't love the mismatch between the helm.Config field (CleanupOnFail)
and the setting name (cleanup_failed_upgrade). I do think the setting
name should contain "upgrade" since it's specific to the upgrade command,
but if I make the config field CleanupFailedUpgrade, it becomes the new
longest field name, and gofmt creates a bunch of churn. Is that a good
enough reason...?
2020-01-07 12:56:51 -08:00
Erin Call 8c6c6fbfa5 CleanupOnFail option for the upgrade Step [#65] 2020-01-07 12:53:55 -08:00
Erin CallandGitHub e071d23fef Merge pull request #68 from pelotech/ATOMICS
Atomics
2020-01-07 12:34:32 -08:00
Erin Call c8b4ad4c46 Pass an atomic_upgrade setting to the Upgrade step [#64] 2020-01-07 12:21:55 -08:00
Erin Call 971e3f17cb Atomic option for the Upgrade step [#64] 2020-01-07 12:17:54 -08:00
Erin CallandGitHub ee3dc9ff0e Merge pull request #56 from pelotech/dotenv
Load .env files on startup
2020-01-02 13:51:57 -08:00
Erin CallandGitHub 7ecfe70e3e Merge branch 'master' into dotenv 2020-01-02 13:30:19 -08:00
Erin CallandGitHub d5bd083bf5 Merge pull request #59 from pelotech/keep-history
Pass --keep-history when so instructed
2020-01-02 13:29:43 -08:00
Erin CallandGitHub 8d8bcf78a7 Merge branch 'master' into keep-history 2020-01-02 13:26:53 -08:00
Erin CallandGitHub 45428a2e25 Merge branch 'master' into keep-history 2020-01-02 12:29:32 -08:00
Erin Call 7b816ea257 Merge branch 'master' into values-arent-global 2020-01-02 12:29:15 -08:00
Erin CallandGitHub 3c44be059e Merge pull request #60 from pelotech/lint-strictly
Pass --strict to `helm lint` when so instructed
2020-01-02 12:27:00 -08:00
Erin CallandGitHub 11ffdc7210 Merge branch 'master' into lint-strictly 2020-01-02 11:44:09 -08:00
Erin CallandGitHub b4a13d9971 Merge pull request #58 from pelotech/conflict-resolution-doc
Docs for settings/environment conflict resolution
2020-01-02 11:43:57 -08:00
Erin Call 4330728215 Put step-specific config in those steps [#61]
This is just something that's been bugging me for a while--they're
specific to Lint and Upgrade, so that's where they belong.
2020-01-02 11:38:41 -08:00
Erin Call 3ae13d4b3c Pass --strict to helm lint when so instructed [#28] 2020-01-02 11:25:13 -08:00
Erin Call 17724e7015 Pass --keep-history when so instructed [#24] 2020-01-02 10:58:58 -08:00
Erin Call 04a2c48ece Docs for settings/environment conflict resolution [#45] 2020-01-02 09:23:02 -08:00
Erin Call 997a33fc0d Simple issue template for doc requests [#46] 2020-01-02 09:12:51 -08:00
Erin CallandGitHub 280c8577a4 Merge branch 'master' into dotenv 2020-01-02 09:08:25 -08:00
Erin Call 51058470e5 Load .env files on startup [#6] 2020-01-02 09:05:26 -08:00
Erin Call 9c91a415b0 Merge branch 'master' into no-eks-support 2020-01-01 09:09:01 -08:00
Erin CallandGitHub 86984bcecd Merge pull request #50 from pelotech/no-prefix
Remove support for the prefix setting [#48]
2019-12-31 15:00:52 -08:00
Erin Call 7cd46bb8b1 Emit warnings about deprecated settings [#10]
These aren't an error case--the plugin will work just fine--but users
should be aware they (the settings) aren't being respected.
2019-12-31 10:03:53 -08:00
Erin Call ab7abb699a Remove support for the prefix setting [#48]
The setting isn't necessary with modern versions of Drone, and it
creates a lot of edge-cases. The use-case doesn't justify the added
complexity.
2019-12-31 09:28:42 -08:00
Erin CallandGitHub 8e5a32ff85 Merge branch 'master' into no-eks-support 2019-12-30 13:45:21 -08:00
Erin CallandGitHub 1dba561a76 Merge branch 'master' into helm-repos 2019-12-30 13:30:07 -08:00
Erin CallandGitHub ae31cf66c3 Merge pull request #41 from pelotech/license
Use the apache 2.0 license [#23]
2019-12-30 13:29:52 -08:00
Erin CallandGitHub 3985ec8faa Merge branch 'master' into helm-repos 2019-12-30 13:29:23 -08:00
Erin Call 499ab6877f Do repo error-checking in AddRepo.Prepare [#26] 2019-12-30 13:24:57 -08:00
Erin CallandGitHub 2b802df00f Merge branch 'master' into license 2019-12-30 11:59:12 -08:00
Erin Call 48b6b3f5b3 Create AddRepo steps when there are repos to add [#26] 2019-12-30 11:57:19 -08:00
Erin Call 22e30fea56 The prefix setting is implemented [#19,#9]
Just something I noticed while resolving a merge conflict. The "write
some docs" and "implement prefix" branches happened concurrently and
didn't get re-coordinated.
2019-12-30 09:56:47 -08:00
Erin Call 9155d5eeeb Merge branch 'master' into helm-repos 2019-12-30 09:56:18 -08:00
Erin Call 75c99683b5 AddRepo step that calls helm repo add [#26]
As with some of the other commands, I'm not sure `--namespace` is
relevant here. Just rolling with the "at worst it doesn't hurt" theory.
2019-12-30 09:52:00 -08:00
Erin Call d5a59590a1 Shim bare numbers into duration strings [#39]
Helm2's --timeout took a number of seconds, rather than the
ParseDuration-compatible string that helm3 uses. For backward-
compatibility, update a bare number into a duration string.
2019-12-27 16:20:32 -08:00
Erin Call 89ec9425b0 Mention the chart param for uninstalls [#25] 2019-12-27 15:44:09 -08:00
Erin Call 181165cc51 Call helm dependency update when so instructed [#25]
As with Lint, I have no idea whether the --namespace flag actually
matters here. I don't think it will hurt, though!
2019-12-27 15:06:32 -08:00
Erin Call 354dce2e12 Use the apache 2.0 license [#23] 2019-12-27 11:18:13 -08:00
Erin Call 12c8e08d6f Mention that EKS isn't currently supported [#5]
We'd like to support it eventually, but the current state of affairs
doesn't justify the effort.

Also removed some vestigial code that was copy-pasta from the kubeconfig
in drone-helm.
2019-12-27 10:49:22 -08:00
Erin CallandGitHub 3b78f01b45 Merge pull request #37 from pelotech/github-metafiles
Metafiles for the github repo config
2019-12-26 15:38:46 -08:00
Erin Call 24060c18fc Provide better e2e-testing instructions [#12]
The "get a kubernetes cluster" part could use some outfleshing, but this
is certainly more straightforward than it was before.
2019-12-26 15:21:34 -08:00
Erin Call 232bb5eb96 Rely on the PR template for docs/code consistency [#12]
These comments were a reasonable attempt at ensuring the documentation
matched reality, but the checkbox in the pull request template is much
more likely to produce results.
2019-12-26 13:03:53 -08:00
Erin Call c0964ae178 Merge branch 'master' into github-metafiles 2019-12-26 13:02:02 -08:00
Erin CallandGitHub 818c0246fa Merge branch 'master' into help-by-default 2019-12-26 13:00:13 -08:00
Erin CallandGitHub 9f9e83da99 Merge pull request #35 from pelotech/testplan
Add omitted plan tests
2019-12-26 12:59:54 -08:00
Erin CallandGitHub 39aea4c8dd Merge branch 'master' into testplan 2019-12-26 12:58:46 -08:00
Erin CallandGitHub 7e25218945 Merge pull request #36 from pelotech/kubeconfig-tests
Validation tests for the kubeconfig template
2019-12-26 12:58:27 -08:00
Erin Call 3b85c38714 Test yaml validity without a new dependency [#15]
It turns out testify already depends on yaml, so we aren't adding
anything new by using it here.
2019-12-26 12:53:36 -08:00
Erin Call 1422ec77a4 Merge branch 'master' into kubeconfig-tests 2019-12-26 12:50:00 -08:00
Erin Call 2a13fff548 Don't check the generated config's yaml syntax [#13]
See discussion on https://github.com/pelotech/drone-helm3/pull/36 --it
doesn't really make sense to add a dependency on yaml just for testing.
2019-12-26 12:39:02 -08:00
Erin CallandGitHub d53a1ed942 Merge branch 'master' into testplan 2019-12-26 12:26:07 -08:00
Erin Call 167b53691b Put HelmCommand in Help, not run.Config [#15] 2019-12-26 12:23:56 -08:00
Erin Call b1899dee56 Merge remote-tracking branch 'origin/master' into help-by-default 2019-12-26 12:23:14 -08:00
Erin CallandGitHub fc3bfc466a Merge pull request #32 from pelotech/config-fixup
Clarify and improve internal/helm.Config
2019-12-26 12:23:00 -08:00
Erin CallandGitHub 8f2d4bec49 Merge branch 'master' into testplan 2019-12-26 12:08:30 -08:00
Erin Call b2066961e1 Merge branch 'master' into kubeconfig-tests 2019-12-26 11:55:32 -08:00
Erin Call 41e9e42239 Emit a trailing newline on execution error [#15]
Just something I noticed while testing the help command's error case.
2019-12-26 11:34:07 -08:00
Erin Call 6d28b7b28a Return an error on unknown commands [#15]
I'm probably overthinking this--explicitly calling help is a strange and
unusual case--but it doesn't really hurt, so I'm going for it.
2019-12-26 11:29:33 -08:00
Erin Call 34b9ec1c4c Run the Help step by default [#15] 2019-12-26 10:47:42 -08:00
Erin Call 568f613401 Associate lines of text with their yaml blocks [#8]
As I skimmed through that section I noticed it wasn't immediately clear
whether a line of text was referring to the example above it or the one
below it.
2019-12-26 09:44:46 -08:00
Erin Call dc05855aa5 Mention the settings/environment equivalency [#8]
It seems like this needs more information, like why you'd want to put
something in one stanza or the other, but I don't really know enough
about drone to give useful advice.
2019-12-26 09:41:10 -08:00
Erin Call a71bba71fd Give contributors some maybe-adequate information [#12]
I honestly have no idea how useful this document is, but it's probably
better than nothing?
2019-12-25 16:08:29 -08:00