mirror of
				https://github.com/optim-enterprises-bv/homelab.git
				synced 2025-10-30 17:37:59 +00:00 
			
		
		
		
	feat(lldap): add cnpg database for persistence
This commit is contained in:
		
							
								
								
									
										39
									
								
								k8s/infra/auth/lldap/cnpg-db.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								k8s/infra/auth/lldap/cnpg-db.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,39 @@ | |||||||
|  | apiVersion: postgresql.cnpg.io/v1 | ||||||
|  | kind: Cluster | ||||||
|  | metadata: | ||||||
|  |   name: lldap-postgres | ||||||
|  |   namespace: lldap | ||||||
|  | spec: | ||||||
|  |   instances: 1 | ||||||
|  |   affinity: | ||||||
|  |     nodeSelector: | ||||||
|  |       topology.kubernetes.io/zone: euclid | ||||||
|  |   monitoring: | ||||||
|  |     enablePodMonitor: true | ||||||
|  |   postgresql: | ||||||
|  |     parameters: | ||||||
|  |       timezone: Europe/Oslo | ||||||
|  |   bootstrap: | ||||||
|  |     initdb: | ||||||
|  |       database: lldap | ||||||
|  |       owner: lldap | ||||||
|  |   managed: | ||||||
|  |     services: | ||||||
|  |       disabledDefaultServices: [ "ro", "r" ] | ||||||
|  | #      additional: | ||||||
|  | #        - selectorType: rw | ||||||
|  | #          updateStrategy: patch | ||||||
|  | #          serviceTemplate: | ||||||
|  | #            metadata: | ||||||
|  | #              name: lldap-postgres-db | ||||||
|  | #              annotations: | ||||||
|  | #                io.cilium/lb-ipam-ips: 192.168.1.241 | ||||||
|  | #            spec: | ||||||
|  | #              type: LoadBalancer | ||||||
|  |   storage: | ||||||
|  |     size: 1G | ||||||
|  |     pvcTemplate: | ||||||
|  |       storageClassName: proxmox-csi | ||||||
|  |       volumeName: pv-lldap-postgres | ||||||
|  |       accessModes: | ||||||
|  |         - ReadWriteOnce | ||||||
| @@ -40,6 +40,12 @@ spec: | |||||||
|                 name: lldap-credentials |                 name: lldap-credentials | ||||||
|             - secretRef: |             - secretRef: | ||||||
|                 name: smtp-credentials |                 name: smtp-credentials | ||||||
|  |           env: | ||||||
|  |             - name: LLDAP_DATABASE_URL | ||||||
|  |               valueFrom: | ||||||
|  |                 secretKeyRef: | ||||||
|  |                   name: lldap-postgres-app | ||||||
|  |                   key: uri | ||||||
|           ports: |           ports: | ||||||
|             - name: ldap |             - name: ldap | ||||||
|               containerPort: 3890 |               containerPort: 3890 | ||||||
|   | |||||||
| @@ -26,6 +26,7 @@ configMapGenerator: | |||||||
| resources: | resources: | ||||||
|   - ns.yaml |   - ns.yaml | ||||||
|   - svc.yaml |   - svc.yaml | ||||||
|  |   - cnpg-db.yaml | ||||||
|   - lldap-credentials.yaml |   - lldap-credentials.yaml | ||||||
|   - lldap-config.yaml |   - lldap-config.yaml | ||||||
|   - smtp-credentials.yaml |   - smtp-credentials.yaml | ||||||
|   | |||||||
| @@ -132,6 +132,10 @@ module "volumes" { | |||||||
|       node = "euclid" |       node = "euclid" | ||||||
|       size = "1G" |       size = "1G" | ||||||
|     } |     } | ||||||
|  |     pv-lldap-postgres = { | ||||||
|  |       node = "euclid" | ||||||
|  |       size = "1G" | ||||||
|  |     } | ||||||
|     pv-keycloak-postgres = { |     pv-keycloak-postgres = { | ||||||
|       node = "euclid" |       node = "euclid" | ||||||
|       size = "2G" |       size = "2G" | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Vegard Hagen
					Vegard Hagen