Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move namespace to components #249

Merged
merged 2 commits into from
Feb 1, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions kubernetes/apps/actions-runner-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./gha-runner-scale-set-controller/ks.yaml
- ./gha-runner-scale-set/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: actions-runner-system
target:
kind: Namespace
9 changes: 0 additions & 9 deletions kubernetes/apps/actions-runner-system/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/cert-manager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./cert-manager/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: cert-manager
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/cert-manager/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/database/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./cloudnative-pg/ks.yaml
- ./emqx/ks.yaml
- ./minio/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: database
target:
kind: Namespace
6 changes: 0 additions & 6 deletions kubernetes/apps/database/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/default/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./nginx-static/ks.yaml
- ./jellyfin/ks.yaml
- ./sabnzbd/ks.yaml
Expand All @@ -13,3 +12,12 @@ resources:
- ./recyclarr/ks.yaml
- ./prowlarr/ks.yaml
- ./qbittorrent/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: default
target:
kind: Namespace
6 changes: 0 additions & 6 deletions kubernetes/apps/default/namespace.yaml

This file was deleted.

12 changes: 9 additions & 3 deletions kubernetes/apps/external-secrets/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# Pre Flux-Kustomizations
- ./namespace.yaml
# Flux-Kustomizations
- ./external-secrets/ks.yaml
- ./onepassword-connect/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: external-secrets
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/external-secrets/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/flux-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./flux-operator/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: flux-system
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/flux-system/namespace.yaml

This file was deleted.

11 changes: 9 additions & 2 deletions kubernetes/apps/home-automation/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,15 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./esphome/ks.yaml
- ./home-assistant/ks.yaml
# - ./matter-server/ks.yaml

components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: home-automation
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/home-automation/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/kube-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./cilium/ks.yaml
- ./coredns/ks.yaml
- ./intel-device-plugin/ks.yaml
Expand All @@ -12,3 +11,12 @@ resources:
- ./node-feature-discovery/ks.yaml
- ./reloader/ks.yaml
- ./spegel/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: kube-system
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/kube-system/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/network/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./blocky/ks.yaml
- ./cloudflared/ks.yaml
- ./echo-server/ks.yaml
- ./external-dns/ks.yaml
- ./ingress-nginx/ks.yaml
- ./k8s-gateway/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: network
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/network/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/observability/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,14 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./grafana/ks.yaml
- ./prometheus-operator-crds/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: observability
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/observability/namespace.yaml

This file was deleted.

10 changes: 9 additions & 1 deletion kubernetes/apps/openebs-system/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,13 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- ./namespace.yaml
- ./openebs/ks.yaml
components:
- ../../components/namespace
patches:
- patch: |
- op: add
path: /metadata/name
value: openebs-system
target:
kind: Namespace
8 changes: 0 additions & 8 deletions kubernetes/apps/openebs-system/namespace.yaml

This file was deleted.

6 changes: 6 additions & 0 deletions kubernetes/components/namespace/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
# yaml-language-server: $schema=https://json.schemastore.org/component.json
apiVersion: kustomize.config.k8s.io/v1alpha1
kind: Component
resources:
- ./namespace.yaml
6 changes: 6 additions & 0 deletions kubernetes/components/namespace/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
piVersion: v1
kind: Namespace
metadata:
name: not-used
labels:
kustomize.toolkit.fluxcd.io/prune: disabled