-
Notifications
You must be signed in to change notification settings - Fork 881
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add clusterrolebinding, fix service, update Vault (#10)
* Add clusterrolebinding, fix service, update Vault * Change authDelegator to false by default * Clarify clusterIP comment
- Loading branch information
1 parent
bd02c9b
commit 0b8aacb
Showing
10 changed files
with
174 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,16 @@ | ||
## 0.1.0 | ||
## 0.1.1 (August 7th, 2019) | ||
|
||
Features: | ||
|
||
* Added `authDelegator` Cluster Role Binding to Vault service account for | ||
bootstrapping Kube auth method | ||
|
||
Improvements: | ||
|
||
* Added `server.service.clusterIP` to `values.yml` so users can toggle | ||
the Vault service to headless by using the value `None`. | ||
* Upgraded Vault to 1.2.1 | ||
|
||
## 0.1.0 (August 6th, 2019) | ||
|
||
Initial release |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{{ template "vault.mode" . }} | ||
{{- if and (ne .mode "") (and (eq (.Values.global.enabled | toString) "true") (eq (.Values.server.authDelegator.enabled | toString) "true")) }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: {{ template "vault.fullname" . }}-server-binding | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
helm.sh/chart: {{ include "vault.chart" . }} | ||
app.kubernetes.io/name: {{ include "vault.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
app.kubernetes.io/version: {{ .Chart.Version | quote }} | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: system:auth-delegator | ||
subjects: | ||
- kind: ServiceAccount | ||
name: {{ template "vault.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
{{ end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
#!/usr/bin/env bats | ||
|
||
load _helpers | ||
|
||
@test "server/ClusterRoleBinding: disabled by default" { | ||
cd `chart_dir` | ||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
--set 'server.dev.enabled=true' \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "false" ] | ||
|
||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
--set 'server.ha.enabled=true' \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "false" ] | ||
|
||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "false" ] | ||
} | ||
|
||
@test "server/ClusterRoleBinding: disable with global.enabled" { | ||
cd `chart_dir` | ||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
--set 'global.enabled=false' \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "false" ] | ||
} | ||
|
||
@test "server/ClusterRoleBinding: can enable with server.authDelegator" { | ||
cd `chart_dir` | ||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
--set 'server.authDelegator.enabled=true' \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "true" ] | ||
|
||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
--set 'server.authDelegator.enabled=true' \ | ||
--set 'server.ha.enabled=true' \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "true" ] | ||
|
||
local actual=$(helm template \ | ||
-x templates/server-clusterrolebinding.yaml \ | ||
--set 'server.authDelegator.enabled=true' \ | ||
--set 'server.dev.enabled=true' \ | ||
. | tee /dev/stderr | | ||
yq 'length > 0' | tee /dev/stderr) | ||
[ "${actual}" = "true" ] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters