initial migration
This commit is contained in:
		
							
								
								
									
										13
									
								
								infrastructure/postgres/adding.md
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										13
									
								
								infrastructure/postgres/adding.md
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,13 @@ | ||||
| Create a new role by executing the createuser command. With the options below, the new role will not be a superuser and will not have privileges for creating new databases or new roles (this is usually the default for the createuser command). | ||||
|  | ||||
| k exec -it -n postgres postgres-postgresql-0 -- bash | ||||
|  | ||||
| ``` | ||||
| createuser -U postgres USER_NAME -S -D -R -P | ||||
| ``` | ||||
| You will be prompted to enter first the password for the new role and to reenter it, and then to enter the postgres role password. | ||||
|  | ||||
| Create a new database with the new role as the owner: | ||||
| ``` | ||||
| createdb -U postgres DATABASE_NAME  -O USER_NAME | ||||
| ``` | ||||
							
								
								
									
										2
									
								
								infrastructure/postgres/config.values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								infrastructure/postgres/config.values.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,2 @@ | ||||
| name: postgres | ||||
| chart: bitnami/postgresql | ||||
							
								
								
									
										21
									
								
								infrastructure/postgres/postgres-password.sealedsecret.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								infrastructure/postgres/postgres-password.sealedsecret.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,21 @@ | ||||
| { | ||||
|   "kind": "SealedSecret", | ||||
|   "apiVersion": "bitnami.com/v1alpha1", | ||||
|   "metadata": { | ||||
|     "name": "postgres-password", | ||||
|     "namespace": "postgres", | ||||
|     "creationTimestamp": null | ||||
|   }, | ||||
|   "spec": { | ||||
|     "template": { | ||||
|       "metadata": { | ||||
|         "name": "postgres-password", | ||||
|         "namespace": "postgres", | ||||
|         "creationTimestamp": null | ||||
|       } | ||||
|     }, | ||||
|     "encryptedData": { | ||||
|       "password": "AgCVytxZbe1yjT7OQuA7LocPTgn6Ikx9pDJAA49Ktboy86dJWlxnBke23O0qn3ELFTGUTDaMhBcJB0neqA0RjTTW3o7PsvbxEBvrP5F1EK4jN2vHti8Jgt/CUbOlJVfFuGPaL2DG9M7vafUnL3AQvZv/YkL79Q32Wcg9nPq+4iT7fTGQzUu22G6bmKJv/SnByAnBIzZRsL3R3pP4J7suG+5+K6PDlNRbIb0mIoy1vjBz5PKQAR2Hrh1+kLFIJEIwDuinSDHRDUoa9fChC52x/Oc4PavFw8RWTXjot5cnEOkUK3umSx0jnD247nPc8sRW87hmHE3O/T+doDqEetQxtarSNPxCZXwkVJCIAxg48M29mdkPiOUu2Rr9W9w+HnN8j7mA2rHYAxxi3KPeDBL7kaFH+Xtyv+MT6upRr9BHfSbA/gMPjT37dJmbEYJAvEEyZZJK6TpXUkLh3jnhg1P180t8AnJVX4KQhjUm+UmgUCytxEjp082vxoKEHop6I7f4qzUYfudaG825i0zL11yjSvUbQbdoe8j3C5pNs5OgNBboGqYGfreCcp76zKdNrNI6GYhtj04AuOQZP5SD9/bqsP4JW4yFYsWsq3XuqIxE/2ExCRvDOFu2H1rnPnkcvUYr30doYPIugP40l7AY18YucUsbH19ww7jM1TOejo5QS5wb39uygwf4j0+XjbD3iV12AQzaEnk/pfo=" | ||||
|     } | ||||
|   } | ||||
| } | ||||
							
								
								
									
										37
									
								
								infrastructure/postgres/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										37
									
								
								infrastructure/postgres/pvc.yaml
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,37 @@ | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolume | ||||
| metadata: | ||||
|   namespace: postgres | ||||
|   name: postgres-nfs | ||||
|   labels: | ||||
|     directory: postgres | ||||
| spec: | ||||
|   storageClassName: fast | ||||
|   capacity: | ||||
|     storage: "50Gi" | ||||
|   volumeMode: Filesystem | ||||
|   accessModes: | ||||
|     - ReadWriteMany | ||||
|   nfs: | ||||
|     path: /export/kluster/postgres | ||||
|     server: 192.168.1.157 | ||||
| --- | ||||
| apiVersion: v1 | ||||
| kind: PersistentVolumeClaim | ||||
| metadata: | ||||
|   namespace: postgres | ||||
|   name: postgres-nfs | ||||
| spec: | ||||
|   storageClassName: fast | ||||
|   accessModes: | ||||
|     - ReadWriteMany | ||||
|   resources: | ||||
|     requests: | ||||
|       storage: "50Gi" | ||||
|   selector: | ||||
|     matchLabels: | ||||
|       directory: postgres | ||||
|  | ||||
|  | ||||
|  | ||||
							
								
								
									
										1037
									
								
								infrastructure/postgres/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										1037
									
								
								infrastructure/postgres/values.yaml
									
									
									
									
									
										Normal file
									
								
							
										
											
												File diff suppressed because it is too large
												Load Diff
											
										
									
								
							
		Reference in New Issue
	
	Block a user