-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding the hetzner-robot KubeAid App
- Loading branch information
Deepak Tiwari
authored and
Archisman
committed
Dec 19, 2024
1 parent
8fb9ab2
commit 26b6539
Showing
8 changed files
with
102 additions
and
4 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
apiVersion: v2 | ||
name: hetzner | ||
name: capi-cluster for hetzner provider | ||
version: 1.0.0 |
9 changes: 7 additions & 2 deletions
9
...rts/capi-cluster/charts/hetzner/Readme.md → ...rts/capi-cluster/charts/hetzner/README.md
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,7 +1,12 @@ | ||
## Hetzner K8s cluster via cluster-api | ||
|
||
## Setup | ||
|
||
```sh | ||
kubeaid-bootstrap | ||
``` | ||
|
||
## Improvements | ||
|
||
* Floating IP should be automatically pointing to current working node (the first node that got provisioned) | ||
* Floating IP should be automatically pointing to current working node (the first node that got provisioned) [Comlpeted] | ||
* Add option in kubeadmcontrolplane to remove taints (its supported in crd) | ||
* |
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,6 +1,9 @@ | ||
controlPlaneLoadBalancer: | ||
enabled: true | ||
|
||
controlPlaneEndpoint: | ||
port: 6443 | ||
|
||
robot: | ||
floating: false | ||
|
||
|
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,2 @@ | ||
secret: | ||
name: cloud-credentials |
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,6 @@ | ||
apiVersion: v2 | ||
name: hetzner-robot | ||
description: | | ||
A Helm Chart to support automatic k8s floating IP failover, on hetzner physical servers. | ||
version: 0.1.0 | ||
appVersion: "1.0.0" |
70 changes: 70 additions & 0 deletions
70
argocd-helm-charts/hetzner-robot/templates/deployment.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,70 @@ | ||
--- | ||
{{- if .Values.failoverIP | trim | eq "" }} | ||
{{- fail "failoverIP must be provided" }} | ||
{{- end }} | ||
|
||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Release.Name }}-failover | ||
labels: | ||
app: {{ .Release.Name }}-failover | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ .Release.Name }}-failover | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Release.Name }}-failover | ||
spec: | ||
containers: | ||
- name: {{ .Release.Name }}-failover | ||
image: {{ .Values.image.repository }}:{{ .Values.image.tag }} | ||
env: | ||
- name: FAILOVER_IP | ||
value: {{ .Values.failoverIP }} | ||
- name: NODE_IP | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: status.hostIP | ||
- name: INTERVAL | ||
value: "{{ .Values.interval }}" | ||
- name: API_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .cloudCredentialsSecretName }} | ||
key: robot-user | ||
- name: API_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .cloudCredentialsSecretName }} | ||
key: robot-password | ||
- name: API_TOKEN | ||
valueFrom: | ||
secretKeyRef: | ||
name: {{ .cloudCredentialsSecretName }} | ||
key: hcloud | ||
livenessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- "pgrep hetzner-failover" | ||
initialDelaySeconds: 30 | ||
periodSeconds: 10 | ||
timeoutSeconds: 5 | ||
failureThreshold: 3 | ||
readinessProbe: | ||
exec: | ||
command: | ||
- /bin/sh | ||
- -c | ||
- "pgrep hetzner-failover" | ||
initialDelaySeconds: 15 | ||
periodSeconds: 5 | ||
timeoutSeconds: 5 | ||
failureThreshold: 3 | ||
nodeSelector: | ||
node-role.kubernetes.io/control-plane: "" |
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,12 @@ | ||
--- | ||
image: | ||
repository: ghcr.io/obmondo/hetzner-robot | ||
tag: v1.0.0 | ||
|
||
# Failover IP that pod will manage | ||
failoverIP: "" | ||
|
||
# Interval to check the failover IP is running on the node, where pod is running | ||
interval: 60s | ||
|
||
cloudCredentialsSecretName: cloud-credentials |