Update helm chart to support actions metrics graceful termiantion (#2498)
# Summary - add lifecycle, terminationGracePeriodSeconds, and loadBalancerSource ranges to metrics server - these were missed when copying from the other webhook server - original PR adding them to the other webhook server is here https://github.com/actions/actions-runner-controller/pull/2305 Co-authored-by: Yusuke Kuoka <ykuoka@gmail.com>
This commit is contained in:
		
							parent
							
								
									21722a5de8
								
							
						
					
					
						commit
						942f773fef
					
				|  | @ -102,8 +102,11 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | ||||||
| | `githubWebhookServer.tolerations`                        | Set the githubWebhookServer pod tolerations                                                                                               |                                                                                                 | | | `githubWebhookServer.tolerations`                        | Set the githubWebhookServer pod tolerations                                                                                               |                                                                                                 | | ||||||
| | `githubWebhookServer.affinity`                           | Set the githubWebhookServer pod affinity rules                                                                                            |                                                                                                 | | | `githubWebhookServer.affinity`                           | Set the githubWebhookServer pod affinity rules                                                                                            |                                                                                                 | | ||||||
| | `githubWebhookServer.priorityClassName`                  | Set the githubWebhookServer pod priorityClassName                                                                                         |                                                                                                 | | | `githubWebhookServer.priorityClassName`                  | Set the githubWebhookServer pod priorityClassName                                                                                         |                                                                                                 | | ||||||
|  | | `githubWebhookServer.terminationGracePeriodSeconds`      | Set the githubWebhookServer pod terminationGracePeriodSeconds. Useful when using preStop hooks to drain/sleep.                            | `10`                                                                                            | | ||||||
|  | | `githubWebhookServer.lifecycle`                          | Set the githubWebhookServer pod lifecycle hooks                                                                                           | `{}`                                                                                            | | ||||||
| | `githubWebhookServer.service.type`                       | Set githubWebhookServer service type                                                                                                      |                                                                                                 | | | `githubWebhookServer.service.type`                       | Set githubWebhookServer service type                                                                                                      |                                                                                                 | | ||||||
| | `githubWebhookServer.service.ports`                      | Set githubWebhookServer service ports                                                                                                     | `[{"port":80, "targetPort:"http", "protocol":"TCP", "name":"http"}]`                            | | | `githubWebhookServer.service.ports`                      | Set githubWebhookServer service ports                                                                                                     | `[{"port":80, "targetPort:"http", "protocol":"TCP", "name":"http"}]`                            | | ||||||
|  | | `githubWebhookServer.service.loadBalancerSourceRanges`   | Set githubWebhookServer loadBalancerSourceRanges for restricting loadBalancer type services                                               | `[]`                                                                                            | | ||||||
| | `githubWebhookServer.ingress.enabled`                    | Deploy an ingress kind for the githubWebhookServer                                                                                        | false                                                                                           | | | `githubWebhookServer.ingress.enabled`                    | Deploy an ingress kind for the githubWebhookServer                                                                                        | false                                                                                           | | ||||||
| | `githubWebhookServer.ingress.annotations`                | Set annotations for the ingress kind                                                                                                      |                                                                                                 | | | `githubWebhookServer.ingress.annotations`                | Set annotations for the ingress kind                                                                                                      |                                                                                                 | | ||||||
| | `githubWebhookServer.ingress.hosts`                      | Set hosts configuration for ingress                                                                                                       | `[{"host": "chart-example.local", "paths": []}]`                                                | | | `githubWebhookServer.ingress.hosts`                      | Set hosts configuration for ingress                                                                                                       | `[{"host": "chart-example.local", "paths": []}]`                                                | | ||||||
|  | @ -135,8 +138,11 @@ All additional docs are kept in the `docs/` folder, this README is solely for do | ||||||
| | `actionsMetricsServer.tolerations`                        | Set the actionsMetricsServer pod tolerations                                                                                               |                                                                                                 | | | `actionsMetricsServer.tolerations`                        | Set the actionsMetricsServer pod tolerations                                                                                               |                                                                                                 | | ||||||
| | `actionsMetricsServer.affinity`                           | Set the actionsMetricsServer pod affinity rules                                                                                            |                                                                                                 | | | `actionsMetricsServer.affinity`                           | Set the actionsMetricsServer pod affinity rules                                                                                            |                                                                                                 | | ||||||
| | `actionsMetricsServer.priorityClassName`                  | Set the actionsMetricsServer pod priorityClassName                                                                                         |                                                                                                 | | | `actionsMetricsServer.priorityClassName`                  | Set the actionsMetricsServer pod priorityClassName                                                                                         |                                                                                                 | | ||||||
|  | | `actionsMetricsServer.terminationGracePeriodSeconds`      | Set the actionsMetricsServer pod terminationGracePeriodSeconds. Useful when using preStop hooks to drain/sleep.                           | `10`                                                                                            | | ||||||
|  | | `actionsMetricsServer.lifecycle`                          | Set the actionsMetricsServer pod lifecycle hooks                                                                                          | `{}`                                                                                            | | ||||||
| | `actionsMetricsServer.service.type`                       | Set actionsMetricsServer service type                                                                                                      |                                                                                                 | | | `actionsMetricsServer.service.type`                       | Set actionsMetricsServer service type                                                                                                      |                                                                                                 | | ||||||
| | `actionsMetricsServer.service.ports`                      | Set actionsMetricsServer service ports                                                                                                     | `[{"port":80, "targetPort:"http", "protocol":"TCP", "name":"http"}]`                            | | | `actionsMetricsServer.service.ports`                      | Set actionsMetricsServer service ports                                                                                                     | `[{"port":80, "targetPort:"http", "protocol":"TCP", "name":"http"}]`                            | | ||||||
|  | | `actionsMetricsServer.service.loadBalancerSourceRanges`   | Set actionsMetricsServer loadBalancerSourceRanges for restricting loadBalancer type services                                              | `[]`                                                                                            | | ||||||
| | `actionsMetricsServer.ingress.enabled`                    | Deploy an ingress kind for the actionsMetricsServer                                                                                        | false                                                                                           | | | `actionsMetricsServer.ingress.enabled`                    | Deploy an ingress kind for the actionsMetricsServer                                                                                        | false                                                                                           | | ||||||
| | `actionsMetricsServer.ingress.annotations`                | Set annotations for the ingress kind                                                                                                      |                                                                                                 | | | `actionsMetricsServer.ingress.annotations`                | Set annotations for the ingress kind                                                                                                      |                                                                                                 | | ||||||
| | `actionsMetricsServer.ingress.hosts`                      | Set hosts configuration for ingress                                                                                                       | `[{"host": "chart-example.local", "paths": []}]`                                                | | | `actionsMetricsServer.ingress.hosts`                      | Set hosts configuration for ingress                                                                                                       | `[{"host": "chart-example.local", "paths": []}]`                                                | | ||||||
|  |  | ||||||
|  | @ -50,6 +50,12 @@ spec: | ||||||
|         {{- end }} |         {{- end }} | ||||||
|         command: |         command: | ||||||
|         - "/actions-metrics-server" |         - "/actions-metrics-server" | ||||||
|  |         {{- if .Values.actionsMetricsServer.lifecycle }} | ||||||
|  |         {{- with .Values.actionsMetricsServer.lifecycle }} | ||||||
|  |         lifecycle: | ||||||
|  |           {{- toYaml . | nindent 10 }} | ||||||
|  |         {{- end }} | ||||||
|  |         {{- end }} | ||||||
|         env: |         env: | ||||||
|         - name: GITHUB_WEBHOOK_SECRET_TOKEN |         - name: GITHUB_WEBHOOK_SECRET_TOKEN | ||||||
|           valueFrom: |           valueFrom: | ||||||
|  | @ -142,7 +148,7 @@ spec: | ||||||
|         securityContext: |         securityContext: | ||||||
|           {{- toYaml .Values.securityContext | nindent 12 }} |           {{- toYaml .Values.securityContext | nindent 12 }} | ||||||
|       {{- end }} |       {{- end }} | ||||||
|       terminationGracePeriodSeconds: 10 |       terminationGracePeriodSeconds: {{ .Values.actionsMetricsServer.terminationGracePeriodSeconds }} | ||||||
|       {{- with .Values.actionsMetricsServer.nodeSelector }} |       {{- with .Values.actionsMetricsServer.nodeSelector }} | ||||||
|       nodeSelector: |       nodeSelector: | ||||||
|         {{- toYaml . | nindent 8 }} |         {{- toYaml . | nindent 8 }} | ||||||
|  |  | ||||||
|  | @ -23,4 +23,10 @@ spec: | ||||||
|     {{- end }} |     {{- end }} | ||||||
|   selector: |   selector: | ||||||
|     {{- include "actions-runner-controller-actions-metrics-server.selectorLabels" . | nindent 4 }} |     {{- include "actions-runner-controller-actions-metrics-server.selectorLabels" . | nindent 4 }} | ||||||
|  |   {{- if .Values.actionsMetricsServer.service.loadBalancerSourceRanges }} | ||||||
|  |   loadBalancerSourceRanges: | ||||||
|  |     {{- range $ip := .Values.actionsMetricsServer.service.loadBalancerSourceRanges }} | ||||||
|  |     - {{ $ip -}} | ||||||
|  |     {{- end }} | ||||||
|  |   {{- end }} | ||||||
| {{- end }} | {{- end }} | ||||||
|  |  | ||||||
|  | @ -360,6 +360,7 @@ actionsMetricsServer: | ||||||
|         protocol: TCP |         protocol: TCP | ||||||
|         name: http |         name: http | ||||||
|         #nodePort: someFixedPortForUseWithTerraformCdkCfnEtc |         #nodePort: someFixedPortForUseWithTerraformCdkCfnEtc | ||||||
|  |     loadBalancerSourceRanges: [] | ||||||
|   ingress: |   ingress: | ||||||
|     enabled: false |     enabled: false | ||||||
|     ingressClassName: "" |     ingressClassName: "" | ||||||
|  | @ -389,4 +390,5 @@ actionsMetricsServer: | ||||||
|     #  - secretName: chart-example-tls |     #  - secretName: chart-example-tls | ||||||
|     #    hosts: |     #    hosts: | ||||||
|     #      - chart-example.local |     #      - chart-example.local | ||||||
| 
 |   terminationGracePeriodSeconds: 10 | ||||||
|  |   lifecycle: {} | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue