Skip to content

Commit

Permalink
Merge pull request #160 from usimd/main
Browse files Browse the repository at this point in the history
Add service account token secret
I ran some tests last recently against IKS/ROKS > 1.24 and it ran fine without this change so lets keep it as is for now and we can apply the updates as folks in other environments update.
  • Loading branch information
No9 authored May 1, 2024
2 parents 6bb4ca8 + ff16805 commit b8ea795
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions charts/core-dump-handler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,3 +326,7 @@ Daemonset
* envFrom: Array of [EnvFromSource](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#envfromsource-v1-core) to inject into main container.
* sidecarContainers: Array of [Container](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#container-v1-core) to define as part of the pod.
* updateStrategy: [DaemonsetUpdateStrategy](https://kubernetes.io/docs/reference/generated/kubernetes-api/v1.25/#daemonsetupdatestrategy-v1-apps) is a struct used to control the update strategy for the DaemonSet.
Service account:
* useToken: automatically create a service account token secret
* tokenSecretName: name of the service account token secret to create if `serviceAccount.useToken` is `true` (Default: "core-dump-service-account-token")
9 changes: 9 additions & 0 deletions charts/core-dump-handler/templates/sa-token-secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if .Values.serviceAccount.useToken }}
apiVersion: v1
kind: Secret
metadata:
name: {{ default "core-dump-service-account-token" .Values.serviceAccount.tokenSecretName }}
annotations:
kubernetes.io/service-account.name: {{ include "core-dump-handler.serviceAccountName" . }}
type: kubernetes.io/service-account-token
{{- end }}
3 changes: 3 additions & 0 deletions charts/core-dump-handler/values.aws.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,6 @@
daemonset:
includeCrioExe: true
vendor: rhel7 # EKS EC2 images have an old libc=2.26

serviceAccount:
useToken: true
2 changes: 2 additions & 0 deletions charts/core-dump-handler/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ serviceAccount:
name: "core-dump-admin"
# annotations:
# eks.amazonaws.com/role-arn: arn:aws:iam::123456789000:role/iam-role-name-here
useToken: false
tokenSecretName: core-dump-service-account-token

# OpenShift specific for SecurityContextConstraints
scc:
Expand Down

0 comments on commit b8ea795

Please sign in to comment.