Skip to content

Commit

Permalink
add extra volumes and rules
Browse files Browse the repository at this point in the history
  • Loading branch information
puckpuck committed Nov 1, 2022
1 parent 7761a46 commit e05b9ab
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion charts/seashell/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v2
name: seashell
description: A tool that provides a shell to debug Kubernetes workloads
type: application
version: 0.2.0
version: 0.3.0
appVersion: 0.1
keywords:
- debug
Expand Down
3 changes: 3 additions & 0 deletions charts/seashell/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ helm install seashell puckpuck/seashell
| `image.repository` | seashell Image repository | `puckpuck/seashell` |
| `image.tag` | seashell Image tag (leave blank to use app version) | `nil` |
| `image.pullPolicy` | seashell Image pull policy | `IfNotPresent` |
| `extraVolumeMounts` | Additional volume mounts to add to the container | `[]` |
| `extraVolumes` | Additional volumes to add to the pod | `[]` |
| `serviceAccount.create` | Specify whether a ServiceAccount should be created | `true` |
| `serviceAccount.annotations` | Annotations to be applied to ServiceAccount | `{}` |
| `serviceAccount.name` | The name of the ServiceAccount to create | Generated using the `seashell.fullname` template |
| `rbac.create` | Specify whether RBAC resources should be created and used | `true` |
| `rbac.readAll` | Specify whether to include READ permssions on ALL Kubernetes resources | `false` |
| `rbac.extraRules` | Additional rules to add to the ClusterRole | `[]` |
| `podAnnotations` | Pod annotations | `{}` |
| `podSecurityContext` | Security context for pod | `{}` |
| `securityContext` | Security context for container | `{}` |
Expand Down
2 changes: 1 addition & 1 deletion charts/seashell/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
seashell is installed. Start an interactive shell on any of the daemonset pods to use it.
{{- if .Values.rbac.create }}
{{- if .Values.rbac.readAll }}

*** WARNING ***

Expand Down
2 changes: 1 addition & 1 deletion charts/seashell/templates/cluster-role-binding.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.rbac.create .Values.rbac.readAll }}
{{- if and .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
Expand Down
5 changes: 4 additions & 1 deletion charts/seashell/templates/cluster-role.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if and .Values.rbac.create .Values.rbac.readAll }}
{{- if .Values.rbac.create }}
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
Expand All @@ -8,6 +8,7 @@ metadata:
annotations:
rbac.authorization.kubernetes.io/autoupdate: "true"
rules:
{{- if .Values.rbac.readAll }}
- apiGroups:
- "*"
resources:
Expand All @@ -16,4 +17,6 @@ rules:
- get
- list
- watch
{{- end }}
{{- toYaml .Values.rbac.extraRules | nindent 2 }}
{{- end }}
2 changes: 2 additions & 0 deletions charts/seashell/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,10 +43,12 @@ spec:
- name: kubernetes
mountPath: /etc/kubernetes
readOnly: true
{{- toYaml .Values.extraVolumeMounts | nindent 12}}
volumes:
- name: kubernetes
hostPath:
path: /etc/kubernetes
{{- toYaml .Values.extraVolumes | nindent 8 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
Expand Down
5 changes: 5 additions & 0 deletions charts/seashell/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ imagePullSecrets: [ ]
nameOverride: ""
fullnameOverride: ""

extraVolumeMounts: [ ]
extraVolumes: [ ]

serviceAccount:
# Specifies whether a service account should be created
create: true
Expand All @@ -26,6 +29,8 @@ rbac:
create: true
# If set to true, a Role and RoleBinding with READ permissions on ALL objects will be created
readAll: false
# additional rules to add to the Role
extraRules: [ ]

podAnnotations: { }

Expand Down

0 comments on commit e05b9ab

Please sign in to comment.