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 apiVersion: v1
description: Kubernetes-Operator to simplify RBAC configurations description: Kubernetes-Operator to simplify RBAC configurations
name: access-manager name: access-manager
version: 0.7.0 version: 0.7.1
appVersion: 0.7.0 appVersion: 0.7.0
home: https://github.com/ckotzbauer/access-manager home: https://github.com/ckotzbauer/access-manager
sources: sources:

View File

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

View File

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

View File

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