mirror of
https://github.com/devitq/homelab.git
synced 2026-11-20 11:27:39 +00:00
init(): initial commit
This commit is contained in:
216 files changed
+36511
No files matched your search
@@ -0,0 +1,156 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: argocd
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://argoproj.github.io/argo-helm
|
||||
targetRevision: 10.4.2
|
||||
chart: argo-cd
|
||||
helm:
|
||||
valuesObject:
|
||||
redis-ha:
|
||||
enabled: false
|
||||
|
||||
redis:
|
||||
image:
|
||||
repository: docker.io/redis
|
||||
resources:
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
|
||||
controller:
|
||||
replicas: 1
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 512Mi
|
||||
limits:
|
||||
cpu: 150m
|
||||
memory: 1Gi
|
||||
|
||||
env:
|
||||
- name: GOGC
|
||||
value: "50"
|
||||
- name: GOMEMLIMIT
|
||||
value: "800MiB"
|
||||
|
||||
server:
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
repoServer:
|
||||
autoscaling:
|
||||
enabled: false
|
||||
minReplicas: 1
|
||||
resources:
|
||||
requests:
|
||||
cpu: 500m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
|
||||
applicationSet:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 10m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
|
||||
notifications:
|
||||
enabled: false
|
||||
|
||||
dex:
|
||||
enabled: false
|
||||
|
||||
configs:
|
||||
params:
|
||||
server.insecure: "true"
|
||||
|
||||
cm:
|
||||
url: https://argocd.yc.infra.itqdev.xyz
|
||||
|
||||
timeout.reconciliation: "10m"
|
||||
|
||||
resource.exclusions: |
|
||||
- apiGroups:
|
||||
- ""
|
||||
kinds:
|
||||
- Event
|
||||
clusters:
|
||||
- "*"
|
||||
|
||||
- apiGroups:
|
||||
- "events.k8s.io"
|
||||
kinds:
|
||||
- Event
|
||||
clusters:
|
||||
- "*"
|
||||
|
||||
- apiGroups:
|
||||
- ""
|
||||
kinds:
|
||||
- Endpoints
|
||||
clusters:
|
||||
- "*"
|
||||
|
||||
- apiGroups:
|
||||
- "discovery.k8s.io"
|
||||
kinds:
|
||||
- EndpointSlice
|
||||
clusters:
|
||||
- "*"
|
||||
|
||||
- apiGroups:
|
||||
- "metrics.k8s.io"
|
||||
kinds:
|
||||
- "*"
|
||||
clusters:
|
||||
- "*"
|
||||
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
kinds:
|
||||
- Lease
|
||||
clusters:
|
||||
- "*"
|
||||
|
||||
oidc.config: |
|
||||
name: Keycloak
|
||||
issuer: https://id.itqdev.xyz/realms/master
|
||||
clientID: argocd-yandexcloud
|
||||
clientSecret: $oidc.keycloak.clientSecret
|
||||
refreshTokenThreshold: 2m
|
||||
requestedScopes: ["openid", "profile", "email", "groups"]
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: argocd
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,40 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: cert-manager
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: oci://quay.io/jetstack/charts/cert-manager
|
||||
path: .
|
||||
targetRevision: v1.21.1
|
||||
helm:
|
||||
valuesObject:
|
||||
crds:
|
||||
enabled: true
|
||||
|
||||
prometheus:
|
||||
enabled: false
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: cert-manager
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,34 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: cloudnative-pg
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://cloudnative-pg.github.io/charts
|
||||
targetRevision: 0.29.0
|
||||
chart: cloudnative-pg
|
||||
helm:
|
||||
valuesObject:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: cloudnative-pg
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,38 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: external-secrets-operator
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://charts.external-secrets.io
|
||||
targetRevision: 2.10.0
|
||||
chart: external-secrets
|
||||
helm:
|
||||
valuesObject:
|
||||
webhook:
|
||||
create: false
|
||||
certController:
|
||||
create: false
|
||||
resources:
|
||||
requests:
|
||||
cpu: 25m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: external-secrets
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,89 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: oci://ghcr.io/grafana-community/helm-charts/grafana
|
||||
path: .
|
||||
targetRevision: 13.2.6
|
||||
helm:
|
||||
valuesObject:
|
||||
replicas: 1
|
||||
envValueFrom:
|
||||
GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET:
|
||||
secretKeyRef:
|
||||
name: grafana-secrets
|
||||
key: client-secret
|
||||
|
||||
plugins:
|
||||
- prometheus
|
||||
|
||||
grafana.ini:
|
||||
plugins:
|
||||
preinstall_auto_update: false
|
||||
|
||||
server:
|
||||
root_url: https://grafana.yc.infra.itqdev.xyz
|
||||
|
||||
auth:
|
||||
disable_login_form: false
|
||||
oauth_auto_login: false
|
||||
|
||||
auth.generic_oauth:
|
||||
enabled: true
|
||||
name: Keycloak
|
||||
allow_sign_up: true
|
||||
client_id: grafana-yandexcloud
|
||||
client_secret: ${GF_AUTH_GENERIC_OAUTH_CLIENT_SECRET}
|
||||
scopes: openid profile email
|
||||
use_pkce: true
|
||||
|
||||
auth_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/auth
|
||||
token_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/token
|
||||
api_url: https://id.itqdev.xyz/realms/master/protocol/openid-connect/userinfo
|
||||
|
||||
role_attribute_path: >
|
||||
contains(groups[*], 'admin') && 'Admin' || contains(groups[*], 'editor') && 'Editor' || 'Viewer'
|
||||
role_attribute_strict: false
|
||||
use_refresh_token: true
|
||||
id_token_attribute_name: preferred_username
|
||||
|
||||
sidecar:
|
||||
dashboards:
|
||||
enabled: true
|
||||
label: grafana_dashboard
|
||||
labelValue: "1"
|
||||
searchNamespace: ALL
|
||||
folderAnnotation: grafana_folder
|
||||
provider:
|
||||
allowUiUpdates: false
|
||||
datasources:
|
||||
enabled: true
|
||||
label: grafana_datasource
|
||||
labelValue: "1"
|
||||
searchNamespace: ALL
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 512Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: grafana
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,34 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: headlamp
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://kubernetes-sigs.github.io/headlamp/
|
||||
targetRevision: 0.45.0
|
||||
chart: headlamp
|
||||
helm:
|
||||
valuesObject:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 32Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: headlamp
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,42 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: karmada
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://raw.githubusercontent.com/karmada-io/karmada/master/charts
|
||||
targetRevision: v1.19.0
|
||||
chart: karmada
|
||||
helm:
|
||||
valuesObject:
|
||||
controllerManager:
|
||||
featureGates:
|
||||
MultiClusterService: true
|
||||
|
||||
certs:
|
||||
mode: auto
|
||||
auto:
|
||||
hosts:
|
||||
- kubernetes.default.svc
|
||||
- '*.etcd.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}'
|
||||
- '*.{{ .Release.Namespace }}.svc.{{ .Values.clusterDomain }}'
|
||||
- '*.{{ .Release.Namespace }}.svc'
|
||||
- localhost
|
||||
- 127.0.0.1
|
||||
- karmada.yc.infra.itqdev.xyz
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: karmada-system
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: manifests
|
||||
namespace: argocd
|
||||
annotations:
|
||||
argocd.argoproj.io/compare-options: ServerSideDiff=true,IncludeMutationWebhook=true
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.itqdev.xyz/Infrastructure/homelab.git
|
||||
targetRevision: main
|
||||
path: yc-lab/manifests
|
||||
|
||||
directory:
|
||||
recurse: true
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: default
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,38 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: metrics-server
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://kubernetes-sigs.github.io/metrics-server/
|
||||
targetRevision: 3.14.0
|
||||
chart: metrics-server
|
||||
helm:
|
||||
valuesObject:
|
||||
args:
|
||||
- --kubelet-insecure-tls
|
||||
metrics:
|
||||
enabled: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
limits:
|
||||
cpu: 50m
|
||||
memory: 100Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: metrics-server
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,27 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: root-app
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://git.itqdev.xyz/Infrastructure/homelab.git
|
||||
targetRevision: main
|
||||
path: yc-lab/argocd
|
||||
|
||||
directory:
|
||||
recurse: true
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: argocd
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,25 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: submariner-k8s-broker
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://submariner-io.github.io/submariner-charts/charts
|
||||
chart: submariner-k8s-broker
|
||||
targetRevision: 0.24.1
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: submariner-operator
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,49 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: submariner-operator
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://submariner-io.github.io/submariner-charts/charts
|
||||
chart: submariner-operator
|
||||
targetRevision: 0.24.1
|
||||
helm:
|
||||
valuesObject:
|
||||
broker:
|
||||
server: kubernetes.default.svc.cluster.local
|
||||
namespace: submariner-operator
|
||||
|
||||
submariner:
|
||||
brokerK8sSecret: submariner-k8s-broker-client-token # created by submariner-broker
|
||||
|
||||
clusterId: k3s-cloud
|
||||
clusterCidr: 10.96.0.0/16
|
||||
serviceCidr: 10.97.0.0/16
|
||||
|
||||
clustersetIpEnabled: false
|
||||
loadBalancerEnabled: false
|
||||
natEnabled: true
|
||||
|
||||
debug: false
|
||||
serviceDiscovery: false
|
||||
cableDriver: wireguard
|
||||
healthcheckEnabled: true
|
||||
|
||||
ipsec:
|
||||
pskSecret: submariner-ipsec-psk
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: submariner-operator
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
enabled: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,295 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: victoriametrics-k8s-cluster
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://victoriametrics.github.io/helm-charts/
|
||||
chart: victoria-metrics-k8s-stack
|
||||
targetRevision: v0.91.2
|
||||
helm:
|
||||
skipCrds: true
|
||||
valuesObject:
|
||||
fullnameOverride: vm
|
||||
|
||||
serviceAccount:
|
||||
create: false
|
||||
|
||||
victoria-metrics-operator:
|
||||
enabled: false
|
||||
|
||||
defaultDashboards:
|
||||
# -- Enable dashboard sync via sync-job
|
||||
enabled: true
|
||||
|
||||
dashboards:
|
||||
node-exporter-full:
|
||||
enabled: false
|
||||
|
||||
sources:
|
||||
node-exporter-full:
|
||||
enabled: false
|
||||
kube-prometheus:
|
||||
enabled: false
|
||||
victoriametrics-single-node:
|
||||
enabled: true
|
||||
victoriametrics-vmagent:
|
||||
enabled: true
|
||||
kubernetes-kubelet:
|
||||
enabled: true
|
||||
url: https://grafana.com/api/dashboards/16361/revisions/latest/download
|
||||
kubernetes-controller-manager:
|
||||
enabled: true
|
||||
url: https://grafana.com/api/dashboards/16370/revisions/latest/download
|
||||
kubernetes-scheduler:
|
||||
enabled: true
|
||||
url: https://grafana.com/api/dashboards/16362/revisions/latest/download
|
||||
|
||||
syncJob:
|
||||
# -- Fetch dashboards and rules from upstream sources at deploy time.
|
||||
# Creates ConfigMaps (for Grafana sidecar) or GrafanaDashboard CRDs and VMRules directly in the cluster.
|
||||
# A new Job runs automatically whenever this config changes.
|
||||
enabled: true
|
||||
|
||||
vlsingle:
|
||||
enabled: false
|
||||
|
||||
vlcluster:
|
||||
enabled: false
|
||||
|
||||
vldistributed:
|
||||
enabled: false
|
||||
|
||||
vlagent:
|
||||
enabled: false
|
||||
|
||||
vtsingle:
|
||||
enabled: false
|
||||
|
||||
vtcluster:
|
||||
enabled: false
|
||||
|
||||
vmsingle:
|
||||
enabled: false
|
||||
|
||||
vmdistributed:
|
||||
enabled: false
|
||||
|
||||
vmcluster:
|
||||
enabled: false
|
||||
|
||||
alertmanager:
|
||||
enabled: false
|
||||
|
||||
vmalert:
|
||||
enabled: false
|
||||
|
||||
vmauth:
|
||||
enabled: false
|
||||
|
||||
vmagent:
|
||||
enabled: false
|
||||
|
||||
defaultDatasources:
|
||||
grafanaOperator:
|
||||
# -- Create datasources as CRDs (requires grafana-operator to be installed)
|
||||
enabled: false
|
||||
annotations: {}
|
||||
spec:
|
||||
instanceSelector:
|
||||
matchLabels:
|
||||
dashboards: grafana
|
||||
allowCrossNamespaceImport: false
|
||||
victoriametrics:
|
||||
# -- List of prometheus compatible datasource configurations.
|
||||
# VM `url` will be added to each of them in templates.
|
||||
datasources:
|
||||
- name: VictoriaMetrics
|
||||
type: prometheus
|
||||
access: proxy
|
||||
uid: VictoriaMetrics
|
||||
isDefault: true
|
||||
- name: VictoriaMetrics (DS)
|
||||
isDefault: false
|
||||
access: proxy
|
||||
uid: VictoriaMetricsDS
|
||||
type: victoriametrics-metrics-datasource
|
||||
victorialogs:
|
||||
# -- List of VictoriaLogs datasource configurations.
|
||||
# VL `url` will be added to each of them in templates.
|
||||
datasources:
|
||||
- name: VictoriaLogs (DS)
|
||||
access: proxy
|
||||
uid: VictoriaLogs
|
||||
type: victoriametrics-logs-datasource
|
||||
victoriatraces:
|
||||
# -- List of VictoriaTraces (Jaeger-compatible) datasource configurations.
|
||||
# VT `url` will be added to each of them in templates.
|
||||
datasources:
|
||||
- name: VictoriaTraces
|
||||
access: proxy
|
||||
uid: VictoriaTraces
|
||||
type: jaeger
|
||||
# -- List of alertmanager datasources.
|
||||
# VMAlertmanager generated `url` will be added to each datasource in template if alertmanager is enabled
|
||||
alertmanager:
|
||||
datasources:
|
||||
- name: Alertmanager
|
||||
access: proxy
|
||||
uid: Alertmanager
|
||||
jsonData:
|
||||
implementation: prometheus
|
||||
# -- Configure additional grafana datasources (passed through tpl).
|
||||
# Check [here](https://grafana.com/docs/grafana/latest/administration/provisioning/#data-sources) for details
|
||||
extra: []
|
||||
# - name: prometheus-sample
|
||||
# access: proxy
|
||||
# basicAuth: true
|
||||
# basicAuthPassword: pass
|
||||
# basicAuthUser: daco
|
||||
# editable: false
|
||||
# jsonData:
|
||||
# tlsSkipVerify: true
|
||||
# orgId: 1
|
||||
# type: prometheus
|
||||
# url: https://{{ printf "%s-prometheus.svc" .Release.Name }}:9090
|
||||
# version: 1
|
||||
|
||||
grafana:
|
||||
enabled: false
|
||||
|
||||
defaultScrapeService:
|
||||
namespace: kube-system
|
||||
|
||||
prometheus-node-exporter:
|
||||
enabled: false
|
||||
|
||||
# -- kube-state-metrics dependency chart configuration. For possible values check [here](https://github.com/prometheus-community/helm-charts/blob/main/charts/kube-state-metrics/values.yaml)
|
||||
kube-state-metrics:
|
||||
enabled: false
|
||||
# -- [Scrape configuration](https://docs.victoriametrics.com/operator/api/#vmservicescrapespec) for Kube State Metrics
|
||||
vmScrape:
|
||||
enabled: true
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/name: '{{ include "kube-state-metrics.name" (index .Subcharts "kube-state-metrics") }}'
|
||||
app.kubernetes.io/instance: '{{ include "vm.release" . }}'
|
||||
endpoints:
|
||||
- port: http
|
||||
honorLabels: true
|
||||
metricRelabelConfigs:
|
||||
- action: labeldrop
|
||||
regex: (uid|container_id|image_id)
|
||||
jobLabel: app.kubernetes.io/name
|
||||
|
||||
kubelet:
|
||||
enabled: true
|
||||
vmScrapes:
|
||||
cadvisor:
|
||||
enabled: true
|
||||
probes:
|
||||
enabled: true
|
||||
resources:
|
||||
enabled: true
|
||||
|
||||
kubeApiServer:
|
||||
enabled: true
|
||||
|
||||
kubeControllerManager:
|
||||
enabled: true
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
|
||||
vmScrape:
|
||||
spec:
|
||||
jobLabel: app.kubernetes.io/component
|
||||
namespaceSelector:
|
||||
matchNames: []
|
||||
endpoints:
|
||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
port: http-metrics
|
||||
scheme: https
|
||||
tlsConfig:
|
||||
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
serverName: localhost
|
||||
insecureSkipVerify: true
|
||||
|
||||
kubeDns:
|
||||
enabled: false
|
||||
|
||||
coreDns:
|
||||
enabled: true
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
selector:
|
||||
k8s-app: coredns
|
||||
|
||||
vmScrape:
|
||||
spec:
|
||||
jobLabel: app.kubernetes.io/component
|
||||
namespaceSelector:
|
||||
matchNames: []
|
||||
endpoints:
|
||||
- port: http-metrics
|
||||
bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
|
||||
kubeEtcd:
|
||||
enabled: false
|
||||
|
||||
kubeScheduler:
|
||||
enabled: true
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
|
||||
vmScrape:
|
||||
spec:
|
||||
jobLabel: app.kubernetes.io/component
|
||||
namespaceSelector:
|
||||
matchNames: []
|
||||
endpoints:
|
||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
port: http-metrics
|
||||
scheme: https
|
||||
tlsConfig:
|
||||
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
serverName: localhost
|
||||
insecureSkipVerify: true
|
||||
|
||||
kubeProxy:
|
||||
enabled: true
|
||||
|
||||
service:
|
||||
enabled: true
|
||||
|
||||
vmScrape:
|
||||
spec:
|
||||
jobLabel: app.kubernetes.io/component
|
||||
namespaceSelector:
|
||||
matchNames: []
|
||||
endpoints:
|
||||
- bearerTokenFile: /var/run/secrets/kubernetes.io/serviceaccount/token
|
||||
port: http-metrics
|
||||
scheme: https
|
||||
tlsConfig:
|
||||
caFile: /var/run/secrets/kubernetes.io/serviceaccount/ca.crt
|
||||
|
||||
internal: {}
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: observability
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,41 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: Application
|
||||
metadata:
|
||||
name: victoriametrics-operator
|
||||
namespace: argocd
|
||||
spec:
|
||||
project: default
|
||||
source:
|
||||
repoURL: https://victoriametrics.github.io/helm-charts/
|
||||
chart: victoria-metrics-operator
|
||||
targetRevision: 0.67.3
|
||||
helm:
|
||||
releaseName: victoriametrics-operator
|
||||
valuesObject:
|
||||
replicaCount: 1
|
||||
admissionWebhooks:
|
||||
enabled: false
|
||||
createCRD: true
|
||||
operator:
|
||||
# This enables the operator to watch for CRs in all namespaces or we can specify namespaces
|
||||
disableNamespaceRestriction: true
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 128Mi
|
||||
|
||||
destination:
|
||||
server: https://kubernetes.default.svc
|
||||
namespace: observability
|
||||
|
||||
syncPolicy:
|
||||
automated:
|
||||
prune: true
|
||||
selfHeal: true
|
||||
syncOptions:
|
||||
- CreateNamespace=true
|
||||
- ApplyOutOfSyncOnly=true
|
||||
- ServerSideApply=true
|
||||
@@ -0,0 +1,114 @@
|
||||
prometheus:
|
||||
enabled: true
|
||||
port: 9962
|
||||
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
|
||||
ipam:
|
||||
mode: kubernetes
|
||||
|
||||
operator:
|
||||
replicas: 1
|
||||
nodeSelector:
|
||||
node-role.kubernetes.io/control-plane: "true"
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 500m
|
||||
memory: 256Mi
|
||||
prometheus:
|
||||
enabled: true
|
||||
port: 9963
|
||||
metricsService: true
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 250m
|
||||
memory: 256Mi
|
||||
|
||||
kubeProxyReplacement: true
|
||||
|
||||
securityContext:
|
||||
capabilities:
|
||||
ciliumAgent:
|
||||
- CHOWN
|
||||
- KILL
|
||||
- NET_ADMIN
|
||||
- NET_RAW
|
||||
- IPC_LOCK
|
||||
- SYS_ADMIN
|
||||
- SYS_RESOURCE
|
||||
- DAC_OVERRIDE
|
||||
- FOWNER
|
||||
- SETGID
|
||||
- SETUID
|
||||
cleanCiliumState:
|
||||
- NET_ADMIN
|
||||
- SYS_ADMIN
|
||||
- SYS_RESOURCE
|
||||
|
||||
envoy:
|
||||
resources:
|
||||
requests:
|
||||
cpu: 100m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
memory: 1Gi
|
||||
prometheus:
|
||||
enabled: true
|
||||
port: "9964"
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
|
||||
cgroup:
|
||||
autoMount:
|
||||
enabled: false
|
||||
hostRoot: /sys/fs/cgroup
|
||||
|
||||
k8sServiceHost: master.k8s.internal
|
||||
k8sServicePort: 6443
|
||||
|
||||
gatewayAPI:
|
||||
enabled: true
|
||||
enableAlpn: true
|
||||
enableAppProtocol: true
|
||||
|
||||
hubble:
|
||||
metrics:
|
||||
enabled:
|
||||
- dns
|
||||
- drop
|
||||
- tcp
|
||||
- flow
|
||||
- icmp
|
||||
|
||||
port: 9965
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
|
||||
relay:
|
||||
enabled: true
|
||||
|
||||
ui:
|
||||
enabled: false
|
||||
|
||||
peerService:
|
||||
enabled: false
|
||||
clusterDomain: cluster.local
|
||||
|
||||
hostFirewall:
|
||||
enabled: true
|
||||
|
||||
l2announcements:
|
||||
enabled: true
|
||||
|
||||
bpf:
|
||||
hostLegacyRouting: false
|
||||
@@ -0,0 +1,2 @@
|
||||
helm repo add coredns https://coredns.github.io/helm
|
||||
helm upgrade --install coredns coredns/coredns --namespace kube-system
|
||||
@@ -0,0 +1,3 @@
|
||||
service:
|
||||
name: kube-dns
|
||||
clusterIP: 10.97.0.10
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: homelab-repo-password
|
||||
namespace: argocd
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
secretStoreRef:
|
||||
name: infisical
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: homelab-repo
|
||||
creationPolicy: Merge
|
||||
deletionPolicy: Retain
|
||||
data:
|
||||
- secretKey: password
|
||||
remoteRef:
|
||||
key: /argocd/ARGOCD_REPO_PASSWORD
|
||||
@@ -0,0 +1,11 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: homelab-repo
|
||||
namespace: argocd
|
||||
labels:
|
||||
argocd.argoproj.io/secret-type: repository
|
||||
stringData:
|
||||
type: git
|
||||
url: https://git.itqdev.xyz/Infrastructure/homelab.git
|
||||
username: ITQ
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: argocd-oidc-client-secret
|
||||
namespace: argocd
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
secretStoreRef:
|
||||
name: infisical
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: argocd-secret
|
||||
creationPolicy: Merge
|
||||
deletionPolicy: Retain
|
||||
data:
|
||||
- secretKey: oidc.keycloak.clientSecret
|
||||
remoteRef:
|
||||
key: /argocd/ARGOCD_OIDC_CLIENT_SECRET
|
||||
@@ -0,0 +1,30 @@
|
||||
apiVersion: argoproj.io/v1alpha1
|
||||
kind: AppProject
|
||||
metadata:
|
||||
name: default
|
||||
namespace: argocd
|
||||
|
||||
spec:
|
||||
description: Default project with maintenance sync window
|
||||
|
||||
sourceRepos:
|
||||
- "*"
|
||||
|
||||
destinations:
|
||||
- namespace: "*"
|
||||
server: "*"
|
||||
|
||||
syncWindows:
|
||||
- kind: allow
|
||||
schedule: "0 3 * * *"
|
||||
duration: 1h
|
||||
applications:
|
||||
- "*"
|
||||
manualSync: true
|
||||
|
||||
- kind: allow
|
||||
schedule: "* * * * *"
|
||||
duration: 24h
|
||||
applications:
|
||||
- "root-app"
|
||||
- "manifests"
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: cloudflare-api-token
|
||||
namespace: cert-manager
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
secretStoreRef:
|
||||
name: infisical
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: cloudflare-api-token
|
||||
creationPolicy: Orphan
|
||||
template:
|
||||
type: Opaque
|
||||
data:
|
||||
- secretKey: api-token
|
||||
remoteRef:
|
||||
key: /cert-manager/CLOUDFLARE_API_TOKEN
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: ClusterIssuer
|
||||
metadata:
|
||||
name: letsencrypt-dns
|
||||
spec:
|
||||
acme:
|
||||
email: itq.dev@ya.ru
|
||||
server: https://acme-v02.api.letsencrypt.org/directory
|
||||
privateKeySecretRef:
|
||||
name: letsencrypt-dns-account-key
|
||||
solvers:
|
||||
- dns01:
|
||||
cloudflare:
|
||||
apiTokenSecretRef:
|
||||
name: cloudflare-api-token
|
||||
key: api-token
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ClusterSecretStore
|
||||
metadata:
|
||||
name: infisical
|
||||
spec:
|
||||
provider:
|
||||
infisical:
|
||||
hostAPI: https://vault.itqdev.xyz
|
||||
auth:
|
||||
universalAuthCredentials:
|
||||
clientId:
|
||||
name: infisical-secret
|
||||
key: clientId
|
||||
namespace: external-secrets
|
||||
clientSecret:
|
||||
name: infisical-secret
|
||||
key: clientSecret
|
||||
namespace: external-secrets
|
||||
secretsScope:
|
||||
projectSlug: k8s-yandex
|
||||
environmentSlug: prod
|
||||
secretsPath: /
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: global-http-redirect
|
||||
namespace: gateway-system
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: shared-gateway
|
||||
namespace: gateway-system
|
||||
sectionName: http-redirect
|
||||
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
filters:
|
||||
- type: RequestRedirect
|
||||
requestRedirect:
|
||||
scheme: https
|
||||
statusCode: 301
|
||||
port: 443
|
||||
@@ -0,0 +1,4 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: gateway-system
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: argocd
|
||||
namespace: argocd
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: shared-gateway
|
||||
namespace: gateway-system
|
||||
sectionName: argocd-https
|
||||
|
||||
hostnames:
|
||||
- "argocd.yc.infra.itqdev.xyz"
|
||||
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: argocd-server
|
||||
port: 80
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: argocd-cert
|
||||
namespace: gateway-system
|
||||
spec:
|
||||
secretName: argocd-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-dns
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- argocd.yc.infra.itqdev.xyz
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: grafana
|
||||
namespace: grafana
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: shared-gateway
|
||||
namespace: gateway-system
|
||||
sectionName: grafana-https
|
||||
|
||||
hostnames:
|
||||
- grafana.yc.infra.itqdev.xyz
|
||||
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: grafana
|
||||
port: 80
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: grafana-cert
|
||||
namespace: gateway-system
|
||||
spec:
|
||||
secretName: grafana-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-dns
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- grafana.yc.infra.itqdev.xyz
|
||||
@@ -0,0 +1,22 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: HTTPRoute
|
||||
metadata:
|
||||
name: headlamp
|
||||
namespace: headlamp
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: shared-gateway
|
||||
namespace: gateway-system
|
||||
sectionName: headlamp-https
|
||||
|
||||
hostnames:
|
||||
- "k8s.yc.infra.itqdev.xyz"
|
||||
|
||||
rules:
|
||||
- matches:
|
||||
- path:
|
||||
type: PathPrefix
|
||||
value: /
|
||||
backendRefs:
|
||||
- name: headlamp
|
||||
port: 80
|
||||
@@ -0,0 +1,12 @@
|
||||
apiVersion: cert-manager.io/v1
|
||||
kind: Certificate
|
||||
metadata:
|
||||
name: headlamp-cert
|
||||
namespace: gateway-system
|
||||
spec:
|
||||
secretName: headlamp-tls
|
||||
issuerRef:
|
||||
name: letsencrypt-dns
|
||||
kind: ClusterIssuer
|
||||
dnsNames:
|
||||
- k8s.yc.infra.itqdev.xyz
|
||||
@@ -0,0 +1,16 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: TLSRoute
|
||||
metadata:
|
||||
name: karmada-api
|
||||
namespace: karmada-system
|
||||
spec:
|
||||
parentRefs:
|
||||
- name: shared-gateway
|
||||
namespace: gateway-system
|
||||
sectionName: karmada-tls
|
||||
hostnames:
|
||||
- karmada.yc.infra.itqdev.xyz
|
||||
rules:
|
||||
- backendRefs:
|
||||
- name: karmada-apiserver
|
||||
port: 5443
|
||||
@@ -0,0 +1,66 @@
|
||||
apiVersion: gateway.networking.k8s.io/v1
|
||||
kind: Gateway
|
||||
metadata:
|
||||
name: shared-gateway
|
||||
namespace: gateway-system
|
||||
spec:
|
||||
gatewayClassName: cilium
|
||||
listeners:
|
||||
- name: http-redirect
|
||||
port: 80
|
||||
protocol: HTTP
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
|
||||
- name: headlamp-https
|
||||
port: 443
|
||||
protocol: HTTPS
|
||||
hostname: k8s.yc.infra.itqdev.xyz
|
||||
tls:
|
||||
mode: Terminate
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
group: ""
|
||||
name: headlamp-tls
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
|
||||
- name: argocd-https
|
||||
port: 443
|
||||
protocol: HTTPS
|
||||
hostname: argocd.yc.infra.itqdev.xyz
|
||||
tls:
|
||||
mode: Terminate
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
group: ""
|
||||
name: argocd-tls
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
|
||||
- name: grafana-https
|
||||
port: 443
|
||||
protocol: HTTPS
|
||||
hostname: grafana.yc.infra.itqdev.xyz
|
||||
tls:
|
||||
mode: Terminate
|
||||
certificateRefs:
|
||||
- kind: Secret
|
||||
group: ""
|
||||
name: grafana-tls
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
|
||||
- name: karmada-tls
|
||||
port: 443
|
||||
protocol: TLS
|
||||
hostname: karmada.yc.infra.itqdev.xyz
|
||||
tls:
|
||||
mode: Passthrough
|
||||
allowedRoutes:
|
||||
namespaces:
|
||||
from: All
|
||||
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
File diff suppressed because it is too large.
Load diff
@@ -0,0 +1,548 @@
|
||||
apiVersion: v1
|
||||
data:
|
||||
etcd.json: |
|
||||
{
|
||||
"description": "etcd sample Grafana dashboard with Prometheus",
|
||||
"panels": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 0
|
||||
},
|
||||
"id": 1,
|
||||
"interval": "1m",
|
||||
"options": {
|
||||
"colorMode": "none",
|
||||
"graphMode": "none",
|
||||
"reduceOptions": {
|
||||
"calcs": [
|
||||
"lastNotNull"
|
||||
]
|
||||
}
|
||||
},
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(etcd_server_has_leader{job=~\".*etcd.*\", job=\"$cluster\"})",
|
||||
"legendFormat": "{{cluster}} - {{namespace}}\n"
|
||||
}
|
||||
],
|
||||
"title": "Up",
|
||||
"type": "stat"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "ops"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 10,
|
||||
"x": 6,
|
||||
"y": 0
|
||||
},
|
||||
"id": 2,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(rate(grpc_server_started_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\"}[$__rate_interval]))",
|
||||
"legendFormat": "RPC rate"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(rate(grpc_server_handled_total{job=~\".*etcd.*\", job=\"$cluster\",grpc_type=\"unary\",grpc_code=~\"Unknown|FailedPrecondition|ResourceExhausted|Internal|Unavailable|DataLoss|DeadlineExceeded\"}[$__rate_interval]))",
|
||||
"legendFormat": "RPC failed rate"
|
||||
}
|
||||
],
|
||||
"title": "RPC rate",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 0
|
||||
},
|
||||
"id": 3,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Watch\",grpc_type=\"bidi_stream\"})",
|
||||
"legendFormat": "Watch streams"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(grpc_server_started_total{job=~\".*etcd.*\",job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"}) - sum(grpc_server_handled_total{job=\"$cluster\",grpc_service=\"etcdserverpb.Lease\",grpc_type=\"bidi_stream\"})",
|
||||
"legendFormat": "Lease streams"
|
||||
}
|
||||
],
|
||||
"title": "Active streams",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "bytes"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 25
|
||||
},
|
||||
"id": 4,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "etcd_mvcc_db_total_size_in_bytes{job=~\".*etcd.*\", job=\"$cluster\"}",
|
||||
"legendFormat": "{{instance}} DB size"
|
||||
}
|
||||
],
|
||||
"title": "DB size",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "s"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 25
|
||||
},
|
||||
"id": 5,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "histogram_quantile(0.99, sum(rate(etcd_disk_wal_fsync_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))",
|
||||
"legendFormat": "{{instance}} WAL fsync"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "histogram_quantile(0.99, sum(rate(etcd_disk_backend_commit_duration_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance, le))",
|
||||
"legendFormat": "{{instance}} DB fsync"
|
||||
}
|
||||
],
|
||||
"title": "Disk sync duration",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "bytes"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 25
|
||||
},
|
||||
"id": 6,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "process_resident_memory_bytes{job=~\".*etcd.*\", job=\"$cluster\"}",
|
||||
"legendFormat": "{{instance}} resident memory"
|
||||
}
|
||||
],
|
||||
"title": "Memory",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "Bps"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 6,
|
||||
"x": 0,
|
||||
"y": 50
|
||||
},
|
||||
"id": 7,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "rate(etcd_network_client_grpc_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])",
|
||||
"legendFormat": "{{instance}} client traffic in"
|
||||
}
|
||||
],
|
||||
"title": "Client traffic in",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "Bps"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 6,
|
||||
"x": 6,
|
||||
"y": 50
|
||||
},
|
||||
"id": 8,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "rate(etcd_network_client_grpc_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])",
|
||||
"legendFormat": "{{instance}} client traffic out"
|
||||
}
|
||||
],
|
||||
"title": "Client traffic out",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "Bps"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 6,
|
||||
"x": 12,
|
||||
"y": 50
|
||||
},
|
||||
"id": 9,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(rate(etcd_network_peer_received_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)",
|
||||
"legendFormat": "{{instance}} peer traffic in"
|
||||
}
|
||||
],
|
||||
"title": "Peer traffic in",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "Bps"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 6,
|
||||
"x": 18,
|
||||
"y": 50
|
||||
},
|
||||
"id": 10,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "sum(rate(etcd_network_peer_sent_bytes_total{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])) by (instance)",
|
||||
"legendFormat": "{{instance}} peer traffic out"
|
||||
}
|
||||
],
|
||||
"title": "Peer traffic out",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 0,
|
||||
"y": 75
|
||||
},
|
||||
"id": 11,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])",
|
||||
"legendFormat": "{{instance}} total leader elections per day"
|
||||
}
|
||||
],
|
||||
"title": "Raft proposals",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
}
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 8,
|
||||
"y": 75
|
||||
},
|
||||
"id": 12,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "changes(etcd_server_leader_changes_seen_total{job=~\".*etcd.*\", job=\"$cluster\"}[1d])",
|
||||
"legendFormat": "{{instance}} total leader elections per day"
|
||||
}
|
||||
],
|
||||
"title": "Total leader elections per day",
|
||||
"type": "timeseries"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "datasource",
|
||||
"uid": "-- Mixed --"
|
||||
},
|
||||
"fieldConfig": {
|
||||
"defaults": {
|
||||
"custom": {
|
||||
"fillOpacity": 0,
|
||||
"lineWidth": 2,
|
||||
"showPoints": "never"
|
||||
},
|
||||
"unit": "s"
|
||||
}
|
||||
},
|
||||
"gridPos": {
|
||||
"h": 7,
|
||||
"w": 8,
|
||||
"x": 16,
|
||||
"y": 75
|
||||
},
|
||||
"id": 13,
|
||||
"interval": "1m",
|
||||
"pluginVersion": "v10.0.0",
|
||||
"targets": [
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "$datasource"
|
||||
},
|
||||
"expr": "histogram_quantile(0.99, sum by (instance, le) (rate(etcd_network_peer_round_trip_time_seconds_bucket{job=~\".*etcd.*\", job=\"$cluster\"}[$__rate_interval])))",
|
||||
"legendFormat": "{{instance}} peer round trip time"
|
||||
}
|
||||
],
|
||||
"title": "Peer round trip time",
|
||||
"type": "timeseries"
|
||||
}
|
||||
],
|
||||
"refresh": "10s",
|
||||
"schemaVersion": 36,
|
||||
"tags": [
|
||||
"etcd-mixin"
|
||||
],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"label": "Data Source",
|
||||
"name": "datasource",
|
||||
"query": "prometheus",
|
||||
"type": "datasource"
|
||||
},
|
||||
{
|
||||
"datasource": {
|
||||
"type": "prometheus",
|
||||
"uid": "${datasource}"
|
||||
},
|
||||
"label": "cluster",
|
||||
"name": "cluster",
|
||||
"query": "label_values(etcd_server_has_leader{job=~\".*etcd.*\"}, job)",
|
||||
"refresh": 2,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {
|
||||
"from": "now-15m",
|
||||
"to": "now"
|
||||
},
|
||||
"timezone": "utc",
|
||||
"title": "Kubernetes / etcd",
|
||||
"uid": "c2f4e12cdf69feb95caa41a5a1b423d9"
|
||||
}
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: etcd-grafana-dashboard
|
||||
namespace: kube-system
|
||||
labels:
|
||||
grafana_dashboard: "1"
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: grafana-secrets
|
||||
namespace: grafana
|
||||
spec:
|
||||
secretStoreRef:
|
||||
name: infisical
|
||||
kind: ClusterSecretStore
|
||||
|
||||
target:
|
||||
name: grafana-secrets
|
||||
creationPolicy: Owner
|
||||
template:
|
||||
engineVersion: v2
|
||||
type: Opaque
|
||||
|
||||
data:
|
||||
- secretKey: client-secret
|
||||
remoteRef:
|
||||
key: /grafana/GRAFANA_OAUTH_CLIENT_SECRET
|
||||
|
||||
refreshInterval: 1h
|
||||
@@ -0,0 +1,26 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
labels:
|
||||
grafana_datasource: "1"
|
||||
name: victoriametrics-grafana-datasource
|
||||
namespace: observability
|
||||
data:
|
||||
victoriametrics.yaml: |-
|
||||
apiVersion: 1
|
||||
prune: true
|
||||
|
||||
datasources:
|
||||
- name: "VictoriaMetrics"
|
||||
type: prometheus
|
||||
access: proxy
|
||||
orgId: 1
|
||||
uid: "victoriametrics"
|
||||
url: "http://vmsingle-main.observability.svc.cluster.local:8429"
|
||||
basicAuth: false
|
||||
isDefault: true
|
||||
editable: false
|
||||
jsonData:
|
||||
httpMethod: POST
|
||||
queryTimeout: 10s
|
||||
timeInterval: "10s"
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: kubernetes-lb
|
||||
namespace: default
|
||||
spec:
|
||||
type: LoadBalancer
|
||||
ports:
|
||||
- name: https
|
||||
port: 8443
|
||||
targetPort: 6443
|
||||
protocol: TCP
|
||||
internalTrafficPolicy: Cluster
|
||||
ipFamilies:
|
||||
- IPv4
|
||||
ipFamilyPolicy: SingleStack
|
||||
sessionAffinity: None
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Endpoints
|
||||
metadata:
|
||||
name: kubernetes-lb
|
||||
namespace: default
|
||||
subsets:
|
||||
- addresses:
|
||||
- ip: 10.4.0.10
|
||||
- ip: 10.5.0.24
|
||||
ports:
|
||||
- name: https
|
||||
port: 6443
|
||||
protocol: TCP
|
||||
@@ -0,0 +1,186 @@
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: local-path-storage
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: local-path-provisioner-service-account
|
||||
namespace: local-path-storage
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: local-path-provisioner-role
|
||||
namespace: local-path-storage
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["pods"]
|
||||
verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: local-path-provisioner-role
|
||||
rules:
|
||||
- apiGroups: [""]
|
||||
resources: ["nodes", "persistentvolumeclaims", "configmaps", "pods", "pods/log"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
- apiGroups: [""]
|
||||
resources: ["persistentvolumes"]
|
||||
verbs: ["get", "list", "watch", "create", "patch", "update", "delete"]
|
||||
- apiGroups: [""]
|
||||
resources: ["events"]
|
||||
verbs: ["create", "patch"]
|
||||
- apiGroups: ["storage.k8s.io"]
|
||||
resources: ["storageclasses"]
|
||||
verbs: ["get", "list", "watch"]
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: local-path-provisioner-bind
|
||||
namespace: local-path-storage
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: local-path-provisioner-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: local-path-provisioner-service-account
|
||||
namespace: local-path-storage
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: local-path-provisioner-bind
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: local-path-provisioner-role
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: local-path-provisioner-service-account
|
||||
namespace: local-path-storage
|
||||
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: local-path-provisioner
|
||||
namespace: local-path-storage
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: local-path-provisioner
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: local-path-provisioner
|
||||
spec:
|
||||
serviceAccountName: local-path-provisioner-service-account
|
||||
containers:
|
||||
- name: local-path-provisioner
|
||||
image: docker.io/rancher/local-path-provisioner:v0.0.37
|
||||
imagePullPolicy: IfNotPresent
|
||||
command:
|
||||
- local-path-provisioner
|
||||
- --debug
|
||||
- start
|
||||
- --config
|
||||
- /etc/config/config.json
|
||||
ports:
|
||||
- name: health
|
||||
containerPort: 8080
|
||||
protocol: TCP
|
||||
startupProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: health
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
failureThreshold: 12
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /health
|
||||
port: health
|
||||
initialDelaySeconds: 10
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /ready
|
||||
port: health
|
||||
initialDelaySeconds: 5
|
||||
periodSeconds: 5
|
||||
volumeMounts:
|
||||
- name: config-volume
|
||||
mountPath: /etc/config/
|
||||
env:
|
||||
- name: POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
- name: CONFIG_MOUNT_PATH
|
||||
value: /etc/config/
|
||||
- name: HEALTH_PORT
|
||||
value: "8080"
|
||||
volumes:
|
||||
- name: config-volume
|
||||
configMap:
|
||||
name: local-path-config
|
||||
|
||||
---
|
||||
apiVersion: storage.k8s.io/v1
|
||||
kind: StorageClass
|
||||
metadata:
|
||||
name: local-path
|
||||
provisioner: rancher.io/local-path
|
||||
volumeBindingMode: WaitForFirstConsumer
|
||||
reclaimPolicy: Delete
|
||||
|
||||
---
|
||||
kind: ConfigMap
|
||||
apiVersion: v1
|
||||
metadata:
|
||||
name: local-path-config
|
||||
namespace: local-path-storage
|
||||
data:
|
||||
config.json: |-
|
||||
{
|
||||
"nodePathMap":[
|
||||
{
|
||||
"node":"DEFAULT_PATH_FOR_NON_LISTED_NODES",
|
||||
"paths":["/mnt/k3s/storage"]
|
||||
}
|
||||
]
|
||||
}
|
||||
setup: |-
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
mkdir -m 0777 -p "$VOL_DIR"
|
||||
teardown: |-
|
||||
#!/bin/sh
|
||||
set -eu
|
||||
rm -rf "$VOL_DIR"
|
||||
helperPod.yaml: |-
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: helper-pod
|
||||
spec:
|
||||
priorityClassName: system-node-critical
|
||||
tolerations:
|
||||
- key: node.kubernetes.io/disk-pressure
|
||||
operator: Exists
|
||||
effect: NoSchedule
|
||||
containers:
|
||||
- name: helper-pod
|
||||
image: docker.io/library/busybox
|
||||
imagePullPolicy: IfNotPresent
|
||||
@@ -0,0 +1,41 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: kube-health
|
||||
namespace: observability
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: kube-health
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- /livez
|
||||
- /readyz
|
||||
verbs:
|
||||
- get
|
||||
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: kube-health
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: kube-health
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: kube-health
|
||||
namespace: observability
|
||||
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: kube-health-token
|
||||
namespace: observability
|
||||
annotations:
|
||||
kubernetes.io/service-account.name: kube-health
|
||||
type: kubernetes.io/service-account-token
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: external-secrets.io/v1
|
||||
kind: ExternalSecret
|
||||
metadata:
|
||||
name: submariner-ipsec-psk
|
||||
namespace: submariner-operator
|
||||
spec:
|
||||
refreshInterval: 1h
|
||||
secretStoreRef:
|
||||
name: infisical
|
||||
kind: ClusterSecretStore
|
||||
target:
|
||||
name: submariner-ipsec-psk
|
||||
creationPolicy: Owner
|
||||
template:
|
||||
type: Opaque
|
||||
data:
|
||||
- secretKey: psk
|
||||
remoteRef:
|
||||
key: /submariner/SUBMARINER_IPSEC_PSK
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMPodScrape
|
||||
metadata:
|
||||
name: cilium-agent
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: cilium
|
||||
|
||||
podMetricsEndpoints:
|
||||
- port: prometheus
|
||||
interval: 15s
|
||||
scrapeTimeout: 10s
|
||||
|
||||
relabelConfigs:
|
||||
- action: replace
|
||||
sourceLabels:
|
||||
- __meta_kubernetes_pod_node_name
|
||||
targetLabel: node
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMPodScrape
|
||||
metadata:
|
||||
name: cilium-envoy
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: cilium-envoy
|
||||
|
||||
podMetricsEndpoints:
|
||||
- port: envoy-metrics
|
||||
interval: 15s
|
||||
scrapeTimeout: 10s
|
||||
|
||||
relabelConfigs:
|
||||
- action: replace
|
||||
sourceLabels:
|
||||
- __meta_kubernetes_pod_node_name
|
||||
targetLabel: node
|
||||
@@ -0,0 +1,20 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMPodScrape
|
||||
metadata:
|
||||
name: hubble-metrics
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
k8s-app: cilium
|
||||
|
||||
podMetricsEndpoints:
|
||||
- port: hubble-metrics
|
||||
interval: 15s
|
||||
scrapeTimeout: 10s
|
||||
|
||||
relabelConfigs:
|
||||
- action: replace
|
||||
sourceLabels:
|
||||
- __meta_kubernetes_pod_node_name
|
||||
targetLabel: node
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMServiceScrape
|
||||
metadata:
|
||||
name: cilium-operator
|
||||
namespace: kube-system
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
io.cilium/app: operator
|
||||
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- kube-system
|
||||
|
||||
endpoints:
|
||||
- port: metrics
|
||||
interval: 30s
|
||||
scrapeTimeout: 10s
|
||||
@@ -0,0 +1,18 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMStaticScrape
|
||||
metadata:
|
||||
name: etcd
|
||||
namespace: observability
|
||||
labels:
|
||||
app.kubernetes.io/instance: victoria-metrics-k8s-stack
|
||||
spec:
|
||||
jobName: kube-etcd
|
||||
targetEndpoints:
|
||||
- targets:
|
||||
- 10.4.0.3:2381
|
||||
- 10.4.0.10:2381
|
||||
- 10.5.0.24:2381
|
||||
labels:
|
||||
job: kube-etcd
|
||||
component: etcd
|
||||
scheme: http
|
||||
@@ -0,0 +1,31 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMAgent
|
||||
metadata:
|
||||
name: main
|
||||
namespace: observability
|
||||
spec:
|
||||
remoteWrite:
|
||||
- url: http://vmsingle-main:8429/api/v1/write
|
||||
|
||||
staticScrapeSelector: {}
|
||||
staticScrapeNamespaceSelector: {}
|
||||
|
||||
serviceScrapeSelector: {}
|
||||
serviceScrapeNamespaceSelector: {}
|
||||
|
||||
nodeScrapeSelector: {}
|
||||
nodeScrapeNamespaceSelector: {}
|
||||
|
||||
podScrapeSelector: {}
|
||||
podScrapeNamespaceSelector: {}
|
||||
|
||||
scrapeConfigSelector: {}
|
||||
scrapeConfigNamespaceSelector: {}
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 20m
|
||||
memory: 64Mi
|
||||
limits:
|
||||
cpu: 100m
|
||||
memory: 256Mi
|
||||
@@ -0,0 +1,21 @@
|
||||
apiVersion: operator.victoriametrics.com/v1beta1
|
||||
kind: VMSingle
|
||||
metadata:
|
||||
name: main
|
||||
namespace: observability
|
||||
spec:
|
||||
retentionPeriod: 14d
|
||||
|
||||
storage:
|
||||
storageClassName: local-path
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
|
||||
resources:
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 128Mi
|
||||
limits:
|
||||
cpu: 1000m
|
||||
memory: 512Mi
|
||||
Reference in new issue
Block a user