Skip to content

Commit

Permalink
Added another-ldap-auth chart
Browse files Browse the repository at this point in the history
  • Loading branch information
ieugen committed Jan 3, 2022
1 parent 91f51ff commit 95520f6
Show file tree
Hide file tree
Showing 13 changed files with 392 additions and 0 deletions.
1 change: 1 addition & 0 deletions NOTICE
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
License for charts/another-ldap-auth is MIT.
23 changes: 23 additions & 0 deletions charts/another-ldap-auth/.helmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Patterns to ignore when building packages.
# This supports shell glob matching, relative path matching, and
# negation (prefixed with !). Only one pattern per line.
.DS_Store
# Common VCS dirs
.git/
.gitignore
.bzr/
.bzrignore
.hg/
.hgignore
.svn/
# Common backup files
*.swp
*.bak
*.tmp
*.orig
*~
# Various IDEs
.project
.idea/
*.tmproj
.vscode/
16 changes: 16 additions & 0 deletions charts/another-ldap-auth/Chart.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: v2
name: another-ldap-auth
description: A Helm chart using another-ldap-auth to enable AD or LDAP based basic-authentication for ingress resources
type: application
version: 0.3.0
appVersion: 2.2.1
keywords:
- ingress
- nginx
- ldap
- activedirectory
- authentication
- another-ldap-auth
home: https://github.com/dignajar/another-ldap-auth
sources:
- https://github.com/dignajar/another-ldap-auth
21 changes: 21 additions & 0 deletions charts/another-ldap-auth/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Diego Najar

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
56 changes: 56 additions & 0 deletions charts/another-ldap-auth/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# another-ldap-auth

![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)

A Helm chart using another-ldap-auth to enable AD or LDAP based basic-authentication for ingress resources

**Homepage:** <https://github.com/dignajar/another-ldap-auth>

## Source Code

* <https://github.com/dignajar/another-ldap-auth>

## Values

| Key | Type | Default | Description |
|-----|------|---------|-------------|
| affinity | object | `{}` | |
| autoscaling.enabled | bool | `false` | |
| autoscaling.maxReplicas | int | `100` | |
| autoscaling.minReplicas | int | `1` | |
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
| fullnameOverride | string | `""` | |
| image.pullPolicy | string | `"IfNotPresent"` | |
| image.repository | string | `"dignajar/another-ldap-auth"` | |
| image.tag | string | `"1.9"` | |
| imagePullSecrets | list | `[]` | |
| ldap.cacheExpiration | int | `10` | |
| ldap.endpoint | string | `"ldaps://testmyldap.com:636"` | |
| ldap.existingSecret | string | `nil` | |
| ldap.httpsSupport | string | `"enabled"` | |
| ldap.logLevel | string | `"INFO"` | |
| ldap.managerDnUsername | string | `"CN=john,OU=Administrators,DC=TESTMYLDAP,DC=COM"` | |
| ldap.searchBase | string | `"DC=TESTMYLDAP,DC=COM"` | |
| ldap.searchFilter | string | `"(sAMAccountName={username})"` | |
| ldap.bindDN | string | `"{username}@TESTMYLDAP.com"` | |
| nameOverride | string | `""` | |
| nodeSelector | object | `{}` | |
| podAnnotations | object | `{}` | |
| podSecurityContext | object | `{}` | |
| replicaCount | int | `1` | |
| resources.limits.cpu | string | `"500m"` | |
| resources.limits.memory | string | `"256Mi"` | |
| resources.requests.cpu | string | `"50m"` | |
| resources.requests.memory | string | `"64Mi"` | |
| securityContext | object | `{}` | |
| service.containerPort | int | `9000` | |
| service.port | int | `80` | |
| service.protocol | string | `"TCP"` | |
| service.type | string | `"ClusterIP"` | |
| serviceAccount.annotations | object | `{}` | |
| serviceAccount.create | bool | `true` | |
| serviceAccount.name | string | `""` | |
| tolerations | list | `[]` | |

----------------------------------------------
Autogenerated from chart metadata using [helm-docs v1.5.0](https://github.com/norwoodj/helm-docs/releases/v1.5.0)
1 change: 1 addition & 0 deletions charts/another-ldap-auth/templates/NOTES.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Deployed another-ldap-auth.
62 changes: 62 additions & 0 deletions charts/another-ldap-auth/templates/_helpers.tpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
{{/*
Expand the name of the chart.
*/}}
{{- define "another-ldap-auth.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 "another-ldap-auth.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 "another-ldap-auth.chart" -}}
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
{{- end }}

{{/*
Common labels
*/}}
{{- define "another-ldap-auth.labels" -}}
helm.sh/chart: {{ include "another-ldap-auth.chart" . }}
{{ include "another-ldap-auth.selectorLabels" . }}
{{- if .Chart.AppVersion }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- end }}

{{/*
Selector labels
*/}}
{{- define "another-ldap-auth.selectorLabels" -}}
app.kubernetes.io/name: {{ include "another-ldap-auth.name" . }}
app.kubernetes.io/instance: {{ .Release.Name }}
{{- end }}

{{/*
Create the name of the service account to use
*/}}
{{- define "another-ldap-auth.serviceAccountName" -}}
{{- if .Values.serviceAccount.create }}
{{- default (include "another-ldap-auth.fullname" .) .Values.serviceAccount.name }}
{{- else }}
{{- default "default" .Values.serviceAccount.name }}
{{- end }}
{{- end }}
76 changes: 76 additions & 0 deletions charts/another-ldap-auth/templates/deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "another-ldap-auth.fullname" . }}
labels:
{{- include "another-ldap-auth.labels" . | nindent 4 }}
spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }}
{{- end }}
selector:
matchLabels:
{{- include "another-ldap-auth.selectorLabels" . | nindent 6 }}
template:
metadata:
{{- with .Values.podAnnotations }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels:
{{- include "another-ldap-auth.selectorLabels" . | nindent 8 }}
spec:
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "another-ldap-auth.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers:
- name: {{ .Chart.Name }}
securityContext:
{{- toYaml .Values.securityContext | nindent 12 }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }}
env:
- name: CACHE_EXPIRATION
value: "{{ .Values.ldap.cacheExpiration }}"
- name: LDAP_ENDPOINT
value: {{ .Values.ldap.endpoint }}
- name: LDAP_HTTPS_SUPPORT
value: {{ .Values.ldap.httpsSupport }}
- name: LDAP_MANAGER_DN_USERNAME
value: {{ .Values.ldap.managerDnUsername }}
- name: LDAP_BIND_DN
value: {{ .Values.ldap.bindDN }}
- name: LDAP_SEARCH_BASE
value: {{ .Values.ldap.searchBase }}
- name: LDAP_SEARCH_FILTER
value: {{ .Values.ldap.searchFilter }}
- name: LOG_LEVEL
value: {{ .Values.ldap.logLevel }}
- name: LOG_FORMAT
value: {{ .Values.ldap.logFormat }}
- name: LDAP_MANAGER_PASSWORD
valueFrom:
secretKeyRef:
name: {{ if .Values.ldap.existingSecret }}{{ .Values.ldap.existingSecret }}{{ else }}{{ include "another-ldap-auth.fullname" . }}{{ end }}
key: LDAP_MANAGER_PASSWORD
ports:
- containerPort: {{ .Values.service.containerPort }}
protocol: {{ .Values.service.protocol }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
28 changes: 28 additions & 0 deletions charts/another-ldap-auth/templates/hpa.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{{- if .Values.autoscaling.enabled }}
apiVersion: autoscaling/v2beta1
kind: HorizontalPodAutoscaler
metadata:
name: {{ include "another-ldap-auth.fullname" . }}
labels:
{{- include "another-ldap-auth.labels" . | nindent 4 }}
spec:
scaleTargetRef:
apiVersion: apps/v1
kind: Deployment
name: {{ include "another-ldap-auth.fullname" . }}
minReplicas: {{ .Values.autoscaling.minReplicas }}
maxReplicas: {{ .Values.autoscaling.maxReplicas }}
metrics:
{{- if .Values.autoscaling.targetCPUUtilizationPercentage }}
- type: Resource
resource:
name: cpu
targetAverageUtilization: {{ .Values.autoscaling.targetCPUUtilizationPercentage }}
{{- end }}
{{- if .Values.autoscaling.targetMemoryUtilizationPercentage }}
- type: Resource
resource:
name: memory
targetAverageUtilization: {{ .Values.autoscaling.targetMemoryUtilizationPercentage }}
{{- end }}
{{- end }}
9 changes: 9 additions & 0 deletions charts/another-ldap-auth/templates/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{{- if not .Values.ldap.existingSecret -}}
kind: Secret
apiVersion: v1
metadata:
name: {{ include "another-ldap-auth.fullname" . }}
type: Opaque
data:
LDAP_MANAGER_PASSWORD: {{ .Values.ldap.managerDnPassword | b64enc }}
{{- end }}
14 changes: 14 additions & 0 deletions charts/another-ldap-auth/templates/service.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: v1
kind: Service
metadata:
name: {{ include "another-ldap-auth.fullname" . }}
labels:
{{- include "another-ldap-auth.labels" . | nindent 4 }}
spec:
type: {{ .Values.service.type }}
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.service.containerPort }}
protocol: TCP
selector:
{{- include "another-ldap-auth.selectorLabels" . | nindent 4 }}
12 changes: 12 additions & 0 deletions charts/another-ldap-auth/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{{- if .Values.serviceAccount.create -}}
apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ include "another-ldap-auth.serviceAccountName" . }}
labels:
{{- include "another-ldap-auth.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
{{- end }}
Loading

0 comments on commit 95520f6

Please sign in to comment.