add replica-support; disable leader-election by default

This commit is contained in:
Christian Kotzbauer 2021-11-17 11:04:30 +01:00
parent 4d55f6ad92
commit de89636de6
4 changed files with 7 additions and 2 deletions

View File

@ -1,7 +1,7 @@
apiVersion: v1
description: Kubernetes-Operator to simplify RBAC configurations
name: access-manager
version: 0.7.0
version: 0.7.1
appVersion: 0.7.0
home: https://github.com/ckotzbauer/access-manager
sources:

View File

@ -40,6 +40,7 @@ The following table lists the configurable parameters of the Access-Manager char
| Parameter | Description | Default |
| -------------------------------------- | ------------------------------------------------- | ------------------------------------- |
| `replicas` | replicas of deployment (leader-election only > 1) | `1` |
| `image.repository` | container image repository | `ghcr.io/ckotzbauer/access-manager` |
| `image.tag` | container image tag | `0.7.0` |
| `image.pullPolicy` | container image pull policy | `IfNotPresent` |

View File

@ -8,7 +8,7 @@ metadata:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
spec:
replicas: 1
replicas: {{ .Values.replicas }}
selector:
matchLabels:
app: {{ template "app.name" . }}
@ -28,8 +28,10 @@ spec:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
{{- if gt .Values.replicas 1.0 }}
args:
- --enable-leader-election
{{- end }}
securityContext:
{{ toYaml .Values.securityContext | indent 12 }}
resources:

View File

@ -2,6 +2,8 @@
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicas: 1
image:
repository: ghcr.io/ckotzbauer/access-manager
tag: 0.7.0