Commit graph

260 commits

Author SHA1 Message Date
Arend Lapere
377b68f13b
Add support for dual stack clusters (#833) 2023-08-24 15:14:19 -07:00
Marco Lecheler
ea1c36922b
chore(test): use vault.fullname in Helm test (#912) 2023-08-23 11:30:35 -07:00
gillcaleb
1e12d49d74
Add optional long lived SA token (#923)
---------

Co-authored-by: Caleb Gill <cgill@stavvy.com>
2023-08-17 14:05:50 +01:00
Johannes Siebel
ec964a33ea
Allow scale to zero (#943) 2023-08-15 10:50:25 +01:00
KhizerJaan
9a16496e86
Allows the release namespace to be overridden (#909) 2023-07-04 14:30:35 +01:00
Tom Proctor
e2711a2002
Prepare for 0.25.0 release (#916)
* Prepare for 0.25.0 release
* Update CSI acceptance test assertion

Starting in 1.4.0, the CSI provider caches Vault tokens locally. The main thing
we want to check is that the Agent cache is being used so that it's doing the
renewal legwork for any leased secrets, so check for the renewal log message instead
because CSI won't auth over and over anymore.
2023-06-26 16:00:04 +01:00
Theron Voran
cd30d9890a
csi: update affinity and nodeselector schema (#907)
array -> object
2023-06-06 22:51:14 -07:00
Toninh0
3ce721fca4
CSI configurable nodeSelector and affinity (#862) 2023-06-01 10:38:22 +01:00
Tom Proctor
da34c6c986
publishNotReadyAddresses for headless service always true (#902) 2023-05-30 15:54:00 +01:00
risson
a276600b71
Default prometheusRules.rules should be an empty list (#886)
Support for prometheus-operator was added in
https://github.com/hashicorp/vault-helm/pull/772 and a default empty
set of rules was defined as an empty map `{}`. However, as evidenced
by the commented out rule examples below that very same values.yaml,
this is expected to be a list, so `rules:` value should be set to an
empty list `[]`.

Co-authored-by: Marc 'risson' Schmitt <marc.schmitt@risson.space>
Co-authored-by: Vitaliy <vitaliyf@users.noreply.github.com>
2023-05-17 22:01:22 -07:00
Krishnadas M
b9096ee15b
Make injected Agent ephemeral storage configurable through injector.agentDefaults (#798) 2023-05-17 13:59:05 +01:00
Tom Proctor
9954df5e68
Add role for creating CSI's HMAC secret key (#872) 2023-04-14 13:31:41 +01:00
Christopher Swenson
d52c4a519d
Prepare for 0.24.0 release (#868) 2023-04-06 15:38:23 -07:00
Tom Proctor
0fe916481c
Add Vault Agent sidecar to CSI Provider (#749)
Adds Agent as a sidecar for the CSI Provider to:

* Cache k8s auth login leases
* Cache secret leases
* Automatically renew renewable leases in the background
2023-04-06 19:45:10 +01:00
Kyle Schochenmaier
fc7d4326fc
Add changelog for #831 (#867)
* Add changelog for #831
* fixes bats test
2023-04-04 10:21:42 -05:00
Bhargav Akhani
9f189801a6
Add portnumber (#831)
* Add configurable Port Number in readinessProbe and livenessProbe for the server-statefulset. 
Co-authored-by: Kyle Schochenmaier <kyle.schochenmaier@hashicorp.com>
2023-04-04 09:17:24 -05:00
Theron Voran
2c4cd3a3c3
Updating GHA and default Vault version (#863)
Test with latest kind k8s versions 1.22-1.26. Remove support for old
disruptionbudget and ingress APIs (pre 1.22).

Pin all actions to SHAs, and use the common jira sync.

Update the default Vault version to v1.13.1.

Update chart-verifier used in tests to 1.10.1, also add an openshift
name annotation to Chart.yaml (one of the required checks).
2023-04-03 16:44:13 -07:00
Thy Ton
932891778f
feat: make injector livenessProbe and readinessProbe configurable and add configurable startupProbe (#852) 2023-03-16 12:03:27 -07:00
Thy Ton
f4f05aaa74
fix: remove k8s 1.16 from acceptance testing (#848)
* remove 1.16 from the versions tested in .github/workflows/acceptance.yaml as kind no longer supports creating a k8s 1.16 cluster
* update vault-helm's minimum support k8s version to 1.20 in README and Chart.yaml
* refactor server-ingress's templating and unit tests applied to k8s versions < 1.20
2023-02-27 12:04:17 -08:00
Dimitar Zafirov
e31e70ea0b
Add extraPorts property (#841) 2023-02-16 10:49:07 -08:00
jordanfelle
34d8650cca
Fix typo in telemetry example (#846)
Also in the telemetry test
2023-02-16 09:07:41 -08:00
Theron Voran
742ddb1c52
adding SPDX copyright headers (#844) 2023-02-13 08:48:20 -08:00
Tom Proctor
2d7fd5d565
Prepare for 0.23.0 release (#814) 2022-11-28 23:33:08 +00:00
Tom Proctor
c13151a6ac
server: Allow disabling the instance selector for services (#813) 2022-11-17 19:54:18 +00:00
Tom Proctor
21ce5245a3
Support selectively disabling active/standby services and service discovery role (#811) 2022-11-14 14:10:21 +00:00
Steven Kriegler
0110f977b2
Quote .server.ha.clusterAddr value (#810) 2022-11-09 14:19:38 -08:00
Aleksandr Titov
ab5b471c27
Add extraLabels for Vault server serviceAccount (#806) 2022-11-02 18:01:35 -07:00
Tom Proctor
5d7014c7bb
Prepare to release to 0.22.1 (#803)
* Prepare to release to 0.22.1

* Revert chart verifier update for now

* Remove unused jobs from CircleCI config
2022-10-26 20:32:46 +01:00
Tom Proctor
7e21a09ebd
Add server.hostNetwork option (#775) 2022-09-12 15:17:24 +01:00
Christopher Swenson
c15d83e397
Prepare for 0.22.0 release (#785)
Prepare for 0.21.1 release

* Update Vault to 1.11.3
2022-09-08 11:59:17 -07:00
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
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
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
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
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
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
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
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
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
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