diff --git a/helm/proxlb/Chart.yaml b/helm/proxlb/Chart.yaml new file mode 100644 index 0000000..1ad42f0 --- /dev/null +++ b/helm/proxlb/Chart.yaml @@ -0,0 +1,24 @@ +apiVersion: v3 +name: proxlb +description: A Helm chart for self-hosted ProxLB + +# 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: "1.1.5" + +# 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: "v1.1.5" \ No newline at end of file diff --git a/helm/proxlb/templates/_helpers.yaml b/helm/proxlb/templates/_helpers.yaml new file mode 100644 index 0000000..03dfba1 --- /dev/null +++ b/helm/proxlb/templates/_helpers.yaml @@ -0,0 +1,4 @@ +{{ define "proxlb.fullname" }} +{{ .Release.Name }}-{{ .Chart.Name }} +{{ end }} + diff --git a/helm/proxlb/templates/configmap.yaml b/helm/proxlb/templates/configmap.yaml new file mode 100644 index 0000000..c8acf94 --- /dev/null +++ b/helm/proxlb/templates/configmap.yaml @@ -0,0 +1,15 @@ +{{- if .Values.configmap.create }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: proxlb-config + labels: + app.kubernetes.io/name: "{{ .Release.Name }}" + app.kubernetes.io/instance: "{{ .Chart.Name }}" + app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} + app.kubernetes.io/part-of: proxlb + app.kubernetes.io/managed-by: Helm +data: + proxlb.yaml: | +{{ toYaml .Values.configmap.config | indent 4 }} +{{ end }} \ No newline at end of file diff --git a/helm/proxlb/templates/deployment.yaml b/helm/proxlb/templates/deployment.yaml new file mode 100644 index 0000000..0ada34c --- /dev/null +++ b/helm/proxlb/templates/deployment.yaml @@ -0,0 +1,36 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: {{ .Release.Name }} + labels: + app.kubernetes.io/name: "{{ .Release.Name }}" +spec: + replicas: 1 # Number of replicas cannot be more than 1 + selector: + matchLabels: + app.kubernetes.io/name: "{{ .Release.Name }}" + template: + metadata: + labels: + app.kubernetes.io/name: "{{ .Release.Name }}" + spec: + {{- with .Values.image.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + containers: + - name: proxlb + image: "{{ .Values.image.registry }}/{{ .Values.image.repository }}:{{ .Values.image.tag }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + args: + {{- if .Values.extraArgs.dryRun }} + - --dry-run + {{- end }} + volumeMounts: + - name: config + mountPath: /etc/proxlb/proxlb.yaml + subPath: proxlb.yaml + volumes: + - name: config + configMap: + name: proxlb-config \ No newline at end of file diff --git a/helm/proxlb/values.yaml b/helm/proxlb/values.yaml new file mode 100644 index 0000000..ac6fb82 --- /dev/null +++ b/helm/proxlb/values.yaml @@ -0,0 +1,47 @@ +image: + registry: cr.gyptazy.com + repository: proxlb/proxlb + tag: v1.1.5 + pullPolicy: IfNotPresent + imagePullSecrets: [ ] + +extraArgs: + dryRun: false + +configmap: + create: true + config: + proxmox_api: + hosts: [] + user: "" + pass: "" + ssl_verification: True + timeout: 10 + proxmox_cluster: + maintenance_nodes: [ ] + ignore_nodes: [ ] + overprovisioning: True + balancing: + enable: True + enforce_affinity: False + parallel: False + # If running parallel job, you can define + # the amount of prallel jobs (default: 5) + parallel_jobs: 1 + live: True + with_local_disks: True + balance_types: [ 'vm', 'ct' ] + max_job_validation: 1800 + balanciness: 5 + method: memory + mode: used + service: + daemon: True + schedule: + interval: 12 + format: "hours" + delay: + enable: False + time: 1 + format: "hours" + log_level: INFO \ No newline at end of file