feat(dev): okteto integration
This commit is contained in:
		
							parent
							
								
									b21b058005
								
							
						
					
					
						commit
						9783f2de67
					
				
					 8 changed files with 300 additions and 1 deletions
				
			
		
							
								
								
									
										7
									
								
								chart/templates/ConfigMap.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										7
									
								
								chart/templates/ConfigMap.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,7 @@ | |||
| apiVersion: v1 | ||||
| kind: ConfigMap | ||||
| metadata: | ||||
|   name: {{ include "misskey.fullname" . }}-config-file | ||||
| data: | ||||
|   default.yml: |- | ||||
| {{ .Files.Get "files/default.yml"|indent 4 }} | ||||
							
								
								
									
										44
									
								
								chart/templates/Deployment.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										44
									
								
								chart/templates/Deployment.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,44 @@ | |||
| apiVersion: apps/v1 | ||||
| kind: Deployment | ||||
| metadata: | ||||
|   name: {{ include "misskey.fullname" . }} | ||||
|   labels: | ||||
| 		{{- include "misskey.labels" . | nindent 4 }} | ||||
| spec: | ||||
|   selector: | ||||
|     matchLabels: | ||||
| 			{{- include "misskey.selectorLabels" . | nindent 6 }} | ||||
|   replicas: 1 | ||||
|   template: | ||||
|     metadata: | ||||
|       labels: | ||||
| 				{{- include "misskey.selectorLabels" . | nindent 8 }} | ||||
|     spec: | ||||
|       containers: | ||||
|         - name: misskey | ||||
|           image: okteto.dev/misskey:latest | ||||
|           volumeMounts: | ||||
|             - name: config-file | ||||
|               mountPath: /misskey/.config | ||||
|               readOnly: true | ||||
|           ports: | ||||
|             - containerPort: 3000 | ||||
|         - name: postgres | ||||
|           image: postgres:14-alpine | ||||
|           env: | ||||
|             - name: POSTGRES_USER | ||||
|               value: "example-misskey-user" | ||||
|             - name: POSTGRES_PASSWORD | ||||
|               value: "example-misskey-pass" | ||||
|             - name: POSTGRES_DB | ||||
|               value: "misskey" | ||||
|           ports: | ||||
|             - containerPort: 5432 | ||||
|         - name: redis | ||||
|           image: redis:alpine | ||||
|           ports: | ||||
|             - containerPort: 6379 | ||||
|       volumes: | ||||
|         - name: config-file | ||||
|           configMap: | ||||
|             name: {{ include "misskey.fullname" . }}-config-file | ||||
							
								
								
									
										14
									
								
								chart/templates/Service.yml
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								chart/templates/Service.yml
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,14 @@ | |||
| apiVersion: v1 | ||||
| kind: Service | ||||
| metadata: | ||||
|   name: {{ include "misskey.fullname" . }} | ||||
|   annotations: | ||||
|     dev.okteto.com/auto-ingress: "true" | ||||
| spec: | ||||
|   type: ClusterIP | ||||
|   ports: | ||||
|     - port: 3000 | ||||
|       protocol: TCP | ||||
|       name: http | ||||
|   selector: | ||||
| 		{{- include "misskey.selectorLabels" . | nindent 4 }} | ||||
							
								
								
									
										62
									
								
								chart/templates/_helpers.tpl
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										62
									
								
								chart/templates/_helpers.tpl
									
										
									
									
									
										Normal file
									
								
							|  | @ -0,0 +1,62 @@ | |||
| {{/* | ||||
| Expand the name of the chart. | ||||
| */}} | ||||
| {{- define "misskey.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 "misskey.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 "misskey.chart" -}} | ||||
| {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} | ||||
| {{- end }} | ||||
| 
 | ||||
| {{/* | ||||
| Common labels | ||||
| */}} | ||||
| {{- define "misskey.labels" -}} | ||||
| helm.sh/chart: {{ include "misskey.chart" . }} | ||||
| {{ include "misskey.selectorLabels" . }} | ||||
| {{- if .Chart.AppVersion }} | ||||
| app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} | ||||
| {{- end }} | ||||
| app.kubernetes.io/managed-by: {{ .Release.Service }} | ||||
| {{- end }} | ||||
| 
 | ||||
| {{/* | ||||
| Selector labels | ||||
| */}} | ||||
| {{- define "misskey.selectorLabels" -}} | ||||
| app.kubernetes.io/name: {{ include "misskey.name" . }} | ||||
| app.kubernetes.io/instance: {{ .Release.Name }} | ||||
| {{- end }} | ||||
| 
 | ||||
| {{/* | ||||
| Create the name of the service account to use | ||||
| */}} | ||||
| {{- define "misskey.serviceAccountName" -}} | ||||
| {{- if .Values.serviceAccount.create }} | ||||
| {{- default (include "misskey.fullname" .) .Values.serviceAccount.name }} | ||||
| {{- else }} | ||||
| {{- default "default" .Values.serviceAccount.name }} | ||||
| {{- end }} | ||||
| {{- end }} | ||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue