Create new structure files
This commit is contained in:
parent
7113cc078c
commit
6f19f44f91
37
.woodpecker.yml
Normal file
37
.woodpecker.yml
Normal file
@ -0,0 +1,37 @@
|
|||||||
|
pipeline:
|
||||||
|
helm-check:
|
||||||
|
image: alpine/helm:3.13.2
|
||||||
|
commands:
|
||||||
|
- helm lint charts/grafana
|
||||||
|
- helm template charts/grafana -f manifest/grafana/values-int.yaml
|
||||||
|
|
||||||
|
validate-manifest:
|
||||||
|
image: bitnami/kubectl:latest
|
||||||
|
commands:
|
||||||
|
- echo "🔍 Validating grafana-int ArgoCD app"
|
||||||
|
- kubectl apply -f argocd-apps/grafana/grafana-int.yaml --dry-run=client
|
||||||
|
|
||||||
|
deploy-argocd-app:
|
||||||
|
image: bitnami/kubectl:latest
|
||||||
|
commands:
|
||||||
|
- echo "🚀 Applying grafana-int ArgoCD app"
|
||||||
|
- kubectl apply -f argocd-apps/grafana/grafana-int.yaml
|
||||||
|
|
||||||
|
create-cloudflare-cname:
|
||||||
|
image: alpine:latest
|
||||||
|
environment:
|
||||||
|
- CLOUDFLARE_TOKEN
|
||||||
|
- CLOUDFLARE_ZONE_ID
|
||||||
|
commands:
|
||||||
|
- apk add curl jq
|
||||||
|
- echo "🌐 Creating CNAME for grafana-int.dvirlabs.com"
|
||||||
|
- curl -X POST "https://api.cloudflare.com/client/v4/zones/$CLOUDFLARE_ZONE_ID/dns_records" \
|
||||||
|
-H "Authorization: Bearer $CLOUDFLARE_TOKEN" \
|
||||||
|
-H "Content-Type: application/json" \
|
||||||
|
--data '{
|
||||||
|
"type":"CNAME",
|
||||||
|
"name":"grafana-int",
|
||||||
|
"content":"<YOUR_TUNNEL_ENDPOINT>",
|
||||||
|
"ttl":120,
|
||||||
|
"proxied":true
|
||||||
|
}'
|
||||||
23
argocd-apps/grafana/grafana-int.yaml
Normal file
23
argocd-apps/grafana/grafana-int.yaml
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
apiVersion: argoproj.io/v1alpha1
|
||||||
|
kind: Application
|
||||||
|
metadata:
|
||||||
|
name: grafana-int
|
||||||
|
namespace: argocd
|
||||||
|
spec:
|
||||||
|
project: observability
|
||||||
|
source:
|
||||||
|
repoURL: 'https://git.dvirlabs.com/dvirlabs/observability-stack.git'
|
||||||
|
targetRevision: HEAD # אפשר לשנות לפי הצורך (למשל לשם של branch preview)
|
||||||
|
path: charts/grafana
|
||||||
|
helm:
|
||||||
|
valueFiles:
|
||||||
|
- ../../manifest/grafana/values-int.yaml
|
||||||
|
destination:
|
||||||
|
server: https://kubernetes.default.svc
|
||||||
|
namespace: monitoring
|
||||||
|
syncPolicy:
|
||||||
|
automated:
|
||||||
|
prune: true
|
||||||
|
selfHeal: true
|
||||||
|
syncOptions:
|
||||||
|
- CreateNamespace=true
|
||||||
@ -1,9 +1,7 @@
|
|||||||
# argocd-apps/grafana.yaml
|
|
||||||
|
|
||||||
apiVersion: argoproj.io/v1alpha1
|
apiVersion: argoproj.io/v1alpha1
|
||||||
kind: Application
|
kind: Application
|
||||||
metadata:
|
metadata:
|
||||||
name: grafana
|
name: grafana-prod
|
||||||
namespace: argocd
|
namespace: argocd
|
||||||
spec:
|
spec:
|
||||||
project: observability
|
project: observability
|
||||||
@ -13,7 +11,7 @@ spec:
|
|||||||
path: charts/grafana
|
path: charts/grafana
|
||||||
helm:
|
helm:
|
||||||
valueFiles:
|
valueFiles:
|
||||||
- ../../manifests/grafana/values.yaml
|
- ../../manifest/grafana/values-prod.yaml
|
||||||
destination:
|
destination:
|
||||||
server: https://kubernetes.default.svc
|
server: https://kubernetes.default.svc
|
||||||
namespace: monitoring
|
namespace: monitoring
|
||||||
31
manifests/grafana/values-int.yaml
Normal file
31
manifests/grafana/values-int.yaml
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
adminUser: admin
|
||||||
|
adminPassword: test1234
|
||||||
|
|
||||||
|
service:
|
||||||
|
type: ClusterIP
|
||||||
|
|
||||||
|
ingress:
|
||||||
|
enabled: true
|
||||||
|
ingressClassName: traefik
|
||||||
|
annotations:
|
||||||
|
traefik.ingress.kubernetes.io/router.entrypoints: websecure
|
||||||
|
traefik.ingress.kubernetes.io/router.tls: "true"
|
||||||
|
hosts:
|
||||||
|
- grafana-int.dvirlabs.com
|
||||||
|
|
||||||
|
persistence:
|
||||||
|
enabled: true
|
||||||
|
storageClassName: nfs-client
|
||||||
|
size: 1Gi
|
||||||
|
accessModes:
|
||||||
|
- ReadWriteOnce
|
||||||
|
|
||||||
|
datasources:
|
||||||
|
datasources.yaml:
|
||||||
|
apiVersion: 1
|
||||||
|
datasources:
|
||||||
|
- name: Prometheus
|
||||||
|
type: prometheus
|
||||||
|
access: proxy
|
||||||
|
url: http://prometheus-server
|
||||||
|
isDefault: true
|
||||||
0
manifests/prometheus/values-int.yaml
Normal file
0
manifests/prometheus/values-int.yaml
Normal file
Loading…
x
Reference in New Issue
Block a user