feat(environment): Add prod configuration

This commit is contained in:
Tanguy Herbron 2024-12-21 22:30:39 +01:00
parent 93b25589b0
commit 3588e8bd7d
8 changed files with 75 additions and 41 deletions

View File

@ -4,4 +4,13 @@ dev:
kubectl apply -k environments/dev --prune=true --all kubectl apply -k environments/dev --prune=true --all
prod: prod:
kubectl apply -k environments/prod --prune=true --all kubectl taint node -l type=outbound type=services:NoSchedule --overwrite
kubectl apply -k environments/prod/bootstrap --all
kubectl apply -k environments/prod --all
monitor:
kubectl apply -f nginx/external/servicemonitor.yaml
kubectl apply -f nginx/internal/servicemonitor.yaml
kubectl apply -f argo/servicemonitor.yaml
kubectl apply -f cloudnativepg/podmonitor.yaml

View File

@ -3,16 +3,16 @@ kind: Kustomization
resources: resources:
# MetalLB installation and configuration # MetalLB installation and configuration
- https://raw.githubusercontent.com/metallb/metallb/v0.13.7/config/manifests/metallb-native.yaml - github.com/metallb/metallb/config/native?ref=v0.14.3
# Traefik CRD # Traefik CRD
- https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml - https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
- https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml - https://raw.githubusercontent.com/traefik/traefik/v2.9/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
# Longhorn CRD # Longhorn CRD
- https://raw.githubusercontent.com/longhorn/longhorn/v1.5.2/deploy/longhorn.yaml - https://raw.githubusercontent.com/longhorn/longhorn/v1.7.2/deploy/longhorn.yaml
# SOPS secrets operator CRDs # SOPS secrets operator CRDs
- https://raw.githubusercontent.com/isindir/sops-secrets-operator/master/config/crd/bases/isindir.github.com_sopssecrets.yaml - https://raw.githubusercontent.com/isindir/sops-secrets-operator/master/config/crd/bases/isindir.github.com_sopssecrets.yaml
# Install CoudNativePG operator # Install CoudNativePG operator
- https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.20/releases/cnpg-1.19.1.yaml - https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.20/releases/cnpg-1.19.1.yaml
patchesStrategicMerge: patches:
- ./metallb-patch.yaml - path: ./metallb-patch.yaml

View File

@ -1,22 +1,18 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
resources:
# MetalLB configuration # MetalLB configuration
- ../../metallb
# Miscellanous basic configuration # Miscellanous basic configuration
- ../../res
# NFS client configuration # NFS client configuration
- ../../nfs-provisioner
# Longhorn installation and configuration # Longhorn installation and configuration
- ../../longhorn
# SOPS operator for secret management on the fly # SOPS operator for secret management on the fly
- ../../sops-operator
# Traefik configuration # Traefik configuration
- ../../traefik
# Argo installation and configuration # Argo installation and configuration
- ../../argo resources:
- ../../metallb
patchesStrategicMerge: - ../../res
#- ../../environments/dev/traefik-internal-service.yaml - ../../nfs-provisioner
#- ../../environments/dev/traefik-external-service.yaml - ../../longhorn
- ../../sops-operator
- ../../traefik
- ../../argo

View File

@ -1,13 +0,0 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: postgres-operator-ui
namespace: default
spec:
template:
spec:
containers:
- name: "service"
env:
- name: "TARGET_NAMESPACE"
value: "*"

View File

@ -4,4 +4,4 @@ metadata:
name: traefik-internal name: traefik-internal
namespace: default namespace: default
spec: spec:
loadBalancerIP: 10.10.0.26 loadBalancerIP: 10.10.0.35

View File

@ -0,0 +1,20 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
# MetalLB installation and configuration
- github.com/metallb/metallb/config/native?ref=v0.14.3
# Traefik CRD
#- https://raw.githubusercontent.com/traefik/traefik/v3.2/docs/content/reference/dynamic-configuration/kubernetes-crd-definition-v1.yml
#- https://raw.githubusercontent.com/traefik/traefik/v3.2/docs/content/reference/dynamic-configuration/kubernetes-crd-rbac.yml
# Cert manager CRD
- https://github.com/cert-manager/cert-manager/releases/download/v1.16.1/cert-manager.crds.yaml
# Longhorn CRD
- https://raw.githubusercontent.com/longhorn/longhorn/v1.7.2/deploy/longhorn.yaml
# SOPS secrets operator CRDs
- https://raw.githubusercontent.com/isindir/sops-secrets-operator/master/config/crd/bases/isindir.github.com_sopssecrets.yaml
# Install CoudNativePG operator
- https://github.com/cloudnative-pg/cloudnative-pg/raw/refs/heads/main/releases/cnpg-1.24.1.yaml
patches:
- path: ./metallb-patch.yaml

View File

@ -0,0 +1,13 @@
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: speaker
namespace: metallb-system
spec:
template:
spec:
tolerations:
- key: "type"
operator: "Equal"
value: "services"
effect: "NoSchedule"

View File

@ -1,10 +1,19 @@
apiVersion: kustomize.config.k8s.io/v1beta1 apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization kind: Kustomization
# MetalLB configuration
# Miscellanous basic configuration
# NFS client configuration
# Longhorn installation and configuration
# SOPS operator for secret management on the fly
# Traefik configuration
# Argo installation and configuration
resources: resources:
- https://raw.githubusercontent.com/metallb/metallb/v0.13.7/config/manifests/metallb-native.yaml - ../../metallb
- ../../metallb - ../../res
- ../../res - ../../longhorn
- https://raw.githubusercontent.com/longhorn/longhorn/master/deploy/longhorn.yaml - ../../sops-operator
- ../../longhorn #- ../../traefik
- ../../traefik - ../../cert-manager
- ../../argo
#- ../../calico