Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: updated sa helper definition & rbac erigon #138

Merged
merged 2 commits into from Sep 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion charts/erigon/Chart.yaml
Expand Up @@ -15,7 +15,7 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.8.1
version: 0.8.2

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
Expand Down
2 changes: 1 addition & 1 deletion charts/erigon/README.md
Expand Up @@ -2,7 +2,7 @@

Deploy and scale [Erigon](https://github.com/ledgerwatch/erigon) inside Kubernetes with ease

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.8.1](https://img.shields.io/badge/Version-0.8.1-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.49.1](https://img.shields.io/badge/AppVersion-v2.49.1-informational?style=flat-square)
[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0) ![Version: 0.8.2](https://img.shields.io/badge/Version-0.8.2-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: v2.49.1](https://img.shields.io/badge/AppVersion-v2.49.1-informational?style=flat-square)

## Features

Expand Down
2 changes: 1 addition & 1 deletion charts/erigon/templates/_helpers.tpl
Expand Up @@ -59,7 +59,7 @@ Create the name of the service account to use
*/}}
{{- define "erigon.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "erigon.fullname" .) .Values.serviceAccount.name }}
{{- default (printf "%s-%s" (include "erigon.fullname" .) .Release.Namespace) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
Expand Down
12 changes: 6 additions & 6 deletions charts/erigon/templates/rbac.yaml
Expand Up @@ -3,7 +3,7 @@
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}
name: {{ include "erigon.serviceAccountName" . }}
labels:
{{- include "erigon.labels" . | nindent 4 }}
rules:
Expand All @@ -12,21 +12,21 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}
name: {{ include "erigon.serviceAccountName" . }}
labels:
{{- include "erigon.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: {{ .Release.Name }}-{{ .Release.Namespace }}
name: {{ include "erigon.serviceAccountName" . }}
subjects:
- kind: ServiceAccount
name: {{ include "erigon.serviceAccountName" . }}
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}
name: {{ include "erigon.serviceAccountName" . }}
labels:
{{- include "erigon.labels" . | nindent 4 }}
rules:
Expand All @@ -35,13 +35,13 @@ rules:
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: {{ .Release.Name }}-{{ .Release.Namespace }}
name: {{ include "erigon.serviceAccountName" . }}
labels:
{{- include "erigon.labels" . | nindent 4 }}
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: {{ .Release.Name }}-{{ .Release.Namespace }}
name: {{ include "erigon.serviceAccountName" . }}
subjects:
- kind: ServiceAccount
name: {{ include "erigon.serviceAccountName" . }}
Expand Down