Skip to content

Commit

Permalink
refactor: create home namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
zebernst committed Nov 13, 2024
1 parent 0108fdc commit 0d44529
Show file tree
Hide file tree
Showing 10 changed files with 68 additions and 9 deletions.
2 changes: 0 additions & 2 deletions kubernetes/apps/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,9 @@ resources:
# Pre Flux-Kustomizations
- namespace.yaml
# Flux-Kustomizations
- atuin/ks.yaml
- autobrr/ks.yaml
- bazarr/ks.yaml
- cross-seed/ks.yaml
- hajimari/ks.yaml
- maintainerr/ks.yaml
- minio/ks.yaml
- omegabrr/ks.yaml
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./externalsecret.yaml
- ./helmrelease.yaml
- externalsecret.yaml
- helmrelease.yaml
- ../../../../templates/gatus/guarded
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@ metadata:
name: &app atuin
namespace: flux-system
spec:
targetNamespace: default
targetNamespace: home
commonMetadata:
labels:
app.kubernetes.io/name: *app
dependsOn:
- name: cloudnative-pg-cluster
- name: external-secrets-stores
path: ./kubernetes/apps/default/atuin/app
path: ./kubernetes/apps/home/atuin/app
prune: true
sourceRef:
kind: GitRepository
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./helmrelease.yaml
- helmrelease.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ metadata:
name: &app hajimari
namespace: flux-system
spec:
targetNamespace: default
targetNamespace: home
commonMetadata:
labels:
app.kubernetes.io/name: *app
path: ./kubernetes/apps/default/hajimari/app
path: ./kubernetes/apps/home/hajimari/app
prune: true
sourceRef:
kind: GitRepository
Expand Down
10 changes: 10 additions & 0 deletions kubernetes/apps/home/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/kustomization
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Pre Flux-Kustomizations
- namespace.yaml
# Flux-Kustomizations
- atuin/ks.yaml
- hajimari/ks.yaml
51 changes: 51 additions & 0 deletions kubernetes/apps/home/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
---
apiVersion: v1
kind: Namespace
metadata:
name: home
annotations:
kustomize.toolkit.fluxcd.io/prune: disabled
volsync.backube/privileged-movers: "true"
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/provider_v1beta3.json
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Provider
metadata:
name: alert-manager
namespace: home
spec:
type: alertmanager
address: https://alertmanager-prod-us-east-0.grafana.net # TODO: configure alert auth (basic auth, credentials already in external secrets)
---
# yaml-language-server: $schema=https://kubernetes-schemas.pages.dev/notification.toolkit.fluxcd.io/alert_v1beta3.json
apiVersion: notification.toolkit.fluxcd.io/v1beta3
kind: Alert
metadata:
name: alert-manager
namespace: home
spec:
providerRef:
name: alert-manager
eventSeverity: error
eventSources:
- kind: HelmRelease
name: "*"
exclusionList:
- "error.*lookup github\\.com"
- "error.*lookup raw\\.githubusercontent\\.com"
- "dial.*tcp.*timeout"
- "waiting.*socket"
suspend: false
---
apiVersion: grafana.integreatly.org/v1beta1
kind: GrafanaFolder
metadata:
name: grafana-folder
namespace: &namespaceName home
spec:
title: *namespaceName
allowCrossNamespaceImport: true
parentFolderUID: a03a5932-b7fc-4810-872e-e6297c0a9a7f
instanceSelector:
matchLabels:
dashboards: "grafana-cloud"

0 comments on commit 0d44529

Please sign in to comment.