diff --git a/template/forgejo-runner/.helmignore b/template/forgejo-runner/.helmignore deleted file mode 100644 index 0e8a0eb..0000000 --- a/template/forgejo-runner/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/template/forgejo-runner/Chart.yaml b/template/forgejo-runner/Chart.yaml deleted file mode 100644 index 49a663c..0000000 --- a/template/forgejo-runner/Chart.yaml +++ /dev/null @@ -1,24 +0,0 @@ -apiVersion: v2 -name: forgejo-runner -description: A Helm chart for Kubernetes - -# A chart can be either an 'application' or a 'library' chart. -# -# Application charts are a collection of templates that can be packaged into versioned archives -# to be deployed. -# -# Library charts provide useful utilities or functions for the chart developer. They're included as -# a dependency of application charts to inject those utilities and functions into the rendering -# pipeline. Library charts do not define any templates and therefore cannot be deployed. -type: application - -# This is the chart version. This version number should be incremented each time you make changes -# to the chart and its templates, including the app version. -# Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 - -# This is the version number of the application being deployed. This version number should be -# incremented each time you make changes to the application. Versions are not expected to -# follow Semantic Versioning. They should reflect the version the application is using. -# It is recommended to use it with quotes. -appVersion: "1.16.0" diff --git a/template/forgejo-runner/templates/NOTES.txt b/template/forgejo-runner/templates/NOTES.txt deleted file mode 100644 index e2dcc06..0000000 --- a/template/forgejo-runner/templates/NOTES.txt +++ /dev/null @@ -1,7 +0,0 @@ -{{- if not .Values.registration.enabled}} -You will have to manually create a secret with the registration token, since you have not specified the registration token in the values.yaml file. - -To create a secret with the registration token, run the following command: - - kubectl create secret generic {{ include "forgejo-runner.fullname" . }}-token --from-literal=token= -{{- end}} diff --git a/template/forgejo-runner/templates/_helpers.tpl b/template/forgejo-runner/templates/_helpers.tpl deleted file mode 100644 index 7af352b..0000000 --- a/template/forgejo-runner/templates/_helpers.tpl +++ /dev/null @@ -1,62 +0,0 @@ -{{/* -Expand the name of the chart. -*/}} -{{- define "forgejo-runner.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 "forgejo-runner.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 "forgejo-runner.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{/* -Common labels -*/}} -{{- define "forgejo-runner.labels" -}} -helm.sh/chart: {{ include "forgejo-runner.chart" . }} -{{ include "forgejo-runner.selectorLabels" . }} -{{- if .Chart.AppVersion }} -app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} -{{- end }} -app.kubernetes.io/managed-by: {{ .Release.Service }} -{{- end }} - -{{/* -Selector labels -*/}} -{{- define "forgejo-runner.selectorLabels" -}} -app.kubernetes.io/name: {{ include "forgejo-runner.name" . }} -app.kubernetes.io/instance: {{ .Release.Name }} -{{- end }} - -{{/* -Create the name of the service account to use -*/}} -{{- define "forgejo-runner.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "forgejo-runner.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} -{{- end }} diff --git a/template/forgejo-runner/templates/deployment.yaml b/template/forgejo-runner/templates/deployment.yaml deleted file mode 100644 index 0134e8f..0000000 --- a/template/forgejo-runner/templates/deployment.yaml +++ /dev/null @@ -1,82 +0,0 @@ -apiVersion: apps/v1 -kind: Deployment -metadata: - labels: - {{- include "forgejo-runner.labels" . | nindent 4 }} - name: {{ include "forgejo-runner.fullname" . }} -spec: - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "forgejo-runner.selectorLabels" . | nindent 6 }} - strategy: {} - template: - metadata: - {{- with .Values.podAnnotations }} - annotations: - {{- toYaml . | nindent 8 }} - {{- end }} - labels: - {{- include "forgejo-runner.labels" . | nindent 8 }} - {{- with .Values.podLabels }} - {{- toYaml . | nindent 8 }} - {{- end }} - spec: - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - volumes: - - name: docker-certs - emptyDir: {} - - name: runner-data - emptyDir: {} - initContainers: - - name: runner-register - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - command: ["forgejo-runner", "register", "--no-interactive", "--token", $(RUNNER_SECRET), "--name", $(RUNNER_NAME), "--instance", $(FORGEJO_INSTANCE_URL)] - env: - - name: RUNNER_NAME - valueFrom: - fieldRef: - fieldPath: metadata.name - - name: RUNNER_SECRET - valueFrom: - secretKeyRef: - name: {{ include "forgejo-runner.fullname" . }}-token - key: token - - name: FORGEJO_INSTANCE_URL - value: {{ .Values.forgejoUrl }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - volumeMounts: - - name: runner-data - mountPath: /data - containers: - - name: runner - image: {{ .Values.image.repository }}:{{ .Values.image.tag }} - command: ["sh", "-c", "while ! nc -z localhost 2376