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

feat(DATAGO-27002): Upgrade vault to version 1.7.9 #12

Merged
merged 71 commits into from
Jun 1, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
71 commits
Select commit Hold shift + click to select a range
690ee41
Add objectSelector to webhookconfiguration (#456)
guru1306 Feb 20, 2021
ff73577
changelog++
jasonodonnell Feb 20, 2021
4c1d79f
Add CSI secrets store provider (#461)
tomhjp Mar 19, 2021
3e36bb7
updating acceptance tests to k8s 1.17 on gke (#473)
tvoran Mar 24, 2021
2ddac08
changelog++
tomhjp Mar 24, 2021
102f9e4
Target vault-csi-provider release 0.1.0 (#475)
tomhjp Mar 25, 2021
f75b19f
Update to 0.10.0 (#477)
jasonodonnell Mar 25, 2021
7fd6959
Add volumes and mounts support for CSI (#479)
jasonodonnell Mar 25, 2021
703ba50
changelog++
jasonodonnell Mar 25, 2021
a685664
Remove extra word in readme (#482)
coignetp Mar 30, 2021
7a71c0f
fix csi helm deployment (#486)
ArieLevs Apr 6, 2021
b244573
changelog++
tomhjp Apr 7, 2021
a2a07b2
add hostNetwork value to injector deployment (#471)
paulwitt Apr 8, 2021
6e46bcf
changelog++
jasonodonnell Apr 8, 2021
bfbeba2
feat(ingress): Extra paths to prepend to the ingress host configurati…
samjmarshall Apr 8, 2021
ccebde9
changelog++
jasonodonnell Apr 8, 2021
ec67b5d
Add logLevel and logFormat values for Vault (#488)
jasonodonnell Apr 8, 2021
dc696bb
changelog++
jasonodonnell Apr 8, 2021
d8c2d20
Custom value of agent port (#489)
HamzaZo Apr 12, 2021
b838d4b
changelog++
jasonodonnell Apr 12, 2021
bf5783e
Add injector agent default overrides (#493)
jasonodonnell Apr 12, 2021
366cf23
changelog++
jasonodonnell Apr 12, 2021
088ce89
[injector] Add port name in injector service (#495)
javiercri Apr 13, 2021
f2e3d57
changelog++
jasonodonnell Apr 13, 2021
5f2e1d4
Fix injector unit test failing (#496)
jasonodonnell Apr 14, 2021
be1721f
Remove redundant logic (#434)
tomhjp Apr 14, 2021
2733859
Update to v0.11.0 (#497)
jasonodonnell Apr 14, 2021
dcb4b10
Add container based tests documentation (#492)
ArieLevs Apr 14, 2021
b59cbf6
Set kubeVersion and added chart-verifier tests (#510)
tvoran May 10, 2021
794a86a
changelog++
tvoran May 10, 2021
6e8ef40
match kubeVersion on semver pre-releases (#512)
tvoran May 11, 2021
92aed2c
Add ImagePullSecrets to CSI daemonset (#519)
mehmetsalgar May 12, 2021
f84fc7e
changelog++
tomhjp May 12, 2021
1505e77
changelog++
tomhjp May 12, 2021
2a70a9f
fix CONTRIBUTING.md (#501)
ArieLevs May 12, 2021
f226051
updating to use new dedicated context and token (#515)
sarahethompson May 13, 2021
ed38f6d
added values json schema (#513)
tvoran May 14, 2021
e817b1d
changelog++
tvoran May 14, 2021
0ab15df
[Issue-520] tolerations for csi-daemonset (#521)
mehmetsalgar May 18, 2021
dbd99b1
changelog++
tvoran May 18, 2021
030d3cd
Add extraArgs value for CSI (#526)
tomhjp May 21, 2021
23ff8a1
changelog++
tomhjp May 21, 2021
e206fad
add schema unit tests (#530)
tvoran May 25, 2021
4c71c26
Add UI targetPort option (#437)
inigohu May 25, 2021
d53b011
changelog++
jasonodonnell May 25, 2021
b21b37b
Update to v0.12.0 (#532)
jasonodonnell May 25, 2021
3593739
Adding helm test for vault server (#531)
tvoran May 28, 2021
3afcb46
changelog++
tvoran May 28, 2021
af25981
fix ui.serviceNodePort schema (#537)
tvoran Jun 1, 2021
828b312
changelog++
tvoran Jun 1, 2021
4588760
change maxUnavailable to integer (#535)
rule88 Jun 1, 2021
ad9a46a
changelog++
tvoran Jun 1, 2021
637087f
use vault-helm-test:0.2.0 (#543)
tvoran Jun 2, 2021
d27121c
Added webhook-certs volume mount to sidecar injector (#545)
Jun 10, 2021
bb63d73
changelog++
tvoran Jun 10, 2021
4d23074
Adding server.enterpriseLicense (#547)
tvoran Jun 11, 2021
3a6e097
changelog++
tvoran Jun 11, 2021
0f832e0
Add openshift overrides (#549)
tvoran Jun 16, 2021
7509bc7
changelog++
tvoran Jun 16, 2021
f67b844
Update to v0.13.0 (#554)
tvoran Jun 17, 2021
e08ffef
Explain this fork in the README
j-setiawan Apr 2, 2020
5ce26d8
Adding support for LoadBalancerIP field in ServiceSpec
Apr 10, 2020
4104066
DATAGO-13861: Adding support for logrotate
hadielaham88 May 19, 2021
2d56a25
DATAGO-13861: Adding audit log rotation and shipment to datdog
hadielaham88 May 26, 2021
919ccb4
Fixing minor typos and removing extra lines
hadielaham88 May 26, 2021
efd1de6
DATAGO-13861: Adding support for logrotate
hadielaham88 May 19, 2021
1e3b002
DATAGO-13861: Adding audit log rotation and shipment to datdog
hadielaham88 May 26, 2021
48c9d8c
Fixing minor typos and removing extra lines
hadielaham88 May 26, 2021
e0f3274
feat(DATAGO-27002): Upgrade to 1.7.9
nagsubhrajitt May 31, 2022
b93affc
Merge branch 'develop' into DATAGO-27002/upgrading-vault-to-1.7.9
nagsubhrajitt Jun 1, 2022
de39d83
chore(DATAGO-27002): Fix doc issue
nagsubhrajitt Jun 1, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,36 @@ jobs:
bats-unit-test:
docker:
# This image is built from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/vault-helm-test:0.1.0
- image: docker.mirror.hashicorp.services/hashicorpdev/vault-helm-test:0.2.0
steps:
- checkout
- run: bats ./test/unit -t

chart-verifier:
docker:
- image: docker.mirror.hashicorp.services/cimg/go:1.16
environment:
BATS_VERSION: "1.3.0"
CHART_VERIFIER_VERSION: "1.0.0"
steps:
- checkout
- run:
name: install chart-verifier
command: go get github.com/redhat-certification/chart-verifier@${CHART_VERIFIER_VERSION}
- run:
name: install bats
command: |
curl -sSL https://github.com/bats-core/bats-core/archive/v${BATS_VERSION}.tar.gz -o /tmp/bats.tgz
tar -zxf /tmp/bats.tgz -C /tmp
sudo /bin/bash /tmp/bats-core-${BATS_VERSION}/install.sh /usr/local
- run:
name: run chart-verifier tests
command: bats ./test/chart -t

acceptance:
docker:
# This image is build from test/docker/Test.dockerfile
- image: docker.mirror.hashicorp.services/hashicorpdev/vault-helm-test:0.1.0
- image: docker.mirror.hashicorp.services/hashicorpdev/vault-helm-test:0.2.0

steps:
- checkout
Expand Down Expand Up @@ -66,6 +88,7 @@ workflows:
build_and_test:
jobs:
- bats-unit-test
- chart-verifier
- acceptance:
requires:
- bats-unit-test
Expand All @@ -75,7 +98,7 @@ workflows:
update-helm-charts-index:
jobs:
- update-helm-charts-index:
context: helm-charts-trigger
context: helm-charts-trigger-vault
filters:
tags:
only: /^v.*/
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,55 @@
## Unreleased

## 0.13.0 (June 17th, 2021)

Improvements:
* Added a helm test for vault server [GH-531](https://github.com/hashicorp/vault-helm/pull/531)
* Added server.enterpriseLicense option [GH-547](https://github.com/hashicorp/vault-helm/pull/547)
* Added OpenShift overrides [GH-549](https://github.com/hashicorp/vault-helm/pull/549)

Bugs:
* Fix ui.serviceNodePort schema [GH-537](https://github.com/hashicorp/vault-helm/pull/537)
* Fix server.ha.disruptionBudget.maxUnavailable schema [GH-535](https://github.com/hashicorp/vault-helm/pull/535)
* Added webhook-certs volume mount to sidecar injector [GH-545](https://github.com/hashicorp/vault-helm/pull/545)

## 0.12.0 (May 25th, 2021)

Features:
* Pass additional arguments to `vault-csi-provider` using `csi.extraArgs` [GH-526](https://github.com/hashicorp/vault-helm/pull/526)

Improvements:
* Set chart kubeVersion and added chart-verifier tests [GH-510](https://github.com/hashicorp/vault-helm/pull/510)
* Added values json schema [GH-513](https://github.com/hashicorp/vault-helm/pull/513)
* Ability to set tolerations for CSI daemonset pods [GH-521](https://github.com/hashicorp/vault-helm/pull/521)
* UI target port is now configurable [GH-437](https://github.com/hashicorp/vault-helm/pull/437)

Bugs:
* CSI: `global.imagePullSecrets` are now also used for CSI daemonset [GH-519](https://github.com/hashicorp/vault-helm/pull/519)

## 0.11.0 (April 14th, 2021)

Features:
* Added `server.enabled` to explicitly skip installing a Vault server [GH-486](https://github.com/hashicorp/vault-helm/pull/486)
* Injector now supports enabling host network [GH-471](https://github.com/hashicorp/vault-helm/pull/471)
* Injector port is now configurable [GH-489](https://github.com/hashicorp/vault-helm/pull/489)
* Injector Vault Agent resource defaults are now configurable [GH-493](https://github.com/hashicorp/vault-helm/pull/493)
* Extra paths can now be added to the Vault ingress service [GH-460](https://github.com/hashicorp/vault-helm/pull/460)
* Log level and format can now be set directly using `server.logFormat` and `server.logLevel` [GH-488](https://github.com/hashicorp/vault-helm/pull/488)

Improvements:
* Added `https` name to injector service port [GH-495](https://github.com/hashicorp/vault-helm/pull/495)

Bugs:
* CSI: Fix ClusterRole name and DaemonSet's service account to properly match deployment name [GH-486](https://github.com/hashicorp/vault-helm/pull/486)

## 0.10.0 (March 25th, 2021)

Features:
* Add support for [Vault CSI provider](https://github.com/hashicorp/vault-csi-provider) [GH-461](https://github.com/hashicorp/vault-helm/pull/461)

Improvements:
* `objectSelector` can now be set on the mutating admission webhook [GH-456](https://github.com/hashicorp/vault-helm/pull/456)

## 0.9.1 (February 2nd, 2021)

Bugs:
Expand Down
34 changes: 32 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,37 @@ The unit tests don't require any active Kubernetes cluster and complete
very quickly. These should be used for fast feedback during development.
The acceptance tests require a Kubernetes cluster with a configured `kubectl`.

### Prequisites
### Test Using Docker Container

The following are the instructions for running bats tests using a Docker container.

#### Prerequisites

* Docker installed
* `vault-helm` checked out locally

#### Test

**Note:** the following commands should be run from the `vault-helm` directory.

First, build the Docker image for running the tests:

```shell
docker build -f ${PWD}/test/docker/Test.dockerfile ${PWD}/test/docker/ -t vault-helm-test
```
Next, execute the tests with the following commands:
```shell
docker run -it --rm -v "${PWD}:/test" vault-helm-test bats /test/test/unit
```
It's possible to only run specific bats tests using regular expressions.
For example, the following will run only tests with "injector" in the name:
```shell
docker run -it --rm -v "${PWD}:/test" vault-helm-test bats /test/test/unit -f "injector"
```

### Test Manually
The following are the instructions for running bats tests on your workstation.
#### Prerequisites
* [Bats](https://github.com/bats-core/bats-core)
```bash
brew install bats-core
Expand All @@ -76,7 +106,7 @@ The acceptance tests require a Kubernetes cluster with a configured `kubectl`.
brew install kubernetes-helm
```

### Running The Tests
#### Test

To run the unit tests:

Expand Down
6 changes: 4 additions & 2 deletions Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v2
name: vault
version: 0.9.1
appVersion: 1.6.2
version: 0.13.0
appVersion: 1.7.3
kubeVersion: ">= 1.14.0-0"
description: Official HashiCorp Vault Chart
home: https://www.vaultproject.io
icon: https://github.com/hashicorp/vault/raw/f22d202cde2018f9455dec755118a9b84586e082/Vault_PrimaryLogo_Black.png
Expand All @@ -10,3 +11,4 @@ sources:
- https://github.com/hashicorp/vault
- https://github.com/hashicorp/vault-helm
- https://github.com/hashicorp/vault-k8s
- https://github.com/hashicorp/vault-csi-provider
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ CLOUDSDK_CORE_PROJECT?=vault-helm-dev-246514
# set to run a single test - e.g acceptance/server-ha-enterprise-dr.bats
ACCEPTANCE_TESTS?=acceptance

# Generate json schema for chart values. See test/README.md for more details.
values-schema:
helm schema-gen values.yaml > values.schema.json

test-image:
@docker build --rm -t $(TEST_IMAGE) -f $(CURDIR)/test/docker/Test.dockerfile $(CURDIR)

Expand Down Expand Up @@ -62,4 +66,4 @@ provision-cluster:
destroy-cluster:
terraform destroy -auto-approve

.PHONY: test-image test-unit test-bats test test-acceptance test-destroy test-provision acceptance provision-cluster destroy-cluster
.PHONY: values-schema test-image test-unit test-bats test test-acceptance test-destroy test-provision acceptance provision-cluster destroy-cluster
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ use Vault with Kubernetes, please see the
## Prerequisites

To use the charts here, [Helm](https://helm.sh/) must be configured for your
Kubernetes cluster. Setting up Kubernetes and Helm and is outside the scope of
Kubernetes cluster. Setting up Kubernetes and Helm is outside the scope of
this README. Please refer to the Kubernetes and Helm documentation.

The versions required are:

* **Helm 3.0+** - This is the earliest version of Helm tested. It is possible
it works with earlier versions but this chart is untested for those versions.
* **Kubernetes 1.9+** - This is the earliest version of Kubernetes tested.
* **Kubernetes 1.14+** - This is the earliest version of Kubernetes tested.
It is possible that this chart works with earlier versions but it is
untested. Other versions verified are Kubernetes 1.10, 1.11.
untested.

## Usage

Expand All @@ -48,6 +48,7 @@ fully documented directly on the [Vault
website](https://www.vaultproject.io/docs/platform/k8s/helm) along with more
detailed installation instructions.


## Customizations

This Helm chart has been customized in the following ways:
Expand Down
78 changes: 78 additions & 0 deletions templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@ template logic.
{{- define "vault.mode" -}}
{{- if .Values.injector.externalVaultAddr -}}
{{- $_ := set . "mode" "external" -}}
{{- else if ne (.Values.server.enabled | toString) "true" -}}
{{- $_ := set . "mode" "external" -}}
{{- else if eq (.Values.server.dev.enabled | toString) "true" -}}
{{- $_ := set . "mode" "dev" -}}
{{- else if eq (.Values.server.ha.enabled | toString) "true" -}}
Expand Down Expand Up @@ -109,6 +111,12 @@ extra volumes the user may have specified (such as a secret with TLS).
{{- if .Values.server.volumes }}
{{- toYaml .Values.server.volumes | nindent 8}}
{{- end }}
{{- if (and .Values.server.enterpriseLicense.secretName .Values.server.enterpriseLicense.secretKey) }}
- name: vault-license
secret:
secretName: {{ .Values.server.enterpriseLicense.secretName }}
defaultMode: 0440
{{- end }}
{{- end -}}

{{/*
Expand Down Expand Up @@ -172,6 +180,11 @@ based on the mode configured.
{{- if .Values.server.volumeMounts }}
{{- toYaml .Values.server.volumeMounts | nindent 12}}
{{- end }}
{{- if (and .Values.server.enterpriseLicense.secretName .Values.server.enterpriseLicense.secretKey) }}
- name: vault-license
mountPath: /vault/license
readOnly: true
{{- end }}
{{- end -}}

{{/*
Expand Down Expand Up @@ -483,6 +496,71 @@ Sets the container resources if the user has set any.
{{ end }}
{{- end -}}

{{/*
Sets the container resources if the user has set any.
*/}}
{{- define "csi.resources" -}}
{{- if .Values.csi.resources -}}
resources:
{{ toYaml .Values.csi.resources | indent 12}}
{{ end }}
{{- end -}}

{{/*
Sets extra CSI daemonset annotations
*/}}
{{- define "csi.daemonSet.annotations" -}}
{{- if .Values.csi.daemonSet.annotations }}
annotations:
{{- $tp := typeOf .Values.csi.daemonSet.annotations }}
{{- if eq $tp "string" }}
{{- tpl .Values.csi.daemonSet.annotations . | nindent 4 }}
{{- else }}
{{- toYaml .Values.csi.daemonSet.annotations | nindent 4 }}
{{- end }}
{{- end }}
{{- end -}}

{{/*
Sets the injector toleration for pod placement
*/}}
{{- define "csi.pod.tolerations" -}}
{{- if .Values.csi.pod.tolerations }}
tolerations:
{{ tpl .Values.csi.pod.tolerations . | nindent 8 | trim }}
{{- end }}
{{- end -}}

{{/*
Sets extra CSI provider pod annotations
*/}}
{{- define "csi.pod.annotations" -}}
{{- if .Values.csi.pod.annotations }}
annotations:
{{- $tp := typeOf .Values.csi.pod.annotations }}
{{- if eq $tp "string" }}
{{- tpl .Values.csi.pod.annotations . | nindent 8 }}
{{- else }}
{{- toYaml .Values.csi.pod.annotations | nindent 8 }}
{{- end }}
{{- end }}
{{- end -}}

{{/*
Sets extra CSI service account annotations
*/}}
{{- define "csi.serviceAccount.annotations" -}}
{{- if .Values.csi.serviceAccount.annotations }}
annotations:
{{- $tp := typeOf .Values.csi.serviceAccount.annotations }}
{{- if eq $tp "string" }}
{{- tpl .Values.csi.serviceAccount.annotations . | nindent 4 }}
{{- else }}
{{- toYaml .Values.csi.serviceAccount.annotations | nindent 4 }}
{{- end }}
{{- end }}
{{- end -}}

{{/*
Inject extra environment vars in the format key:value, if populated
*/}}
Expand Down
17 changes: 17 additions & 0 deletions templates/csi-clusterrole.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- if and (eq (.Values.csi.enabled | toString) "true" ) (eq (.Values.global.enabled | toString) "true") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ template "vault.fullname" . }}-csi-provider-clusterrole
labels:
app.kubernetes.io/name: {{ include "vault.name" . }}-csi-provider
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
rules:
- apiGroups:
- ""
resources:
- serviceaccounts/token
verbs:
- create
{{- end }}
18 changes: 18 additions & 0 deletions templates/csi-clusterrolebinding.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{{- if and (eq (.Values.csi.enabled | toString) "true" ) (eq (.Values.global.enabled | toString) "true") }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ template "vault.fullname" . }}-csi-provider-clusterrolebinding
labels:
app.kubernetes.io/name: {{ include "vault.name" . }}-csi-provider
app.kubernetes.io/instance: {{ .Release.Name }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ template "vault.fullname" . }}-csi-provider-clusterrole
subjects:
- kind: ServiceAccount
name: {{ template "vault.fullname" . }}-csi-provider
namespace: {{ .Release.Namespace }}
{{- end }}
Loading