This commit is contained in:
		
							parent
							
								
									dbd60036f3
								
							
						
					
					
						commit
						7ce6889321
					
				
							
								
								
									
										20
									
								
								.drone.yml
									
									
									
									
									
								
							
							
						
						
									
										20
									
								
								.drone.yml
									
									
									
									
									
								
							| @ -11,4 +11,22 @@ steps: | ||||
|     password: | ||||
|       from_secret: docker_password | ||||
|     repo: dutchellie/proper-website-2 | ||||
|     tags: latest | ||||
|     tags: latest | ||||
| 
 | ||||
| - name: deploy-staging | ||||
|   image: pelotech/drone-helm3 | ||||
|   settings: | ||||
|     mode: upgrade | ||||
|     chart: .drone/helm/chart | ||||
|     namespace: default | ||||
|     release: newsite-staging | ||||
|     values_files: | ||||
|       - .drone/helm/values.yaml | ||||
|     values: | ||||
|       - ingress.tls.host: newsite.staging.dutchellie.nl | ||||
|       - ingress.hosts[0].host: newsite.staging.dutchellie.nl | ||||
|     kube_api_server: | ||||
|       from_secret: staging_api_server | ||||
|     kube_token: | ||||
|       from_secret: staging_kube_token | ||||
|     dry_run: true | ||||
							
								
								
									
										0
									
								
								.drone/helm/chart/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								.drone/helm/chart/Chart.yaml
									
									
									
									
									
										Normal file
									
								
							
							
								
								
									
										35
									
								
								.drone/helm/chart/templates/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								.drone/helm/chart/templates/deployment.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,35 @@ | ||||
| apiVersion: apps/v1 | ||||
| kind: Deployment | ||||
| metadata: | ||||
|   name: {{ .Values.name }} | ||||
|   namespace: {{ .Release.Namespace }} | ||||
|   {{- if .Values.annotations }} | ||||
|     annotations: {{ toYaml .Values.annotations | nindent 4}} | ||||
|   {{- end}} | ||||
| spec: | ||||
|   selector: | ||||
|     matchLabels: | ||||
|       app: {{ .Values.name }} | ||||
|       release: {{ .Values.release }} | ||||
|   replicas: {{ .Values.replicas }} | ||||
|   template: | ||||
|     metadata: | ||||
|     {{- if .Values.podAnnotations }} | ||||
|       annotations: | ||||
|         {{- range $key, $value := .Values.controller.podAnnotations }} | ||||
|           {{ $key }}: {{ $value | quote }} | ||||
|         {{- end }} | ||||
|     {{- end }} | ||||
|       labels:  | ||||
|         app: {{ .Values.name }} | ||||
|         release: {{ .Values.release }} | ||||
|     spec: | ||||
|       containers: | ||||
|         - name: {{ .Values.containerName }} | ||||
|           image: {{ .Values.image }} | ||||
|           imagePullPolicy: {{ .Values.imagePullPolicy }} | ||||
|           ports: | ||||
|             - name: http | ||||
|               containerPort: 8000 | ||||
| 
 | ||||
|        | ||||
							
								
								
									
										29
									
								
								.drone/helm/chart/templates/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										29
									
								
								.drone/helm/chart/templates/ingress.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,29 @@ | ||||
| apiVersion: networking.k8s.io/v1 | ||||
| kind: Ingress | ||||
| metadata: | ||||
|   name: {{ .Values.ingress.name }} | ||||
|   namespace: {{ .Release.Namespace }} | ||||
|   {{- if .Values.ingress.annotations }} | ||||
|     annotations: {{ toYaml .Values.ingress.annotations | nindent 4 }} | ||||
|   {{- end}} | ||||
| spec: | ||||
|   ingressClassName: {{ .Values.ingress.className }} | ||||
| {{- if .Values.ingress.tls }} | ||||
|   tls: | ||||
|     - hosts: | ||||
|         - {{ .Values.ingress.tls.host }} | ||||
|       secretName: {{ .Values.ingress.tls.secretName }} | ||||
| {{- end }} | ||||
|   rules: | ||||
|     {{- range .Values.ingress.hosts }} | ||||
|     - host: {{ .host | quote }} | ||||
|       http: | ||||
|         paths: | ||||
|           {{- range .paths }} | ||||
|           - path: {{ .path }} | ||||
|             pathType: {{ .pathType }} | ||||
|             backend: | ||||
|               service: | ||||
|                 name: {{ .Values.service.name }} | ||||
|                 port: | ||||
|                   number: 8000 | ||||
							
								
								
									
										17
									
								
								.drone/helm/chart/templates/service.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										17
									
								
								.drone/helm/chart/templates/service.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,17 @@ | ||||
| apiVersion: v1 | ||||
| kind: Service | ||||
| metadata: | ||||
|   name: {{ .Values.service.name }} | ||||
|   namespace: {{ .Release.Namespace }} | ||||
|   {{- if .Values.service.annotations }} | ||||
|     annotations: {{ toYaml .Values.service.annotations | nindent 4}} | ||||
|   {{- end}} | ||||
| spec: | ||||
|   selector: | ||||
|     app: {{ .Values.name }} | ||||
|     release: {{ .Values.release }} | ||||
|   ports: | ||||
|     - protocol: TCP | ||||
|       name: http | ||||
|       port: 8000 | ||||
|       targetPort: 8000 | ||||
							
								
								
									
										25
									
								
								.drone/helm/chart/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										25
									
								
								.drone/helm/chart/values.yaml
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,25 @@ | ||||
| name: newsite-deployment | ||||
| annotations: {} | ||||
| release: latest | ||||
| replicas: 1 | ||||
| podAnnotations: {} | ||||
| containerName: newsite | ||||
| image: dutchellie/proper-website-2:latest | ||||
| imagePullPolicy: Always | ||||
| 
 | ||||
| service: | ||||
|   name: newsite-service | ||||
|   annotations: {} | ||||
| 
 | ||||
| ingress: | ||||
|   name: newsite-ingress | ||||
|   annotations: {} | ||||
|   className: nginx | ||||
|   tls:  | ||||
|     host: example.com | ||||
|     secretName: newsite-tls   | ||||
|   hosts: | ||||
|     - host: example.com | ||||
|       paths: | ||||
|         - path: / | ||||
|           pathType: Prefix | ||||
							
								
								
									
										0
									
								
								.drone/helm/values.yaml
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										0
									
								
								.drone/helm/values.yaml
									
									
									
									
									
										Normal file
									
								
							
		Loading…
	
		Reference in New Issue
	
	Block a user