Skip to content

Commit

Permalink
feat(spegel): Deploy
Browse files Browse the repository at this point in the history
  • Loading branch information
bjw-s committed Jan 11, 2024
1 parent e241edb commit 2b77c94
Show file tree
Hide file tree
Showing 6 changed files with 122 additions and 0 deletions.
1 change: 1 addition & 0 deletions kubernetes/main/apps/system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ resources:
- ./intel-device-plugins/ks.yaml
- ./node-feature-discovery/ks.yaml
- ./reloader/ks.yaml
- ./spegel/ks.yaml
- ./volsync/ks.yaml
43 changes: 43 additions & 0 deletions kubernetes/main/apps/system/spegel/app/helmrelease.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrelease-helm-v2beta2.json
apiVersion: helm.toolkit.fluxcd.io/v2beta2
kind: HelmRelease
metadata:
name: spegel
spec:
interval: 30m
chart:
spec:
chart: spegel
version: v0.0.17
sourceRef:
kind: HelmRepository
name: xenitab
interval: 30m
values:
spegel:
containerdSock: /run/containerd/containerd.sock
containerdRegistryConfigPath: /etc/cri/conf.d/hosts
service:
registry:
hostPort: 29999
serviceMonitor:
enabled: true

postRenderers:
- kustomize:
patches:
- target:
version: v1
kind: DaemonSet
name: spegel
patch: |
- op: add
path: /spec/template/metadata/labels/egress.home.arpa~1apiserver
value: allow
- op: add
path: /spec/template/metadata/labels/egress.home.arpa~1world
value: allow
- op: add
path: /spec/template/metadata/labels/egress.home.arpa~1kubedns
value: allow
10 changes: 10 additions & 0 deletions kubernetes/main/apps/system/spegel/app/helmrepository.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/fluxcd-community/flux2-schemas/main/helmrepository-source-v1beta2.json
apiVersion: source.toolkit.fluxcd.io/v1beta2
kind: HelmRepository
metadata:
name: xenitab
spec:
type: oci
interval: 5m
url: oci://ghcr.io/xenitab/helm-charts
7 changes: 7 additions & 0 deletions kubernetes/main/apps/system/spegel/app/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrepository.yaml
- ./helmrelease.yaml
- ./networkpolicy.yaml
42 changes: 42 additions & 0 deletions kubernetes/main/apps/system/spegel/app/networkpolicy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
# yaml-language-server: $schema=https://raw.githubusercontent.com/datreeio/CRDs-catalog/main/cilium.io/ciliumnetworkpolicy_v2.json
apiVersion: cilium.io/v2
kind: CiliumNetworkPolicy
metadata:
name: spegel
spec:
endpointSelector:
matchLabels:
app.kubernetes.io/name: spegel
ingress:
# Other spegel pods
- fromEndpoints:
- matchLabels:
app.kubernetes.io/name: spegel
toPorts:
- ports:
- port: "5000"
protocol: TCP
- port: "5001"
protocol: TCP

# Prometheus
- fromEndpoints:
- matchLabels:
io.kubernetes.pod.namespace: monitoring
app.kubernetes.io/name: prometheus
toPorts:
- ports:
- port: "9090"
protocol: "TCP"
egress:
# Other spegel pods
- toEndpoints:
- matchLabels:
app.kubernetes.io/name: spegel
toPorts:
- ports:
- port: "5000"
protocol: TCP
- port: "5001"
protocol: TCP
19 changes: 19 additions & 0 deletions kubernetes/main/apps/system/spegel/ks.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
---
# 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: &appname spegel
namespace: flux-system
spec:
targetNamespace: system
commonMetadata:
labels:
app.kubernetes.io/name: *appname
interval: 10m
path: "./kubernetes/main/apps/system/spegel/app"
prune: true
sourceRef:
kind: GitRepository
name: home-ops-kubernetes
wait: false

0 comments on commit 2b77c94

Please sign in to comment.