Skip to content

Commit e05b9ab

Browse files
committed
add extra volumes and rules
1 parent 7761a46 commit e05b9ab

File tree

7 files changed

+17
-4
lines changed

7 files changed

+17
-4
lines changed

charts/seashell/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: seashell
33
description: A tool that provides a shell to debug Kubernetes workloads
44
type: application
5-
version: 0.2.0
5+
version: 0.3.0
66
appVersion: 0.1
77
keywords:
88
- debug

charts/seashell/README.md

+3
Original file line numberDiff line numberDiff line change
@@ -31,11 +31,14 @@ helm install seashell puckpuck/seashell
3131
| `image.repository` | seashell Image repository | `puckpuck/seashell` |
3232
| `image.tag` | seashell Image tag (leave blank to use app version) | `nil` |
3333
| `image.pullPolicy` | seashell Image pull policy | `IfNotPresent` |
34+
| `extraVolumeMounts` | Additional volume mounts to add to the container | `[]` |
35+
| `extraVolumes` | Additional volumes to add to the pod | `[]` |
3436
| `serviceAccount.create` | Specify whether a ServiceAccount should be created | `true` |
3537
| `serviceAccount.annotations` | Annotations to be applied to ServiceAccount | `{}` |
3638
| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the `seashell.fullname` template |
3739
| `rbac.create` | Specify whether RBAC resources should be created and used | `true` |
3840
| `rbac.readAll` | Specify whether to include READ permssions on ALL Kubernetes resources | `false` |
41+
| `rbac.extraRules` | Additional rules to add to the ClusterRole | `[]` |
3942
| `podAnnotations` | Pod annotations | `{}` |
4043
| `podSecurityContext` | Security context for pod | `{}` |
4144
| `securityContext` | Security context for container | `{}` |

charts/seashell/templates/NOTES.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
seashell is installed. Start an interactive shell on any of the daemonset pods to use it.
2-
{{- if .Values.rbac.create }}
2+
{{- if .Values.rbac.readAll }}
33

44
*** WARNING ***
55

charts/seashell/templates/cluster-role-binding.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.rbac.create .Values.rbac.readAll }}
1+
{{- if and .Values.rbac.create }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRoleBinding
44
metadata:

charts/seashell/templates/cluster-role.yaml

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
{{- if and .Values.rbac.create .Values.rbac.readAll }}
1+
{{- if .Values.rbac.create }}
22
apiVersion: rbac.authorization.k8s.io/v1
33
kind: ClusterRole
44
metadata:
@@ -8,6 +8,7 @@ metadata:
88
annotations:
99
rbac.authorization.kubernetes.io/autoupdate: "true"
1010
rules:
11+
{{- if .Values.rbac.readAll }}
1112
- apiGroups:
1213
- "*"
1314
resources:
@@ -16,4 +17,6 @@ rules:
1617
- get
1718
- list
1819
- watch
20+
{{- end }}
21+
{{- toYaml .Values.rbac.extraRules | nindent 2 }}
1922
{{- end }}

charts/seashell/templates/daemonset.yaml

+2
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,12 @@ spec:
4343
- name: kubernetes
4444
mountPath: /etc/kubernetes
4545
readOnly: true
46+
{{- toYaml .Values.extraVolumeMounts | nindent 12}}
4647
volumes:
4748
- name: kubernetes
4849
hostPath:
4950
path: /etc/kubernetes
51+
{{- toYaml .Values.extraVolumes | nindent 8 }}
5052
{{- with .Values.nodeSelector }}
5153
nodeSelector:
5254
{{- toYaml . | nindent 8 }}

charts/seashell/values.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,9 @@ imagePullSecrets: [ ]
1212
nameOverride: ""
1313
fullnameOverride: ""
1414

15+
extraVolumeMounts: [ ]
16+
extraVolumes: [ ]
17+
1518
serviceAccount:
1619
# Specifies whether a service account should be created
1720
create: true
@@ -26,6 +29,8 @@ rbac:
2629
create: true
2730
# If set to true, a Role and RoleBinding with READ permissions on ALL objects will be created
2831
readAll: false
32+
# additional rules to add to the Role
33+
extraRules: [ ]
2934

3035
podAnnotations: { }
3136

0 commit comments

Comments
 (0)