forked from helm/charts
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[stable/kubernetes-dashboard] Harden Kubernetes Dashboard security se…
…tup to protect whole cluster (helm#3935) * Updated helm chart for Kubernetes Dashboard to harden cluster security * Fixed typo * Modified to be in line with RBAC guidlines * Add link to guide * Fixed typo
- Loading branch information
1 parent
2da0250
commit 61a6aed
Showing
12 changed files
with
211 additions
and
50 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
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
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,72 @@ | ||
{{- if and .Values.rbac.create (not .Values.rbac.clusterAdminRole) }} | ||
apiVersion: rbac.authorization.k8s.io/v1beta1 | ||
kind: Role | ||
metadata: | ||
labels: | ||
app: {{ template "kubernetes-dashboard.name" . }} | ||
chart: {{ template "kubernetes-dashboard.chart" . }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
name: {{ template "kubernetes-dashboard.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
rules: | ||
# Allow Dashboard to create 'kubernetes-dashboard-key-holder' secret. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
verbs: | ||
- create | ||
|
||
# Allow Dashboard to create 'kubernetes-dashboard-settings' config map. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
verbs: | ||
- create | ||
|
||
# Allow Dashboard to get, update and delete Dashboard exclusive secrets. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- secrets | ||
resourceNames: | ||
- kubernetes-dashboard-key-holder | ||
- {{ template "kubernetes-dashboard.fullname" . }} | ||
verbs: | ||
- get | ||
- update | ||
- delete | ||
|
||
# Allow Dashboard to get and update 'kubernetes-dashboard-settings' config map. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- configmaps | ||
resourceNames: | ||
- kubernetes-dashboard-settings | ||
verbs: | ||
- get | ||
- update | ||
|
||
# Allow Dashboard to get metrics from heapster. | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- services | ||
resourceNames: | ||
- heapster | ||
verbs: | ||
- proxy | ||
- apiGroups: | ||
- "" | ||
resources: | ||
- services/proxy | ||
resourceNames: | ||
- heapster | ||
- "http:heapster:" | ||
- "https:heapster:" | ||
verbs: | ||
- get | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
labels: | ||
app: {{ template "kubernetes-dashboard.name" . }} | ||
chart: {{ template "kubernetes-dashboard.chart" . }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
name: {{ template "kubernetes-dashboard.fullname" . }} | ||
namespace: {{ .Release.Namespace }} | ||
type: Opaque |
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,11 +1,12 @@ | ||
{{- if .Values.rbac.create }} | ||
{{- if .Values.serviceAccount.create -}} | ||
apiVersion: v1 | ||
kind: ServiceAccount | ||
metadata: | ||
labels: | ||
app: {{ template "kubernetes-dashboard.name" . }} | ||
chart: {{ .Chart.Name }}-{{ .Chart.Version | replace "+" "_" }} | ||
chart: {{ template "kubernetes-dashboard.chart" . }} | ||
heritage: {{ .Release.Service }} | ||
release: {{ .Release.Name }} | ||
name: {{ template "kubernetes-dashboard.fullname" . }} | ||
name: {{ template "kubernetes-dashboard.serviceAccountName" . }} | ||
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
Oops, something went wrong.