added argocd exmaples
This commit is contained in:
9
examples/cd/argocd/README.md
Normal file
9
examples/cd/argocd/README.md
Normal file
@@ -0,0 +1,9 @@
|
||||
## ArgoCD Example
|
||||
|
||||
This is the simplest, working example of an argocd app, the JSON object built is now an array of objects as that is the prefered format for ArgoCD.
|
||||
|
||||
Requirements:
|
||||
|
||||
**ArgoCD 1.7+**
|
||||
|
||||
Follow the vendor generation steps at the root of this repository and generate a `vendored` folder (referenced in `application.yaml`).
|
||||
25
examples/cd/argocd/application.yaml
Normal file
25
examples/cd/argocd/application.yaml
Normal file
@@ -0,0 +1,25 @@
|
||||
---
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: monitoring
|
||||
namespace: argocd
|
||||
annotations:
|
||||
recipients.argocd-notifications.argoproj.io: "slack:jenkins"
|
||||
spec:
|
||||
destination:
|
||||
namespace: monitoring
|
||||
server: https://kubernetes.default.svc
|
||||
project: monitoring
|
||||
source:
|
||||
directory:
|
||||
jsonnet:
|
||||
libs:
|
||||
- vendored
|
||||
recurse: true
|
||||
path: examples/cd/argocd/kube-prometheus
|
||||
repoURL: git@github.com:prometheus-operator/kube-prometheus.git
|
||||
targetRevision: HEAD
|
||||
syncPolicy:
|
||||
automated: {}
|
||||
---
|
||||
22
examples/cd/argocd/appproject.yaml
Normal file
22
examples/cd/argocd/appproject.yaml
Normal file
@@ -0,0 +1,22 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: AppProject
|
||||
metadata:
|
||||
annotations:
|
||||
recipients.argocd-notifications.argoproj.io: slack:alerts
|
||||
generation: 1
|
||||
name: monitoring
|
||||
namespace: argocd
|
||||
spec:
|
||||
clusterResourceWhitelist:
|
||||
- group: "*"
|
||||
kind: "*"
|
||||
description: "Monitoring Stack deployment"
|
||||
destinations:
|
||||
- namespace: kube-system
|
||||
server: https://kubernetes.default.svc
|
||||
- namespace: default
|
||||
server: https://kubernetes.default.svc
|
||||
- namespace: monitoring
|
||||
server: https://kubernetes.default.svc
|
||||
sourceRepos:
|
||||
- git@github.com:prometheus-operator/kube-prometheus.git
|
||||
13
examples/cd/argocd/kube-prometheus/argocd-basic.jsonnet
Normal file
13
examples/cd/argocd/kube-prometheus/argocd-basic.jsonnet
Normal file
@@ -0,0 +1,13 @@
|
||||
local kp = (import 'kube-prometheus/kube-prometheus.libsonnet') +
|
||||
(import 'kube-prometheus/kube-prometheus-eks.libsonnet') + {
|
||||
_config+:: {
|
||||
namespace: 'monitoring',
|
||||
},
|
||||
};
|
||||
|
||||
[kp.kubePrometheus[name] for name in std.objectFields(kp.kubePrometheus)] +
|
||||
[kp.prometheusOperator[name] for name in std.objectFields(kp.prometheusOperator)] +
|
||||
[kp.nodeExporter[name] for name in std.objectFields(kp.nodeExporter)] +
|
||||
[kp.kubeStateMetrics[name] for name in std.objectFields(kp.kubeStateMetrics)] +
|
||||
[kp.prometheus[name] for name in std.objectFields(kp.prometheus)] +
|
||||
[kp.prometheusAdapter[name] for name in std.objectFields(kp.prometheusAdapter)]
|
||||
Reference in New Issue
Block a user