feat: add metrics-server
This commit is contained in:
34
README.md
Normal file
34
README.md
Normal file
@@ -0,0 +1,34 @@
|
|||||||
|
# ArgoCD Apps Structure
|
||||||
|
|
||||||
|
This repository uses the **App of Apps** pattern to manage multiple Kubernetes applications through ArgoCD.
|
||||||
|
|
||||||
|
## Structure
|
||||||
|
|
||||||
|
```
|
||||||
|
.
|
||||||
|
├── root-app.yaml # Root application that manages all apps
|
||||||
|
├── apps/ # ArgoCD Application manifests
|
||||||
|
│ └── metrics-server.yaml # Individual app definitions
|
||||||
|
└── charts/ # Helm values and configurations
|
||||||
|
└── metrics-server/
|
||||||
|
└── values.yaml # Custom values for metrics-server
|
||||||
|
```
|
||||||
|
|
||||||
|
## Usage
|
||||||
|
|
||||||
|
1. **Add this repository to ArgoCD:**
|
||||||
|
```bash
|
||||||
|
kubectl apply -f root-app.yaml
|
||||||
|
```
|
||||||
|
|
||||||
|
2. **Add new applications:**
|
||||||
|
- Create a new Application manifest in `apps/`
|
||||||
|
- (Optional) Add custom Helm values in `charts/<app-name>/`
|
||||||
|
- Commit and push - ArgoCD will automatically sync
|
||||||
|
|
||||||
|
## How it works
|
||||||
|
|
||||||
|
- `root-app.yaml` is the entry point that watches the `apps/` directory
|
||||||
|
- Any YAML files added to `apps/` will be automatically deployed by ArgoCD
|
||||||
|
- Each app can reference external Helm charts or local manifests
|
||||||
|
- Custom values can be provided in the `charts/` directory
|
||||||
28
apps/metrics-server.yaml
Normal file
28
apps/metrics-server.yaml
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: metrics-server
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
sources:
|
||||||
|
- repoURL: https://kubernetes-sigs.github.io/metrics-server/
|
||||||
|
chart: metrics-server
|
||||||
|
targetRevision: 3.13.0
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- $values/charts/metrics-server/values.yaml
|
||||||
|
- repoURL: https://github.com/lucas.mathieu/argocd-gitops.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
ref: values
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: kube-system
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
17
charts/metrics-server/values.yaml
Normal file
17
charts/metrics-server/values.yaml
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
# Custom values for metrics-server
|
||||||
|
# Uncomment and modify to override defaults
|
||||||
|
# Reference the values file in apps/metrics-server.yaml to use this
|
||||||
|
|
||||||
|
args:
|
||||||
|
- --kubelet-insecure-tls
|
||||||
|
|
||||||
|
# Example of other common configurations:
|
||||||
|
# replicas: 1
|
||||||
|
#
|
||||||
|
# resources:
|
||||||
|
# requests:
|
||||||
|
# cpu: 100m
|
||||||
|
# memory: 200Mi
|
||||||
|
# limits:
|
||||||
|
# cpu: 500m
|
||||||
|
# memory: 500Mi
|
||||||
23
root-app.yaml
Normal file
23
root-app.yaml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: root-app
|
||||||
|
namespace: argocd
|
||||||
|
finalizers:
|
||||||
|
- resources-finalizer.argocd.argoproj.io
|
||||||
|
spec:
|
||||||
|
project: default
|
||||||
|
source:
|
||||||
|
repoURL: https://git.lucaasmth.me/lucas.mathieu/argocd-gitops.git
|
||||||
|
targetRevision: HEAD
|
||||||
|
path: apps
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: argocd
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
allowEmpty: false
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
Reference in New Issue
Block a user