-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(helm): Add registry-mirror configuration (#2)
* feat(helm): Add registry-mirror configuration * fix(values): Modify values * feat(values): Remove XDG_CONFIG_HOME env variable * feat(helm): Apply comments * feat: Bump chart to 0.2.0
- Loading branch information
Showing
4 changed files
with
41 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,9 @@ | ||
# bitbucket-runner-autoscaler | ||
|
||
|
||
Chart for deploying Bitbucket Runner Autoscaler. | ||
|
||
![Version: 0.1.0](https://img.shields.io/badge/Version-0.1.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.7.0](https://img.shields.io/badge/AppVersion-3.7.0-informational?style=flat-square) | ||
![Version: 0.2.0](https://img.shields.io/badge/Version-0.2.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 3.7.0](https://img.shields.io/badge/AppVersion-3.7.0-informational?style=flat-square) | ||
|
||
## About | ||
bitbucket-runner-autoscaler Helm chart | ||
|
@@ -66,10 +67,12 @@ bitbucket-runner-autoscaler Helm chart | |
| runner.config.groups[0].parameters.scale_up_threshold | float | `0.5` | | | ||
| runner.config.groups[0].strategy | string | `"percentageRunnersIdle"` | | | ||
| runner.config.groups[0].workspace | string | `""` | | | ||
| runner.dind.daemonConfigFile | string | `"/etc/docker/daemon.json"` | | | ||
| runner.dind.image.pullPolicy | string | `"IfNotPresent"` | | | ||
| runner.dind.image.registry | string | `"docker.io"` | | | ||
| runner.dind.image.repository | string | `"docker"` | | | ||
| runner.dind.image.tag | string | `"dind"` | | | ||
| runner.dind.registryMirrors | list | `[]` | | | ||
| runner.image.pullPolicy | string | `"IfNotPresent"` | | | ||
| runner.image.registry | string | `"docker-public.packages.atlassian.com"` | | | ||
| runner.image.repository | string | `"sox/atlassian/bitbucket-pipelines-runner"` | | | ||
|
@@ -79,19 +82,24 @@ bitbucket-runner-autoscaler Helm chart | |
| runner.serviceAccount.annotations | object | `{}` | | | ||
| runner.serviceAccount.create | bool | `true` | | | ||
| runner.serviceAccount.name | string | `""` | | | ||
| runner.template.job | string | `"apiVersion: batch/v1\nkind: Job\nmetadata:\n name: runner-<%runner_uuid%> # mandatory, don't modify\nspec:\n template:\n metadata:\n labels:\n customer: shared\n account_uuid: <%account_uuid%> # mandatory, don't modify\n runner_uuid: <%runner_uuid%> # mandatory, don't modify\n {%- if repository_uuid %}\n repository_uuid: <%repository_uuid%> # mandatory, don't modify\n {%- endif %}\n runner_namespace: <%runner_namespace%> # mandatory, don't modify\n spec:\n tolerations: {{ include \"bitbucketRunnerAutoscaler.runnerTolerations\" . | nindent 16 }}\n nodeSelector: {{ include \"bitbucketRunnerAutoscaler.runnerNodeSelector\" . | nindent 16 }}\n topologySpreadConstraints: {{ .Values.runner.topologySpreadConstraints | toYaml | nindent 16 }}\n affinity: {{ .Values.runner.affinity | toYaml | nindent 16 }}\n priorityClassName: {{ .Values.runner.priorityClassName }}\n serviceAccountName: {{ include \"bitbucketRunnerAutoscaler.fullname\" . }}-runner\n containers:\n - name: runner\n image: {{ include \"bitbucketRunnerAutoscaler.runnerImage\" . }} # This autoscaler needs the runner image to run, you can use the latest or pin any version you want.\n imagePullPolicy: {{ .Values.runner.image.pullPolicy }}\n resources: # This is memory and cpu resources section that you can configure via config map settings file.\n requests:\n memory: \"<%requests_memory%>\" # mandatory, don't modify\n cpu: \"<%requests_cpu%>\" # mandatory, don't modify\n limits:\n memory: \"<%limits_memory%>\" # mandatory, don't modify\n cpu: \"<%limits_cpu%>\" # mandatory, don't modify\n env:\n - name: ACCOUNT_UUID # mandatory, don't modify\n value: \"{<%account_uuid%>}\" # mandatory, don't modify\n {%- if repository_uuid %}\n - name: REPOSITORY_UUID # mandatory, don't modify\n value: \"{<%repository_uuid%>}\" # mandatory, don't modify\n {%- endif %}\n - name: RUNNER_UUID # mandatory, don't modify\n value: \"{<%runner_uuid%>}\" # mandatory, don't modify\n - name: OAUTH_CLIENT_ID\n valueFrom:\n secretKeyRef:\n name: runner-oauth-credentials-<%runner_uuid%>\n key: oauth_client_id\n - name: OAUTH_CLIENT_SECRET\n valueFrom:\n secretKeyRef:\n name: runner-oauth-credentials-<%runner_uuid%>\n key: oauth_client_secret\n - name: WORKING_DIRECTORY\n value: \"/tmp\"\n volumeMounts:\n - name: tmp\n mountPath: /tmp\n - name: docker-containers\n mountPath: /var/lib/docker/containers\n readOnly: true\n - name: var-run\n mountPath: /var/run\n - name: docker\n image: {{ include \"bitbucketRunnerAutoscaler.dindImage\" . }}\n imagePullPolicy: {{ .Values.runner.dind.image.pullPolicy }}\n securityContext:\n privileged: true\n volumeMounts:\n - name: tmp\n mountPath: /tmp\n - name: docker-containers\n mountPath: /var/lib/docker/containers\n - name: var-run\n mountPath: /var/run\n restartPolicy: OnFailure\n volumes:\n - name: tmp\n - name: docker-containers\n - name: var-run\n backoffLimit: 6\n completions: 1\n parallelism: 1\n"` | | | ||
| runner.template.job | string | `"apiVersion: batch/v1\nkind: Job\nmetadata:\n name: runner-<%runner_uuid%> # mandatory, don't modify\nspec:\n template:\n metadata:\n labels:\n customer: shared\n account_uuid: <%account_uuid%> # mandatory, don't modify\n runner_uuid: <%runner_uuid%> # mandatory, don't modify\n {%- if repository_uuid %}\n repository_uuid: <%repository_uuid%> # mandatory, don't modify\n {%- endif %}\n runner_namespace: <%runner_namespace%> # mandatory, don't modify\n spec:\n tolerations: {{ include \"bitbucketRunnerAutoscaler.runnerTolerations\" . | nindent 16 }}\n nodeSelector: {{ include \"bitbucketRunnerAutoscaler.runnerNodeSelector\" . | nindent 16 }}\n topologySpreadConstraints: {{ .Values.runner.topologySpreadConstraints | toYaml | nindent 16 }}\n affinity: {{ .Values.runner.affinity | toYaml | nindent 16 }}\n priorityClassName: {{ .Values.runner.priorityClassName }}\n serviceAccountName: {{ include \"bitbucketRunnerAutoscaler.fullname\" . }}-runner\n containers:\n - name: runner\n image: {{ include \"bitbucketRunnerAutoscaler.runnerImage\" . }} # This autoscaler needs the runner image to run, you can use the latest or pin any version you want.\n imagePullPolicy: {{ .Values.runner.image.pullPolicy }}\n resources: # This is memory and cpu resources section that you can configure via config map settings file.\n requests:\n memory: \"<%requests_memory%>\" # mandatory, don't modify\n cpu: \"<%requests_cpu%>\" # mandatory, don't modify\n limits:\n memory: \"<%limits_memory%>\" # mandatory, don't modify\n cpu: \"<%limits_cpu%>\" # mandatory, don't modify\n env:\n - name: ACCOUNT_UUID # mandatory, don't modify\n value: \"{<%account_uuid%>}\" # mandatory, don't modify\n {%- if repository_uuid %}\n - name: REPOSITORY_UUID # mandatory, don't modify\n value: \"{<%repository_uuid%>}\" # mandatory, don't modify\n {%- endif %}\n - name: RUNNER_UUID # mandatory, don't modify\n value: \"{<%runner_uuid%>}\" # mandatory, don't modify\n - name: OAUTH_CLIENT_ID\n valueFrom:\n secretKeyRef:\n name: runner-oauth-credentials-<%runner_uuid%>\n key: oauth_client_id\n - name: OAUTH_CLIENT_SECRET\n valueFrom:\n secretKeyRef:\n name: runner-oauth-credentials-<%runner_uuid%>\n key: oauth_client_secret\n - name: WORKING_DIRECTORY\n value: \"/tmp\"\n volumeMounts:\n - name: tmp\n mountPath: /tmp\n - name: docker-containers\n mountPath: /var/lib/docker/containers\n readOnly: true\n - name: var-run\n mountPath: /var/run\n - name: docker\n image: {{ include \"bitbucketRunnerAutoscaler.dindImage\" . }}\n imagePullPolicy: {{ .Values.runner.dind.image.pullPolicy }}\n securityContext:\n privileged: true\n volumeMounts:\n - name: tmp\n mountPath: /tmp\n - name: docker-containers\n mountPath: /var/lib/docker/containers\n - name: var-run\n mountPath: /var/run\n {{- if .Values.runner.dind.registryMirrors }}\n - name: dind\n mountPath: {{ .Values.runner.dind.daemonConfigFile }}\n subPath: daemon.json\n {{- end }}\n restartPolicy: OnFailure\n volumes:\n - name: tmp\n - name: docker-containers\n - name: var-run\n {{- if .Values.runner.dind.registryMirrors }}\n - name: dind\n configMap:\n name: {{ include \"bitbucketRunnerAutoscaler.fullname\" . }}-dind\n {{- end }}\n backoffLimit: 6\n completions: 1\n parallelism: 1\n"` | | | ||
| runner.template.secret | string | `"apiVersion: v1\nkind: Secret\nmetadata:\n name: runner-oauth-credentials-<%runner_uuid%> # mandatory, don't modify\n labels:\n account_uuid: <%account_uuid%> # mandatory, don't modify\n{%- if repository_uuid %}\n repository_uuid: <%repository_uuid%> # mandatory, don't modify\n{%- endif %}\n runner_uuid: <%runner_uuid%> # mandatory, don't modify\n runner_namespace: <%runner_namespace%> # mandatory, don't modify\ndata:\n oauth_client_id: <%oauth_client_id_base64%>\n oauth_client_secret: <%oauth_client_secret_base64%>\n"` | | | ||
| runner.tolerations | list | `[]` | | | ||
| runner.topologySpreadConstraints | list | `[]` | | | ||
| serviceAccount.annotations | object | `{}` | | | ||
| serviceAccount.create | bool | `true` | | | ||
| serviceAccount.name | string | `""` | | | ||
|
||
|
||
|
||
|
||
|
||
## Maintainers | ||
|
||
| Name | Email | Url | | ||
| ---- | ------ | --- | | ||
| Labyrinth Labs | <[email protected]> | <https://lablabs.io> | | ||
|
||
|
||
---------------------------------------------- | ||
Autogenerated from chart metadata using [helm-docs v1.14.2](https://github.com/norwoodj/helm-docs/releases/v1.14.2) |
18 changes: 18 additions & 0 deletions
18
charts/bitbucket-runner-autoscaler/templates/configmap-dind.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if .Values.runner.dind.registryMirrors }} | ||
{{- include "bitbucketRunnerAutoscaler.runnerNamespaces" . }} | ||
{{- range $namespace := .RunnerNamespaces }} | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ include "bitbucketRunnerAutoscaler.fullname" $ }}-dind | ||
namespace: {{ $namespace }} | ||
labels: | ||
{{- include "bitbucketRunnerAutoscaler.labels" $ | nindent 4 }} | ||
data: | ||
daemon.json: | | ||
{ | ||
"registry-mirrors": {{ $.Values.runner.dind.registryMirrors | toJson }} | ||
} | ||
{{- end }} | ||
{{- end }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters