-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2610522
commit aaa7b80
Showing
11 changed files
with
240 additions
and
12 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
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 @@ | ||
name: network-tools | ||
description: Debugging Tools / Pods | ||
version: 0.1.0 | ||
apiVersion: v2 | ||
appVersion: 1.0.0 | ||
keywords: | ||
- network | ||
- tools | ||
- development | ||
sources: | ||
- https://github.com/EugenMayer/helm-charts/tree/main/charts/network-tools | ||
home: ttps://github.com/EugenMayer/helm-charts/tree/main/charts/network-tools |
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,9 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
apt update | ||
apt install -y curl wget iperf3 inetutils-ping telnet dnsutils procps | ||
|
||
echo "run iperf3 on port 5201" | ||
exec iperf3 -s -p 5201 |
6 changes: 6 additions & 0 deletions
6
charts/network-tools/templates/boostrap-wrapper-script-configmap.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,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: boostrap-wrapper-script | ||
data: | ||
{{ (.Files.Glob "scripts/bootstrap.sh").AsConfig | indent 2 }} |
65 changes: 65 additions & 0 deletions
65
charts/network-tools/templates/debian-morty-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,65 @@ | ||
{{- if .Values.pods.morty.enabled -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: debian-morty | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
pickle: morty | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
template: | ||
metadata: | ||
labels: | ||
pickle: morty | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
spec: | ||
containers: | ||
- name: debian-morty | ||
image: debian:bullseye | ||
command: ["/bin/bash"] | ||
args: ["/custom-scripts/bootstrap.sh"] | ||
volumeMounts: | ||
- name: boostrap-wrapper-script | ||
mountPath: /custom-scripts | ||
{{- if and .Values.persistence.enabled }} | ||
- mountPath: /mnt | ||
name: tmp | ||
{{ end }} | ||
ports: | ||
- name: iperf3 | ||
containerPort: 5201 | ||
protocol: TCP | ||
{{- if and .Values.strictPodPlacement.enabled }} | ||
nodeName: {{ .Values.strictPodPlacement.mortyAgent }} | ||
{{ else }} | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 100 | ||
podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: pickle | ||
operator: In | ||
values: | ||
- morty | ||
topologyKey: beta.kubernetes.io/instance-type | ||
{{ end }} | ||
volumes: | ||
{{- if and .Values.persistence.enabled }} | ||
- name: tmp | ||
persistentVolumeClaim: | ||
claimName: network-tools-storage-tmp | ||
{{ end }} | ||
- name: boostrap-wrapper-script | ||
configMap: | ||
name: boostrap-wrapper-script | ||
{{- end }} |
65 changes: 65 additions & 0 deletions
65
charts/network-tools/templates/debian-rick-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,65 @@ | ||
{{- if .Values.pods.ricl.enabled -}} | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: debian-rick | ||
namespace: {{ .Release.Namespace }} | ||
labels: | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
pickle: rick | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
template: | ||
metadata: | ||
labels: | ||
pickle: rick | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
spec: | ||
containers: | ||
- name: debian-rick | ||
image: debian:bullseye | ||
command: ["/bin/bash"] | ||
args: ["/custom-scripts/bootstrap.sh"] | ||
volumeMounts: | ||
- name: boostrap-wrapper-script | ||
mountPath: /custom-scripts | ||
{{- if and .Values.persistence.enabled }} | ||
- mountPath: /mnt | ||
name: tmp | ||
{{ end }} | ||
ports: | ||
- name: iperf3 | ||
containerPort: 5201 | ||
protocol: TCP | ||
{{- if and .Values.strictPodPlacement.enabled }} | ||
nodeName: {{ .Values.strictPodPlacement.rickAgent }} | ||
{{ else }} | ||
affinity: | ||
podAntiAffinity: | ||
preferredDuringSchedulingIgnoredDuringExecution: | ||
- weight: 100 | ||
podAffinityTerm: | ||
labelSelector: | ||
matchExpressions: | ||
- key: pickle | ||
operator: In | ||
values: | ||
- morty | ||
topologyKey: beta.kubernetes.io/instance-type | ||
{{ end }} | ||
volumes: | ||
{{- if and .Values.persistence.enabled }} | ||
- name: tmp | ||
persistentVolumeClaim: | ||
claimName: network-tools-storage-tmp | ||
{{ end }} | ||
- name: boostrap-wrapper-script | ||
configMap: | ||
name: boostrap-wrapper-script | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if and .Values.service.enabled .Values.pods.morty.enabled -}} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: morty | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 5201 | ||
targetPort: 5201 | ||
protocol: TCP | ||
name: iperf3 | ||
selector: | ||
pickle: morty | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
{{- if and .Values.service.enabled .Values.pods.rick.enabled -}} | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: rick | ||
spec: | ||
type: ClusterIP | ||
ports: | ||
- port: 5201 | ||
targetPort: 5201 | ||
protocol: TCP | ||
name: iperf3 | ||
selector: | ||
pickle: rick | ||
kontextwork.de/app: debian | ||
kontextwork.de/project: network-tools | ||
{{- 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{{- if and .Values.persistence.enabled }} | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
labels: | ||
kontextwork.de/project: {{.Release.Name}} | ||
name: network-tools-storage-tmp | ||
spec: | ||
accessModes: | ||
- ReadWriteOnce | ||
storageClassName: local-path | ||
resources: | ||
requests: | ||
storage: 5Gi | ||
{{ 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
persistence: | ||
# If enabled, create a volume for /mnt | ||
enabled: true | ||
|
||
service: | ||
# If enabled, exposes the iperf servers via services | ||
enabled: true | ||
|
||
pods: | ||
rick: | ||
enabled: true # enable or disable the rick pod | ||
morty: | ||
enabled: true # enable or disable the morty pod | ||
strictPodPlacement: | ||
# if enabled, schedule the pods on specific nodes | ||
enabled: false | ||
rickAgent: prod-rke-agent-1 | ||
mortyAgent: prod-rke-agent-2 |