Add minimal openldap Chart

This commit is contained in:
fnux 2021-07-31 16:04:27 +02:00
parent e7fcef1932
commit c9b64f4faf
No known key found for this signature in database
GPG key ID: 4502C902C00A1E12
6 changed files with 143 additions and 0 deletions

View file

@ -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/

View file

@ -0,0 +1,24 @@
apiVersion: v2
name: openldap
description: OpenLDAP server
# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application
# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.1.0
# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: "1.5.0"

View file

@ -0,0 +1,65 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: "{{ tpl .Values.identifier . }}"
labels:
app: openldap
spec:
replicas: 1
selector:
matchLabels:
app: "{{ tpl .Values.identifier . }}-openldap"
template:
metadata:
labels:
app: "{{ tpl .Values.identifier . }}-openldap"
spec:
containers:
- name: "openldap"
image: "osixia/openldap:{{ .Chart.AppVersion }}"
args: ["--loglevel", "info"]
ports:
- name: ldap
containerPort: 389
protocol: TCP
- name: ldaps
containerPort: 636
protocol: TCP
livenessProbe:
tcpSocket:
port: 389
initialDelaySeconds: 10
periodSeconds: 10
readinessProbe:
tcpSocket:
port: 389
initialDelaySeconds: 10
periodSeconds: 10
env:
- name: HOSTNAME
value: "{{ tpl .Values.fqdn . }}"
- name: LDAP_LOG_LEVEL
value: "{{ tpl .Values.ldapLogLevel . }}"
- name: LDAP_ORGANISATION
value: "{{ tpl .Values.ldapOrganisation . }}"
- name: LDAP_DOMAIN
value: "{{ tpl .Values.ldapDomain . }}"
- name: LDAP_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: "{{ tpl .Values.identifier . }}-openldap"
key: LDAP_ADMIN_PASSWORD
volumeMounts:
- name: "{{ tpl .Values.identifier . }}-openldap-data"
mountPath: "/etc/ldap/slapd.d"
subPath: configuration
- name: "{{ tpl .Values.identifier . }}-openldap-data"
mountPath: "/var/lib/ldap"
subPath: database
- name: "{{ tpl .Values.identifier . }}-openldap-data"
mountPath: /container/service/slapd/assets/certs
subPath: certs
volumes:
- name: "{{ tpl .Values.identifier . }}-openldap-data"
persistentVolumeClaim:
claimName: "{{ tpl .Values.identifier . }}-openldap-data"

View file

@ -0,0 +1,11 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: "{{ tpl .Values.identifier . }}-openldap-data"
spec:
accessModes:
- ReadWriteMany
resources:
requests:
storage: 1Gi
storageClassName: rook-cephfs

View file

@ -0,0 +1,13 @@
apiVersion: v1
kind: Service
metadata:
name: "{{ tpl .Values.identifier . }}"
labels:
app: openldap
spec:
type: ClusterIP
ports:
- port: 389
name: ldap
- port: 636
name: ldaps

View file

@ -0,0 +1,7 @@
clusterDomain: "c1.k8s.ooo"
fqdn: "{{ .Release.Name }}.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}"
identifier: "{{ .Release.Name }}"
ldapLogLevel: "256"
ldapOrganisation: "ungleich glarus ag"
ldapDomain: "{{ tpl .Values.fqdn . }}"