Skip to content

Commit 95520f6

Browse files
committed
Added another-ldap-auth chart
1 parent 91f51ff commit 95520f6

File tree

13 files changed

+392
-0
lines changed

13 files changed

+392
-0
lines changed

NOTICE

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
License for charts/another-ldap-auth is MIT.
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: v2
2+
name: another-ldap-auth
3+
description: A Helm chart using another-ldap-auth to enable AD or LDAP based basic-authentication for ingress resources
4+
type: application
5+
version: 0.3.0
6+
appVersion: 2.2.1
7+
keywords:
8+
- ingress
9+
- nginx
10+
- ldap
11+
- activedirectory
12+
- authentication
13+
- another-ldap-auth
14+
home: https://github.com/dignajar/another-ldap-auth
15+
sources:
16+
- https://github.com/dignajar/another-ldap-auth

charts/another-ldap-auth/LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2020 Diego Najar
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

charts/another-ldap-auth/README.md

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# another-ldap-auth
2+
3+
![Version: 0.3.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.2.1](https://img.shields.io/badge/AppVersion-2.2.1-informational?style=flat-square)
4+
5+
A Helm chart using another-ldap-auth to enable AD or LDAP based basic-authentication for ingress resources
6+
7+
**Homepage:** <https://github.com/dignajar/another-ldap-auth>
8+
9+
## Source Code
10+
11+
* <https://github.com/dignajar/another-ldap-auth>
12+
13+
## Values
14+
15+
| Key | Type | Default | Description |
16+
|-----|------|---------|-------------|
17+
| affinity | object | `{}` | |
18+
| autoscaling.enabled | bool | `false` | |
19+
| autoscaling.maxReplicas | int | `100` | |
20+
| autoscaling.minReplicas | int | `1` | |
21+
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
22+
| fullnameOverride | string | `""` | |
23+
| image.pullPolicy | string | `"IfNotPresent"` | |
24+
| image.repository | string | `"dignajar/another-ldap-auth"` | |
25+
| image.tag | string | `"1.9"` | |
26+
| imagePullSecrets | list | `[]` | |
27+
| ldap.cacheExpiration | int | `10` | |
28+
| ldap.endpoint | string | `"ldaps://testmyldap.com:636"` | |
29+
| ldap.existingSecret | string | `nil` | |
30+
| ldap.httpsSupport | string | `"enabled"` | |
31+
| ldap.logLevel | string | `"INFO"` | |
32+
| ldap.managerDnUsername | string | `"CN=john,OU=Administrators,DC=TESTMYLDAP,DC=COM"` | |
33+
| ldap.searchBase | string | `"DC=TESTMYLDAP,DC=COM"` | |
34+
| ldap.searchFilter | string | `"(sAMAccountName={username})"` | |
35+
| ldap.bindDN | string | `"{username}@TESTMYLDAP.com"` | |
36+
| nameOverride | string | `""` | |
37+
| nodeSelector | object | `{}` | |
38+
| podAnnotations | object | `{}` | |
39+
| podSecurityContext | object | `{}` | |
40+
| replicaCount | int | `1` | |
41+
| resources.limits.cpu | string | `"500m"` | |
42+
| resources.limits.memory | string | `"256Mi"` | |
43+
| resources.requests.cpu | string | `"50m"` | |
44+
| resources.requests.memory | string | `"64Mi"` | |
45+
| securityContext | object | `{}` | |
46+
| service.containerPort | int | `9000` | |
47+
| service.port | int | `80` | |
48+
| service.protocol | string | `"TCP"` | |
49+
| service.type | string | `"ClusterIP"` | |
50+
| serviceAccount.annotations | object | `{}` | |
51+
| serviceAccount.create | bool | `true` | |
52+
| serviceAccount.name | string | `""` | |
53+
| tolerations | list | `[]` | |
54+
55+
----------------------------------------------
56+
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Deployed another-ldap-auth.
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "another-ldap-auth.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "another-ldap-auth.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "another-ldap-auth.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "another-ldap-auth.labels" -}}
37+
helm.sh/chart: {{ include "another-ldap-auth.chart" . }}
38+
{{ include "another-ldap-auth.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "another-ldap-auth.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "another-ldap-auth.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "another-ldap-auth.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "another-ldap-auth.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: {{ include "another-ldap-auth.fullname" . }}
5+
labels:
6+
{{- include "another-ldap-auth.labels" . | nindent 4 }}
7+
spec:
8+
{{- if not .Values.autoscaling.enabled }}
9+
replicas: {{ .Values.replicaCount }}
10+
{{- end }}
11+
selector:
12+
matchLabels:
13+
{{- include "another-ldap-auth.selectorLabels" . | nindent 6 }}
14+
template:
15+
metadata:
16+
{{- with .Values.podAnnotations }}
17+
annotations:
18+
{{- toYaml . | nindent 8 }}
19+
{{- end }}
20+
labels:
21+
{{- include "another-ldap-auth.selectorLabels" . | nindent 8 }}
22+
spec:
23+
{{- with .Values.imagePullSecrets }}
24+
imagePullSecrets:
25+
{{- toYaml . | nindent 8 }}
26+
{{- end }}
27+
serviceAccountName: {{ include "another-ldap-auth.serviceAccountName" . }}
28+
securityContext:
29+
{{- toYaml .Values.podSecurityContext | nindent 8 }}
30+
containers:
31+
- name: {{ .Chart.Name }}
32+
securityContext:
33+
{{- toYaml .Values.securityContext | nindent 12 }}
34+
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
35+
imagePullPolicy: {{ .Values.image.pullPolicy }}
36+
env:
37+
- name: CACHE_EXPIRATION
38+
value: "{{ .Values.ldap.cacheExpiration }}"
39+
- name: LDAP_ENDPOINT
40+
value: {{ .Values.ldap.endpoint }}
41+
- name: LDAP_HTTPS_SUPPORT
42+
value: {{ .Values.ldap.httpsSupport }}
43+
- name: LDAP_MANAGER_DN_USERNAME
44+
value: {{ .Values.ldap.managerDnUsername }}
45+
- name: LDAP_BIND_DN
46+
value: {{ .Values.ldap.bindDN }}
47+
- name: LDAP_SEARCH_BASE
48+
value: {{ .Values.ldap.searchBase }}
49+
- name: LDAP_SEARCH_FILTER
50+
value: {{ .Values.ldap.searchFilter }}
51+
- name: LOG_LEVEL
52+
value: {{ .Values.ldap.logLevel }}
53+
- name: LOG_FORMAT
54+
value: {{ .Values.ldap.logFormat }}
55+
- name: LDAP_MANAGER_PASSWORD
56+
valueFrom:
57+
secretKeyRef:
58+
name: {{ if .Values.ldap.existingSecret }}{{ .Values.ldap.existingSecret }}{{ else }}{{ include "another-ldap-auth.fullname" . }}{{ end }}
59+
key: LDAP_MANAGER_PASSWORD
60+
ports:
61+
- containerPort: {{ .Values.service.containerPort }}
62+
protocol: {{ .Values.service.protocol }}
63+
resources:
64+
{{- toYaml .Values.resources | nindent 12 }}
65+
{{- with .Values.nodeSelector }}
66+
nodeSelector:
67+
{{- toYaml . | nindent 8 }}
68+
{{- end }}
69+
{{- with .Values.affinity }}
70+
affinity:
71+
{{- toYaml . | nindent 8 }}
72+
{{- end }}
73+
{{- with .Values.tolerations }}
74+
tolerations:
75+
{{- toYaml . | nindent 8 }}
76+
{{- end }}
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
{{- if .Values.autoscaling.enabled }}
2+
apiVersion: autoscaling/v2beta1
3+
kind: HorizontalPodAutoscaler
4+
metadata:
5+
name: {{ include "another-ldap-auth.fullname" . }}
6+
labels:
7+
{{- include "another-ldap-auth.labels" . | nindent 4 }}
8+
spec:
9+
scaleTargetRef:
10+
apiVersion: apps/v1
11+
kind: Deployment
12+
name: {{ include "another-ldap-auth.fullname" . }}
13+
minReplicas: {{ .Values.autoscaling.minReplicas }}
14+
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
15+
metrics:
16+
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
17+
- type: Resource
18+
resource:
19+
name: cpu
20+
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
21+
{{- end }}
22+
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
23+
- type: Resource
24+
resource:
25+
name: memory
26+
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
27+
{{- end }}
28+
{{- end }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{{- if not .Values.ldap.existingSecret -}}
2+
kind: Secret
3+
apiVersion: v1
4+
metadata:
5+
name: {{ include "another-ldap-auth.fullname" . }}
6+
type: Opaque
7+
data:
8+
LDAP_MANAGER_PASSWORD: {{ .Values.ldap.managerDnPassword | b64enc }}
9+
{{- end }}

0 commit comments

Comments
 (0)