generated from onedr0p/cluster-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
Showing
13 changed files
with
239 additions
and
6 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 |
---|---|---|
|
@@ -9,8 +9,10 @@ kubeconfig | |
*.pub | ||
*.key | ||
# Private | ||
.private | ||
.archive | ||
.bin | ||
.private | ||
TODO.md | ||
# Ansible | ||
.venv* | ||
# Taskfile | ||
|
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
13 changes: 13 additions & 0 deletions
13
kubernetes/storage/apps/kube-system/generic-device-plugin/app/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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: generic-device-plugin-config | ||
data: | ||
config.yaml: | | ||
devices: | ||
- name: nabucasa-skyconnect | ||
groups: | ||
- paths: | ||
- path: /dev/serial/by-id/usb-Nabu_Casa_SkyConnect* | ||
mountPath: /dev/ttyUSB0 |
100 changes: 100 additions & 0 deletions
100
kubernetes/storage/apps/kube-system/generic-device-plugin/app/helmrelease.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,100 @@ | ||
--- | ||
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/helm.toolkit.fluxcd.io/helmrelease_v2beta2.json | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: &app generic-device-plugin | ||
spec: | ||
interval: 30m | ||
chart: | ||
spec: | ||
chart: app-template | ||
version: 3.2.1 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: bjw-s | ||
namespace: flux-system | ||
install: | ||
remediation: | ||
retries: 3 | ||
upgrade: | ||
cleanupOnFail: true | ||
remediation: | ||
retries: 3 | ||
values: | ||
defaultPodOptions: | ||
annotations: | ||
reloader.stakater.com/auto: "true" | ||
priorityClassName: system-node-critical | ||
tolerations: | ||
- operator: "Exists" | ||
effect: "NoExecute" | ||
- operator: "Exists" | ||
effect: "NoSchedule" | ||
controllers: | ||
generic-device-plugin: | ||
type: daemonset | ||
containers: | ||
app: | ||
image: | ||
repository: ghcr.io/squat/generic-device-plugin | ||
tag: latest | ||
args: | ||
- --config=/config/config.yaml | ||
- --domain=device | ||
probes: | ||
liveness: &probes | ||
enabled: true | ||
custom: true | ||
spec: | ||
httpGet: | ||
path: /health | ||
port: &port 8080 | ||
initialDelaySeconds: 0 | ||
periodSeconds: 10 | ||
timeoutSeconds: 1 | ||
failureThreshold: 3 | ||
readiness: *probes | ||
startup: *probes | ||
resources: | ||
requests: | ||
cpu: "5m" | ||
limits: | ||
memory: "64Mi" | ||
securityContext: | ||
privileged: true | ||
service: | ||
app: | ||
controller: *app | ||
ports: | ||
http: | ||
port: *port | ||
serviceMonitor: | ||
app: | ||
serviceName: *app | ||
endpoints: | ||
- port: http | ||
scheme: http | ||
path: /metrics | ||
interval: 1m | ||
scrapeTimeout: 10s | ||
serviceAccount: | ||
create: true | ||
name: *app | ||
persistence: | ||
config: | ||
type: configMap | ||
name: generic-device-plugin-config | ||
globalMounts: | ||
- path: /config/config.yaml | ||
subPath: config.yaml | ||
device-plugins: | ||
type: hostPath | ||
hostPath: /var/lib/kubelet/device-plugins | ||
globalMounts: | ||
- path: /var/lib/kubelet/device-plugins | ||
dev: | ||
type: hostPath | ||
hostPath: /dev | ||
globalMounts: | ||
- path: /dev |
7 changes: 7 additions & 0 deletions
7
kubernetes/storage/apps/kube-system/generic-device-plugin/app/kustomization.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,7 @@ | ||
--- | ||
# yaml-language-server: $schema=https://json.schemastore.org/kustomization | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./configmap.yaml | ||
- ./helmrelease.yaml |
21 changes: 21 additions & 0 deletions
21
kubernetes/storage/apps/kube-system/generic-device-plugin/ks.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,21 @@ | ||
--- | ||
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/kustomization-kustomize-v1.json | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app generic-device-plugin | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: kube-system | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
path: ./kubernetes/storage/apps/kube-system/generic-device-plugin/app | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-ops | ||
wait: true | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 5m |
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 |
---|---|---|
|
@@ -6,3 +6,4 @@ resources: | |
- ./echo-server/ks.yaml | ||
- ./ingress-nginx/ks.yaml | ||
- ./k8s-gateway/ks.yaml | ||
- ./usbip-server/ks.yaml |
63 changes: 63 additions & 0 deletions
63
kubernetes/storage/apps/network/usbip-server/app/helmrelease.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,63 @@ | ||
--- | ||
apiVersion: helm.toolkit.fluxcd.io/v2 | ||
kind: HelmRelease | ||
metadata: | ||
name: usbip-server | ||
spec: | ||
interval: 30m | ||
chart: | ||
spec: | ||
chart: app-template | ||
version: 3.2.1 | ||
sourceRef: | ||
kind: HelmRepository | ||
name: bjw-s | ||
namespace: flux-system | ||
install: | ||
remediation: | ||
retries: 3 | ||
upgrade: | ||
cleanupOnFail: true | ||
remediation: | ||
retries: 3 | ||
values: | ||
controllers: | ||
usbip-server: | ||
containers: | ||
app: | ||
image: | ||
repository: ghcr.io/prehor/usbip-server | ||
tag: 6.6.31 | ||
probes: | ||
liveness: &probes | ||
enabled: true | ||
custom: true | ||
spec: | ||
tcpSocket: | ||
port: &port 3240 | ||
initialDelaySeconds: 0 | ||
periodSeconds: 10 | ||
timeoutSeconds: 1 | ||
failureThreshold: 3 | ||
readiness: *probes | ||
resources: | ||
requests: | ||
cpu: 10m | ||
memory: 16Mi | ||
limits: | ||
cpu: 100m | ||
memory: 128Mi | ||
device/nabucasa-skyconnect: 1 | ||
securityContext: | ||
privileged: true | ||
runAsUser: 0 | ||
runAsGroup: 0 | ||
readOnlyRootFilesystem: true | ||
service: | ||
app: | ||
controller: usbip-server | ||
type: NodePort | ||
externalTrafficPolicy: Local | ||
ports: | ||
tcp: | ||
port: *port |
5 changes: 5 additions & 0 deletions
5
kubernetes/storage/apps/network/usbip-server/app/kustomization.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,5 @@ | ||
--- | ||
apiVersion: kustomize.config.k8s.io/v1beta1 | ||
kind: Kustomization | ||
resources: | ||
- ./helmrelease.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,20 @@ | ||
--- | ||
apiVersion: kustomize.toolkit.fluxcd.io/v1 | ||
kind: Kustomization | ||
metadata: | ||
name: &app usbip-server | ||
namespace: flux-system | ||
spec: | ||
targetNamespace: network | ||
commonMetadata: | ||
labels: | ||
app.kubernetes.io/name: *app | ||
path: ./kubernetes/storage/apps/network/usbip-server/app | ||
prune: true | ||
sourceRef: | ||
kind: GitRepository | ||
name: home-ops | ||
wait: false | ||
interval: 30m | ||
retryInterval: 1m | ||
timeout: 5m |