-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from it-at-m/refactor-helm-chart-ldap-sync
refactoring chart zammad-ldap-sync
- Loading branch information
Showing
5 changed files
with
106 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
apiVersion: v2 | ||
name: zammad-ldap-sync | ||
version: 0.4.1 | ||
version: 0.5.0 | ||
maintainers: | ||
- name: klml | ||
email: [email protected] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
{{/* | ||
Expand the name of the chart. | ||
*/}} | ||
{{- define "zammad-ldap-sync.name" -}} | ||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create a default fully qualified app name. | ||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). | ||
If release name contains chart name it will be used as a full name. | ||
*/}} | ||
{{- define "zammad-ldap-sync.fullname" -}} | ||
{{- if .Values.fullnameOverride }} | ||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- $name := default .Chart.Name .Values.nameOverride }} | ||
{{- if contains $name .Release.Name }} | ||
{{- .Release.Name | trunc 63 | trimSuffix "-" }} | ||
{{- else }} | ||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
{{- end }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create chart name and version as used by the chart label. | ||
*/}} | ||
{{- define "zammad-ldap-sync.chart" -}} | ||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||
{{- end }} | ||
|
||
{{/* | ||
Common labels | ||
*/}} | ||
{{- define "zammad-ldap-sync.labels" -}} | ||
helm.sh/chart: {{ include "zammad-ldap-sync.chart" . }} | ||
{{ include "zammad-ldap-sync.selectorLabels" . }} | ||
{{- if .Chart.AppVersion }} | ||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||
{{- end }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
{{- end }} | ||
|
||
{{/* | ||
Selector labels | ||
*/}} | ||
{{- define "zammad-ldap-sync.selectorLabels" -}} | ||
app.kubernetes.io/name: {{ include "zammad-ldap-sync.name" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
{{- end }} | ||
|
||
{{/* | ||
Create the name of the service account to use | ||
*/}} | ||
{{- define "zammad-ldap-sync.serviceAccountName" -}} | ||
{{- if .Values.serviceAccount.create }} | ||
{{- default (include "zammad-ldap-sync.fullname" .) .Values.serviceAccount.name }} | ||
{{- else }} | ||
{{- default "default" .Values.serviceAccount.name }} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
kind: ConfigMap | ||
apiVersion: v1 | ||
metadata: | ||
name: {{ .Values.ldapSync.configMap.name }} | ||
name: {{ include "zammad-ldap-sync.name" . }} | ||
labels: | ||
{{- include "zammad-ldap-sync.labels" . | nindent 4 }} | ||
data: | ||
{{- with .Values.ldapSync.configMap.yaml }} | ||
{{- with .Values.ldapSync.applicationYML }} | ||
application.yaml: | | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,56 +7,39 @@ ldapSync: | |
tag: dev | ||
cronjob: | ||
schedule: "0 2 * * *" | ||
# Must be present. | ||
# Must be present. | ||
secret: kubernetes-secret | ||
configMap: | ||
# Created by helm. | ||
name: kubernets-configmap | ||
yaml: | ||
spring: | ||
main: | ||
web-application-type: none | ||
profiles: | ||
# Profile influences log output. May be you don't want to write ldap entries in your log files. | ||
active: default,prod | ||
# Send email in caseof invalid distinguished-names. | ||
mail: | ||
host: mail.example.com | ||
port: 1 | ||
username: email-user | ||
password: email-password | ||
ldap: | ||
url: ldaps://... | ||
sync: | ||
# If necessary, set different distinguished-names with their own ldap-search-bases. | ||
organizational-units: | ||
identifier-1: | ||
distinguished-names: | ||
# - dn-identifier-1 | ||
user-search-base: user-dn-search-base-dent-1 | ||
ou-search-base: ou-dn-search-base-dent-1 | ||
identifier-2: | ||
distinguished-names: | ||
# - dn-identifier-2 | ||
user-search-base: user-dn-search-base-dent-2 | ||
ou-search-base: ou-dn-search-base-dent-2 | ||
message: | ||
from: [email protected] | ||
to: [email protected] | ||
subject: Ooopps.. | ||
subject: | ||
zammad: | ||
# Zammad roles which must exist. Register role with correct role id. | ||
assignment: | ||
role: | ||
# Default zammad role. Is created by zammad. | ||
name-agent: Agent | ||
# Zammad role with permission ticket.agent. Must be created. | ||
name-erstellen: Erstellen | ||
# Zammad role with permission ticket.agent. Must be created. | ||
name-vollzugriff: Vollzugriff | ||
url: | ||
base: http://zammad-nginx:8080/api/v1/ | ||
groups: groups | ||
users: users | ||
roles: roles | ||
|
||
applicationYML: | ||
spring: | ||
profiles: | ||
# Profile influences log output. May be you don't want to write ldap entries in your log files. | ||
active: default,prod | ||
# Send email in caseof invalid distinguished-names. | ||
mail: | ||
host: mail.example.com | ||
port: 1 | ||
username: email-user | ||
password: email-password | ||
ldap: | ||
url: ldaps://... | ||
sync: | ||
# If necessary, set different distinguished-names with their own ldap-search-bases. | ||
organizational-units: | ||
identifier-1: | ||
distinguished-names: | ||
# - dn-identifier-1 | ||
user-search-base: user-dn-search-base-dent-1 | ||
ou-search-base: ou-dn-search-base-dent-1 | ||
identifier-2: | ||
distinguished-names: | ||
# - dn-identifier-2 | ||
user-search-base: user-dn-search-base-dent-2 | ||
ou-search-base: ou-dn-search-base-dent-2 | ||
message: | ||
from: [email protected] | ||
to: [email protected] | ||
subject: Ooopps.. | ||
zammad: | ||
url: | ||
base: http://zammad-nginx:8080/api/v1/ |