Skip to content
Draft
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
24 changes: 24 additions & 0 deletions registry/clusters/dev/components/40-weather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: weather-components
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "40"
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/mrsimonemms/infrastructure
path: registry/components/weather
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: weather
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
24 changes: 24 additions & 0 deletions registry/clusters/prod/components/40-weather.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
apiVersion: argoproj.io/v1alpha1
kind: Application
metadata:
name: weather-components
namespace: argocd
annotations:
argocd.argoproj.io/sync-wave: "40"
finalizers:
- resources-finalizer.argocd.argoproj.io
spec:
project: default
source:
repoURL: https://github.com/mrsimonemms/infrastructure
path: registry/components/weather
targetRevision: HEAD
destination:
server: https://kubernetes.default.svc
namespace: weather
syncPolicy:
automated:
prune: true
selfHeal: true
syncOptions:
- CreateNamespace=true
13 changes: 0 additions & 13 deletions registry/components/monitoring/application.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -77,15 +77,6 @@ spec:
serviceMonitorNamespaceSelector:
matchLabels:
prometheus: enabled
additionalScrapeConfigs:
- job_name: garden
static_configs:
- targets:
- garden:3000
- job_name: greenhouse
static_configs:
- targets:
- greenhouse:3000
grafana:
admin:
existingSecret: credentials
Expand All @@ -101,17 +92,13 @@ spec:
editable: true
options:
path: /var/lib/grafana/dashboards/default
dashboardsConfigMaps:
default: grafana-dashboards
grafana.ini:
server:
domain: grafana.simonemms.com
root_url: "https://%(domain)s"
persistence:
enabled: true
type: statefulset
podAnnotations:
configmap.reloader.stakater.com/reload: grafana-dashboards
serviceMonitor:
labels:
prometheus: enabled
Expand Down
22 changes: 0 additions & 22 deletions registry/components/monitoring/external-services.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions registry/components/monitoring/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- application.yaml
- dashboard-configmap.yaml
- external-services.yaml
- namespace.yaml
- secret.yaml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: grafana-dashboards
namespace: monitoring
name: dashboard
namespace: weather
labels:
grafana_dashboard: "1"
annotations:
argocd.argoproj.io/sync-wave: "10"
data:
kubernetes.json: |
{
Expand Down
35 changes: 35 additions & 0 deletions registry/components/weather/garden.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
apiVersion: v1
kind: Service
metadata:
name: garden
namespace: weather
labels:
weather: garden
annotations:
tailscale.com/tailnet-fqdn: garden.tail30e9d2.ts.net
argocd.argoproj.io/sync-wave: "10"
spec:
externalName: garden
type: ExternalName
ports:
- port: 3000
name: metrics
protocol: TCP
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: garden
namespace: weather
labels:
prometheus: enabled
annotations:
argocd.argoproj.io/sync-wave: "20"
spec:
jobLabel: name
selector:
matchLabels:
weather: garden
endpoints:
- port: metrics
interval: 15s
40 changes: 40 additions & 0 deletions registry/components/weather/greenhouse.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: v1
kind: Service
metadata:
name: greenhouse
namespace: weather
labels:
weather: greenhouse
annotations:
tailscale.com/tailnet-fqdn: greenhouse.tail30e9d2.ts.net
argocd.argoproj.io/sync-wave: "10"
spec:
externalName: greenhouse
type: ExternalName
ports:
- port: 3000
targetPort: 3000
name: metrics
protocol: TCP
---
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: greenhouse
namespace: monitoring
labels:
prometheus: enabled
annotations:
argocd.argoproj.io/sync-wave: "20"
spec:
# jobLabel: weather
selector:
matchLabels:
weather: greenhouse
endpoints:
- port: metrics
interval: 15s
honorLabels: true
namespaceSelector:
matchNames:
- weather
7 changes: 7 additions & 0 deletions registry/components/weather/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- dashboard.yaml
- garden.yaml
- greenhouse.yaml
- namespace.yaml
8 changes: 8 additions & 0 deletions registry/components/weather/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Namespace
metadata:
name: weather
labels:
prometheus: enabled
annotations:
argocd.argoproj.io/sync-wave: "-1"
Loading