Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(kubernetes): install lldap #156

Merged
merged 1 commit into from
Dec 28, 2023
Merged

feat(kubernetes): install lldap #156

merged 1 commit into from
Dec 28, 2023

Conversation

martinohmann
Copy link
Owner

No description provided.

@github-actions github-actions bot added the area/kubernetes Changes made in the kubernetes directory label Dec 28, 2023
Copy link

--- kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/lldap

+++ kubernetes/apps Kustomization: flux-system/cluster-apps Kustomization: flux-system/lldap

@@ -0,0 +1,36 @@

+---
+apiVersion: kustomize.toolkit.fluxcd.io/v1
+kind: Kustomization
+metadata:
+  labels:
+    kustomize.toolkit.fluxcd.io/name: cluster-apps
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: lldap
+  namespace: flux-system
+spec:
+  commonMetadata:
+    labels:
+      app.kubernetes.io/name: lldap
+  decryption:
+    provider: sops
+    secretRef:
+      name: sops-age
+  dependsOn:
+  - name: cloudnative-pg-cluster
+  interval: 30m
+  path: ./kubernetes/apps/default/lldap/app
+  postBuild:
+    substituteFrom:
+    - kind: ConfigMap
+      name: cluster-settings
+    - kind: Secret
+      name: cluster-secrets
+  prune: true
+  retryInterval: 1m
+  sourceRef:
+    kind: GitRepository
+    name: home-kubernetes
+  targetNamespace: default
+  timeout: 5m
+  wait: true
+
--- kubernetes/apps/default/lldap/app Kustomization: flux-system/lldap HelmRelease: default/lldap

+++ kubernetes/apps/default/lldap/app Kustomization: flux-system/lldap HelmRelease: default/lldap

@@ -0,0 +1,99 @@

+---
+apiVersion: helm.toolkit.fluxcd.io/v2beta2
+kind: HelmRelease
+metadata:
+  labels:
+    app.kubernetes.io/name: lldap
+    kustomize.toolkit.fluxcd.io/name: lldap
+    kustomize.toolkit.fluxcd.io/namespace: flux-system
+  name: lldap
+  namespace: default
+spec:
+  chart:
+    spec:
+      chart: app-template
+      sourceRef:
+        kind: HelmRepository
+        name: bjw-s
+        namespace: flux-system
+      version: 2.4.0
+  install:
+    remediation:
+      retries: 3
+  interval: 30m
+  uninstall:
+    keepHistory: false
+  upgrade:
+    cleanupOnFail: true
+    remediation:
+      retries: 3
+  values:
+    controllers:
+      main:
+        annotations:
+          reloader.stakater.com/auto: 'true'
+        containers:
+          main:
+            env:
+              LLDAP_HTTP_PORT: 80
+              LLDAP_HTTP_URL: https://lldap.18b.haus
+              LLDAP_LDAP_BASE_DN: dc=home,dc=arpa
+              LLDAP_LDAP_PORT: 389
+              TZ: Europe/Berlin
+            envFrom:
+            - secretRef:
+                name: lldap
+            image:
+              repository: ghcr.io/lldap/lldap
+              tag: v0.5.0@sha256:f0f5d92cd6c6dca9415993cfc57919f0618e87090b323a98c1536975860fa45a
+            resources:
+              limits:
+                memory: 128M
+              requests:
+                cpu: 5m
+                memory: 36M
+        initContainers:
+          init-db:
+            envFrom:
+            - secretRef:
+                name: lldap
+            image:
+              repository: ghcr.io/onedr0p/postgres-init
+              tag: 16
+        pod:
+          topologySpreadConstraints:
+          - labelSelector:
+              matchLabels:
+                app.kubernetes.io/name: lldap
+            maxSkew: 1
+            topologyKey: kubernetes.io/hostname
+            whenUnsatisfiable: DoNotSchedule
+        replicas: 2
+        strategy: RollingUpdate
+    ingress:
+      main:
+        annotations:
+          hajimari.io/icon: mdi:users
+        className: internal
+        enabled: true
+        hosts:
+        - host: '{{ .Release.Name }}.18b.haus'
+          paths:
+          - path: /
+            service:
+              name: main
+              port: http
+        tls:
+        - hosts:
+          - '{{ .Release.Name }}.18b.haus'
+    persistence:
+      data:
+        type: emptyDir
+    service:
+      main:
+        ports:
+          http:
+            port: 80
+          ldap:
+            port: 389
+

Copy link

--- HelmRelease: default/lldap Service: default/lldap

+++ HelmRelease: default/lldap Service: default/lldap

@@ -0,0 +1,26 @@

+---
+apiVersion: v1
+kind: Service
+metadata:
+  name: lldap
+  labels:
+    app.kubernetes.io/instance: lldap
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: lldap
+    app.kubernetes.io/service: lldap
+spec:
+  type: ClusterIP
+  ports:
+  - port: 80
+    targetPort: 80
+    protocol: TCP
+    name: http
+  - port: 389
+    targetPort: 389
+    protocol: TCP
+    name: ldap
+  selector:
+    app.kubernetes.io/component: main
+    app.kubernetes.io/instance: lldap
+    app.kubernetes.io/name: lldap
+
--- HelmRelease: default/lldap Deployment: default/lldap

+++ HelmRelease: default/lldap Deployment: default/lldap

@@ -0,0 +1,103 @@

+---
+apiVersion: apps/v1
+kind: Deployment
+metadata:
+  name: lldap
+  labels:
+    app.kubernetes.io/component: main
+    app.kubernetes.io/instance: lldap
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: lldap
+  annotations:
+    reloader.stakater.com/auto: 'true'
+spec:
+  revisionHistoryLimit: 3
+  replicas: 2
+  strategy:
+    type: RollingUpdate
+  selector:
+    matchLabels:
+      app.kubernetes.io/component: main
+      app.kubernetes.io/name: lldap
+      app.kubernetes.io/instance: lldap
+  template:
+    metadata:
+      labels:
+        app.kubernetes.io/component: main
+        app.kubernetes.io/instance: lldap
+        app.kubernetes.io/name: lldap
+    spec:
+      enableServiceLinks: true
+      serviceAccountName: default
+      automountServiceAccountToken: true
+      hostIPC: false
+      hostNetwork: false
+      hostPID: false
+      dnsPolicy: ClusterFirst
+      topologySpreadConstraints:
+      - labelSelector:
+          matchLabels:
+            app.kubernetes.io/name: lldap
+        maxSkew: 1
+        topologyKey: kubernetes.io/hostname
+        whenUnsatisfiable: DoNotSchedule
+      initContainers:
+      - envFrom:
+        - secretRef:
+            name: lldap
+        image: ghcr.io/onedr0p/postgres-init:16
+        name: init-db
+        volumeMounts:
+        - mountPath: /data
+          name: data
+      containers:
+      - env:
+        - name: LLDAP_HTTP_PORT
+          value: '80'
+        - name: LLDAP_HTTP_URL
+          value: https://lldap.18b.haus
+        - name: LLDAP_LDAP_BASE_DN
+          value: dc=home,dc=arpa
+        - name: LLDAP_LDAP_PORT
+          value: '389'
+        - name: TZ
+          value: Europe/Berlin
+        envFrom:
+        - secretRef:
+            name: lldap
+        image: ghcr.io/lldap/lldap:v0.5.0@sha256:f0f5d92cd6c6dca9415993cfc57919f0618e87090b323a98c1536975860fa45a
+        livenessProbe:
+          failureThreshold: 3
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          tcpSocket:
+            port: 80
+          timeoutSeconds: 1
+        name: main
+        readinessProbe:
+          failureThreshold: 3
+          initialDelaySeconds: 0
+          periodSeconds: 10
+          tcpSocket:
+            port: 80
+          timeoutSeconds: 1
+        resources:
+          limits:
+            memory: 128M
+          requests:
+            cpu: 5m
+            memory: 36M
+        startupProbe:
+          failureThreshold: 30
+          initialDelaySeconds: 0
+          periodSeconds: 5
+          tcpSocket:
+            port: 80
+          timeoutSeconds: 1
+        volumeMounts:
+        - mountPath: /data
+          name: data
+      volumes:
+      - emptyDir: {}
+        name: data
+
--- HelmRelease: default/lldap Ingress: default/lldap

+++ HelmRelease: default/lldap Ingress: default/lldap

@@ -0,0 +1,28 @@

+---
+apiVersion: networking.k8s.io/v1
+kind: Ingress
+metadata:
+  name: lldap
+  labels:
+    app.kubernetes.io/instance: lldap
+    app.kubernetes.io/managed-by: Helm
+    app.kubernetes.io/name: lldap
+  annotations:
+    hajimari.io/icon: mdi:users
+spec:
+  ingressClassName: internal
+  tls:
+  - hosts:
+    - lldap.18b.haus
+  rules:
+  - host: lldap.18b.haus
+    http:
+      paths:
+      - path: /
+        pathType: Prefix
+        backend:
+          service:
+            name: lldap
+            port:
+              number: 80
+

@martinohmann martinohmann merged commit 8ed3982 into main Dec 28, 2023
4 checks passed
@martinohmann martinohmann deleted the lldap branch December 28, 2023 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/kubernetes Changes made in the kubernetes directory
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant