Skip to content

Commit 18f87db

Browse files
committed
[lb] add hetzner robotlb balancer
Signed-off-by: IvanHunters <[email protected]>
1 parent 65e3b74 commit 18f87db

15 files changed

Lines changed: 383 additions & 0 deletions

File tree

‎packages/core/platform/bundles/distro-full.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -258,3 +258,9 @@ releases:
258258
privileged: true
259259
optional: true
260260
dependsOn: [cilium]
261+
262+
- name: hetzner-robotlb
263+
releaseName: robotlb
264+
optional: true
265+
chart: cozy-hetzner-robotlb
266+
namespace: cozy-hetzner-robotlb

‎packages/core/platform/bundles/distro-hosted.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -171,3 +171,9 @@ releases:
171171
namespace: cozy-velero
172172
privileged: true
173173
optional: true
174+
175+
- name: hetzner-robotlb
176+
releaseName: robotlb
177+
optional: true
178+
chart: cozy-hetzner-robotlb
179+
namespace: cozy-hetzner-robotlb

‎packages/core/platform/bundles/paas-full.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -415,3 +415,9 @@ releases:
415415
privileged: true
416416
optional: true
417417
dependsOn: [monitoring-agents]
418+
419+
- name: hetzner-robotlb
420+
releaseName: robotlb
421+
optional: true
422+
chart: cozy-hetzner-robotlb
423+
namespace: cozy-hetzner-robotlb

‎packages/core/platform/bundles/paas-hosted.yaml‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,3 +238,9 @@ releases:
238238
privileged: true
239239
optional: true
240240
dependsOn: [monitoring-agents]
241+
242+
- name: hetzner-robotlb
243+
releaseName: robotlb
244+
optional: true
245+
chart: cozy-hetzner-robotlb
246+
namespace: cozy-hetzner-robotlb
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
apiVersion: v2
2+
name: hetzner-robotlb
3+
version: 0.1.3 # Placeholder, the actual version will be automatically set during the build process
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
export NAME=hetzner-robotlb
2+
export NAMESPACE=cozy-$(NAME)
3+
4+
include ../../../scripts/package.mk
5+
6+
update:
7+
rm -rf charts
8+
mkdir -p charts
9+
helm pull oci://ghcr.io/intreecom/charts/robotlb --untar --untardir charts
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Patterns to ignore when building packages.
2+
# This supports shell glob matching, relative path matching, and
3+
# negation (prefixed with !). Only one pattern per line.
4+
.DS_Store
5+
# Common VCS dirs
6+
.git/
7+
.gitignore
8+
.bzr/
9+
.bzrignore
10+
.hg/
11+
.hgignore
12+
.svn/
13+
# Common backup files
14+
*.swp
15+
*.bak
16+
*.tmp
17+
*.orig
18+
*~
19+
# Various IDEs
20+
.project
21+
.idea/
22+
*.tmproj
23+
.vscode/
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
apiVersion: v2
2+
appVersion: 0.0.5
3+
description: A Helm chart for robotlb (loadbalancer on hetzner cloud).
4+
name: robotlb
5+
type: application
6+
version: 0.1.3
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
The RobotLB Operator was successfully installed.
2+
Please follow the readme to create loadbalanced services.
3+
4+
README: https://github.com/intreecom/robotlb
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
{{/*
2+
Expand the name of the chart.
3+
*/}}
4+
{{- define "robotlb.name" -}}
5+
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
6+
{{- end }}
7+
8+
{{/*
9+
Create a default fully qualified app name.
10+
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
11+
If release name contains chart name it will be used as a full name.
12+
*/}}
13+
{{- define "robotlb.fullname" -}}
14+
{{- if .Values.fullnameOverride }}
15+
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
16+
{{- else }}
17+
{{- $name := default .Chart.Name .Values.nameOverride }}
18+
{{- if contains $name .Release.Name }}
19+
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
20+
{{- else }}
21+
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
22+
{{- end }}
23+
{{- end }}
24+
{{- end }}
25+
26+
{{/*
27+
Create chart name and version as used by the chart label.
28+
*/}}
29+
{{- define "robotlb.chart" -}}
30+
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
31+
{{- end }}
32+
33+
{{/*
34+
Common labels
35+
*/}}
36+
{{- define "robotlb.labels" -}}
37+
helm.sh/chart: {{ include "robotlb.chart" . }}
38+
{{ include "robotlb.selectorLabels" . }}
39+
{{- if .Chart.AppVersion }}
40+
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
41+
{{- end }}
42+
app.kubernetes.io/managed-by: {{ .Release.Service }}
43+
{{- end }}
44+
45+
{{/*
46+
Selector labels
47+
*/}}
48+
{{- define "robotlb.selectorLabels" -}}
49+
app.kubernetes.io/name: {{ include "robotlb.name" . }}
50+
app.kubernetes.io/instance: {{ .Release.Name }}
51+
{{- end }}
52+
53+
{{/*
54+
Create the name of the service account to use
55+
*/}}
56+
{{- define "robotlb.serviceAccountName" -}}
57+
{{- if .Values.serviceAccount.create }}
58+
{{- default (include "robotlb.fullname" .) .Values.serviceAccount.name }}
59+
{{- else }}
60+
{{- default "default" .Values.serviceAccount.name }}
61+
{{- end }}
62+
{{- end }}

0 commit comments

Comments
 (0)