Commit graph

560 commits

Author SHA1 Message Date
Christopher Swenson
99d745ca0c
Update vault-k8s to 1.0.0 (#784)
Update vault-k8s to 1.0.0

Also update Kubernetes versions tested against, including adding 1.25

Update consul in tests for Kubernetes 1.25 support
2022-09-07 17:21:47 -07:00
Ben Ash
04074311f7
Add support for the Prometheus Operator (#772)
support collecting Vault server metrics by deploying PrometheusOperator
CustomResources.

Co-authored-by: Sam Weston <weston.sam@gmail.com>
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-09-01 13:07:49 -06:00
Ben Ash
8a6872e36d
CI: run acceptance tests on push to any (#781) 2022-09-01 12:39:38 -06:00
Theron Voran
85562b47c4
update values comments for server.securityContext (#778)
Since container is empty for openshift.
2022-08-26 10:05:44 -07:00
Alex Khaerov
9fa4c6c322
DOC: Minor typos fixes (#669)
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2022-08-16 20:39:59 +01:00
Christopher Swenson
eca526b1ce
Prepare for 0.21.0 release (#771)
Prepare for 0.21.0 release

CHANGES:
* `vault-k8s` updated to 0.17.0. (this)
* `vault-csi-provider` updated to 1.2.0 (this)
* `vault` updated to 1.11.2 (this)
* Start testing against Kubernetes 1.24. [GH-744](https://github.com/hashicorp/vault-helm/pull/744)
* Deprecated `injector.externalVaultAddr`. Added `global.externalVaultAddr`, which applies to both the Injector and the CSI Provider. [GH-745](https://github.com/hashicorp/vault-helm/pull/745)
* CSI Provider pods now set the `VAULT_ADDR` environment variable to either the internal Vault service or the configured external address. [GH-745](https://github.com/hashicorp/vault-helm/pull/745)

Features:
* server: Add `server.statefulSet.securityContext` to override pod and container `securityContext`. [GH-767](https://github.com/hashicorp/vault-helm/pull/767)
* csi: Add `csi.daemonSet.securityContext` to override pod and container `securityContext`. [GH-767](https://github.com/hashicorp/vault-helm/pull/767)
* injector: Add `injector.securityContext` to override pod and container `securityContext`. [GH-750](https://github.com/hashicorp/vault-helm/pull/750) and [GH-767](https://github.com/hashicorp/vault-helm/pull/767)
* Add `server.service.activeNodePort` and `server.service.standbyNodePort` to specify the `nodePort` for active and standby services. [GH-610](https://github.com/hashicorp/vault-helm/pull/610)
* Support for setting annotations on the injector's serviceAccount [GH-753](https://github.com/hashicorp/vault-helm/pull/753)
2022-08-10 14:54:49 -07:00
Christopher Swenson
9efd98a30f
csi/server.statefulset: custom security context (#767)
csi/server.statefulset: custom security context

This adds flexibility to have custom pod template and container
`securityContext` and preserves current default values and behavior.

Fixes https://github.com/hashicorp/vault-helm/issues/663.

This also is a way to address https://github.com/hashicorp/vault-helm/pull/599
so that people can specify, for example, the CSI to run in a privileged
container for OpenShift.

This is a follow-up to https://github.com/hashicorp/vault-helm/pull/750
and builds on the same principles.

Side note: I am not able to run `helm schema-gen` since it is
unmaintained and does not work with M1 Macs.
2022-08-08 12:48:28 -07:00
Ben Ash
8bc160489f
Update jira sync (#768) 2022-08-05 19:12:21 -04:00
Theron Voran
91b6c64f1f
changelog++ and json schema update (#762)
Changelog updates for #750, and json schema update.
2022-08-03 11:25:33 -07:00
Christopher Swenson
6931720454
Changelog and schema update for active/standby node port (#761)
* Changelog and schema update for active/standby node port

Follow-up to https://github.com/hashicorp/vault-helm/pull/610
2022-08-02 11:06:31 -07:00
ChrisFraun
eb95ac5d20
Feat/adding pod and container security context (#750)
Allow the injector's pod- and container-level securityContext to be
fully specified by the user, via new options
`injector.securityContext.pod` and
`injector.securityContext.container` with more complete
defaults. Deprecates `injector.uid` and `injector.gid`.

If `injector.uid` or `injector.gid` are set by the user, the old pod
securityContext settings will be used. Otherwise the new defaults and
settings are used.

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-08-01 23:00:29 -07:00
Jack Halford
553af862ea
Add support for nodePort for active and standby services (#610) 2022-08-01 13:16:51 -07:00
Theron Voran
999b0b7ec3
jira-sync: transition to "Closed" not "Close" (#758) 2022-07-19 09:26:50 -07:00
Theron Voran
324d68956a
changelog++ (#757) 2022-07-18 14:52:16 -07:00
Bruno Padilha
6c14d9d656
Support to add annotations in injector serviceaccount (#753) 2022-07-11 17:11:30 +01:00
Tom Proctor
44a07b8970
Set VAULT_ADDR env var for CSI Provider pods (#745) 2022-06-07 10:16:37 +01:00
Aleksey
d78a292f47
Update .helmignore (#732)
Review .helmignore file, ignore CI in chart
2022-06-02 14:25:52 -07:00
Christopher Swenson
48f4ab8aa4
Start testing against Kubernetes 1.24 (#744)
Start testing against Kubernetes 1.24

Update .github/workflows/acceptance.yaml

Remove skip csi

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-06-02 09:07:45 -07:00
Theron Voran
80560f5564
Mention minimum helm version in changelog (#742)
Also add a features section to 0.20.0
2022-06-01 10:25:19 -07:00
Christopher Swenson
45897a67fb
Prepare for release 0.20.1 (#739)
Prepare for release 0.20.1

Improvements:
* `vault-k8s` updated to 0.16.1

CHANGES:
* `vault` service account is now created even if the server is set to disabled, as per before 0.20.0 [GH-737](https://github.com/hashicorp/vault-helm/pull/737)
* Mutating webhook will no longer target the agent injector pod [GH-736](https://github.com/hashicorp/vault-helm/pull/736)

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-05-26 09:13:32 -07:00
Christopher Swenson
daa2b3b236
Set default object selector for webhooks to exclude injector itself (#736)
Set default object selector for webhooks to exclude injector itself

If `injector.failurePolicy` is set to `Fail`, there is a race condition
where if the mutating webhook config is setup before the injector, then
the injector can fail to start because it tries to inject itself.

We can work around this by ignoring the injector pod in in the webhook
by default.

Thanks to @joeyslalom for the object selector to exclude the pod.

Fixes https://github.com/hashicorp/vault-k8s/issues/258
2022-05-24 09:48:01 -07:00
Christopher Swenson
830761a293
Restore missing 'vault' service account (#737)
Our tutorials rely on this service account being present even if we are
using an external Vault.

The `values.yaml` also states that external Vaults are expected to use
this service account.

For example,
https://learn.hashicorp.com/tutorials/vault/kubernetes-external-vault?in=vault/kubernetes#install-the-vault-helm-chart-configured-to-address-an-external-vault
2022-05-24 08:27:17 -07:00
Theron Voran
3dcc3fd612
Update minimum required helm version in readme (#730)
Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
2022-05-19 23:23:09 -07:00
Tom Proctor
86b30098ae
Fix CSI acceptance tests (#728) 2022-05-16 18:19:15 +01:00
Tom Proctor
6ca2f72f34
Prepare v0.20.0 release (#727) 2022-05-16 17:28:31 +01:00
Christopher Swenson
eba754814a
Update the changelog with changes from 614 and 652 (#723)
* Update the changelog with changes from 614 and 652

* Update CHANGELOG.md

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-04-28 12:05:31 -07:00
Eric Miller
4005767e87
Implement support for Topology Spread Constraints (#652)
* Implemented support for topology spread constraints

* Update values.yaml

Co-authored-by: Ben Ash <32777270+benashz@users.noreply.github.com>

* Update values.yaml

Co-authored-by: Ben Ash <32777270+benashz@users.noreply.github.com>

* Add topologySpreadConstraints to values schema

* Implement injector deployment topology spread UTs

* also remove string from the relevant schema types

* Implement injector statefulset topology spread UTs

* Implement injector HA statefulset topology UTs

* Allow topologySpreadConstraints to be a string

Co-authored-by: Ellis Tarn <ellistarn@gmail.com>
Co-authored-by: Ben Ash <32777270+benashz@users.noreply.github.com>
Co-authored-by: Christopher Swenson <swenson@swenson.io>
2022-04-28 10:47:40 -07:00
Christopher Swenson
9b43054901
VUALT-5838 Restore Secrets Store CSI driver to 1.0.0 (#722)
1.0.1+ seems to only support Kubernetes 1.19+, so we break support for
1.16 if we upgrade
2022-04-27 09:58:56 -07:00
Christopher Swenson
230bba4706
VAULT-5838 Update CSI provider to 1.1.0 (#721)
* VAULT-5838 Update CSI provider to 1.1.0

* Update test/acceptance/csi.bats

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-04-27 09:22:50 -07:00
Stephen Herd
87e456754b
Issue 629: updated to allow customization of the CLUSTER_ADDR the same… (#709)
* Issue #629 Updates to allow customization of the CLUSTER_ADDR and unit tests to go with it

* Issue-#629 removing extra whitespace I added accidently.

* Issue-#629 fixing extra whitespace added.

* Update values.yaml

Co-authored-by: Joaco Muleiro Beltran <joaquinmuleirobeltran@gmail.com>

* Issue #629 adding changelog

Co-authored-by: Joaco Muleiro Beltran <joaquinmuleirobeltran@gmail.com>
2022-04-14 15:16:39 -07:00
Ethan J. Brown
4ae52c8bd3
Remove unncessary template calls (#712)
- As part of VAULT-571 / #703 in 7109159, a new vault.serverEnabled
   template was added (and included in vault.mode)

   Various templates were updated accordingly, but those that were
   already calling vault.mode had an additonal call to
   vault.serverEnabled made which was unnecessary

   Remove those
2022-04-12 22:54:54 -07:00
Stephen Herd
12444bffb6
Support policy/v1 disruptionbudget beyond kube 1.21 (#710)
Issue #667, adding updates to the disruptionbudget to support new
non beta spec beyond kube 1.21
2022-04-04 22:26:16 -07:00
gw0
4da0638f3e
Fix values schema to support config in YAML (#684) 2022-03-28 12:20:36 +01:00
Theron Voran
460b5e1b65
Update k8s versions (#706)
* tests: updating the four most recent k8s versions

* bump oldest version to 1.16

* docs, Chart.yaml, and changelog for 1.14 -> 1.16
2022-03-21 10:29:03 -07:00
Christopher Swenson
710915952e
VAULT-571 Matching documented behavior and consul (#703)
VAULT-571 Matching documented behavior and consul

Consul's helm template defaults most of the enabled to the special value
`"-"`, which means to inherit from global. This is what is implied
should happen in Vault as well according to the documentation for the
helm chart:

> [global.enabled] The master enabled/disabled configuration. If this is
> true, most components will be installed by default. If this is false,
> no components will be installed by default and manually opting-in is
> required, such as by setting server.enabled to true.

(https://www.vaultproject.io/docs/platform/k8s/helm/configuration#enabled)

We also simplified the chart logic using a few template helpers.

Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-03-21 09:50:23 -07:00
Remco Buddelmeijer
56a253ba97
Maintain pre-existing Mutating Webhook default values for Kubernetes 1.22 (#692)
* Prepare default values for MutatingWebhookConfiguration #691
* Add values.yaml values to injector-mutating-webhook.yaml #691
* Duplicate and deprecate top-level webhook settings and put them in a webhook object
* Made the new values default with the fallback to the old values.yaml
* Fix _helpers.tpl to support both old and new webhook annotations
* Add new tests and deprecate old ones for injector webhook configuration
* Old tests now work with old values.yaml
* Add all new fields showing that they have priority over old ones
* Add deprecation note to injector.failurePolicy #691
2022-03-18 14:15:43 +00:00
Viacheslav Vasilyev
549d9b87b2
allow to configure publishNotReadyAddresses on server services (#694) 2022-03-17 17:52:53 +00:00
Christian
f59f3d4b13
Add namespace to injector-leader-elector role, rolebinding and secret (#683) 2022-03-16 15:31:59 -07:00
Alvin Huang
a81a992b14
change helm trigger branch from master to main (#700) 2022-03-03 10:10:42 -08:00
Tom Proctor
4f5c01f50b
changelog++ (#699) 2022-03-02 16:45:11 +00:00
lion24
a7e56d8741
vault: bump image to 1.9.3 (#695)
Signed-off-by: Lionel H <me@nullbyte.be>
2022-03-01 17:30:07 -08:00
Tom Proctor
19b417cbaa
Fix unit test assertions (#693) 2022-02-25 19:01:04 +00:00
Troy Fluegge
b447a92bd7
Updated hashicorp/vault-csi-provider image to v1.0.0 (#689) 2022-02-25 12:29:30 +00:00
Michael Schuett
a2d9a0144f
Add extraLabels for CSI DaemonSet (#690) 2022-02-25 12:18:45 +00:00
Theron Voran
b0528fce49
Release 0.19.0 (#687) 2022-01-20 15:54:24 -08:00
Michele Baldessari
92da512577
allow injection of TLS config for OpenShift routes (#686)
* Add some tests on top of #396

* convert server-route.yaml to unix newlines

* changelog

Co-authored-by: André Becker <andre@arestless.com>
Co-authored-by: Theron Voran <tvoran@users.noreply.github.com>
2022-01-19 22:37:26 -08:00
Ethan J. Brown
e629dc9d65
Add volumes and env vars to helm hook test pod (#673)
* Fix test typo

* Add basic server-test Pod tests

 - This covers all existing functionality that matches what's
   present in server-statefulset.bats

* Fix server-test helm hook Pod rendering

 - Properly adhere to the global.enabled flag and the presence of
   the injector.externalVaultAddr setting, the same way that
   the servers StatefulSet behaves

* Add volumes and env vars to helm hook test pod

 - Uses the same extraEnvironmentVars, volumes and volumeMounts set on
   the server statefulset to configure the Vault server test pod used by
   the helm test hook
 - This is necessary in situations where TLS is configured, but the
   certificates are not affiliated with the k8s CA / part of k8s PKI

 - Fixes GH-665
2022-01-19 18:55:56 -08:00
Jacob Mammoliti
a84a61fdb6
add namespace support for openshift route (#679) 2022-01-14 15:19:22 -08:00
Theron Voran
d6e1cd0835
update CONTRIBUTING.md (#677)
Link to the discuss forum instead of the old google group and irc
channel. Add info about the CLA.
2022-01-12 10:12:19 -08:00
Theron Voran
0a1f8d1457
Disable unit and acceptance tests in CircleCI (#675) 2022-01-11 11:33:09 -08:00