Skip to content

Commit

Permalink
redis-exporter
Browse files Browse the repository at this point in the history
  • Loading branch information
jinia91 committed Nov 12, 2024
1 parent f32a06f commit 91220e0
Show file tree
Hide file tree
Showing 2 changed files with 143 additions and 115 deletions.
228 changes: 114 additions & 114 deletions deploy/jiniaslog/monolith/redis/redis-exporter.yml
Original file line number Diff line number Diff line change
@@ -1,114 +1,114 @@
---
# Source: prometheus-redis-exporter/templates/serviceaccount.yaml
apiVersion: v1
kind: ServiceAccount
metadata:
name: redis-exporter-prometheus-redis-exporter
labels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
app.kubernetes.io/version: "v1.66.0"
---
# Source: prometheus-redis-exporter/templates/role.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: Role
metadata:
name: redis-exporter-prometheus-redis-exporter
labels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
app.kubernetes.io/version: "v1.66.0"
rules:
- apiGroups: ['extensions']
resources: ['podsecuritypolicies']
verbs: ['use']
resourceNames: [redis-exporter-prometheus-redis-exporter]
---
# Source: prometheus-redis-exporter/templates/rolebinding.yaml
apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: redis-exporter-prometheus-redis-exporter
labels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
app.kubernetes.io/version: "v1.66.0"
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: Role
name: redis-exporter-prometheus-redis-exporter
subjects:
- kind: ServiceAccount
name: redis-exporter-prometheus-redis-exporter
---
# Source: prometheus-redis-exporter/templates/service.yaml
apiVersion: v1
kind: Service
metadata:
name: redis-exporter-prometheus-redis-exporter
labels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
app.kubernetes.io/version: "v1.66.0"
prometheus.io/scrape: "true"
prometheus.io/port: "9121"
annotations:
{}
spec:
type: ClusterIP
ports:
- name: redis-exporter
port: 9121
targetPort: exporter-port
protocol: TCP
selector:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
---
# Source: prometheus-redis-exporter/templates/deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-exporter-prometheus-redis-exporter
labels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
app.kubernetes.io/version: "v1.66.0"
annotations:
{}
spec:
replicas: 1
selector:
matchLabels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
template:
metadata:
annotations:
{}
labels:
app.kubernetes.io/name: prometheus-redis-exporter
app.kubernetes.io/instance: redis-exporter
app.kubernetes.io/version: "v1.66.0"
spec:
serviceAccountName: redis-exporter-prometheus-redis-exporter
containers:
- name: prometheus-redis-exporter
image: "oliver006/redis_exporter:v1.66.0"
imagePullPolicy: IfNotPresent
ports:
- name: exporter-port
containerPort: 9121
env:
- name: REDIS_ADDR
value: redis://jinias-redis-ha:6379
livenessProbe:
httpGet:
path: /
port: exporter-port
readinessProbe:
httpGet:
path: /
port: exporter-port
resources:
{}
#---
## Source: prometheus-redis-exporter/templates/serviceaccount.yaml
#apiVersion: v1
#kind: ServiceAccount
#metadata:
# name: redis-exporter-prometheus-redis-exporter
# labels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# app.kubernetes.io/version: "v1.66.0"
#---
## Source: prometheus-redis-exporter/templates/role.yaml
#apiVersion: rbac.authorization.k8s.io/v1
#kind: Role
#metadata:
# name: redis-exporter-prometheus-redis-exporter
# labels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# app.kubernetes.io/version: "v1.66.0"
#rules:
#- apiGroups: ['extensions']
# resources: ['podsecuritypolicies']
# verbs: ['use']
# resourceNames: [redis-exporter-prometheus-redis-exporter]
#---
## Source: prometheus-redis-exporter/templates/rolebinding.yaml
#apiVersion: rbac.authorization.k8s.io/v1
#kind: RoleBinding
#metadata:
# name: redis-exporter-prometheus-redis-exporter
# labels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# app.kubernetes.io/version: "v1.66.0"
#roleRef:
# apiGroup: rbac.authorization.k8s.io
# kind: Role
# name: redis-exporter-prometheus-redis-exporter
#subjects:
#- kind: ServiceAccount
# name: redis-exporter-prometheus-redis-exporter
#---
## Source: prometheus-redis-exporter/templates/service.yaml
#apiVersion: v1
#kind: Service
#metadata:
# name: redis-exporter-prometheus-redis-exporter
# labels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# app.kubernetes.io/version: "v1.66.0"
# prometheus.io/scrape: "true"
# prometheus.io/port: "9121"
# annotations:
# {}
#spec:
# type: ClusterIP
# ports:
# - name: redis-exporter
# port: 9121
# targetPort: exporter-port
# protocol: TCP
# selector:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
#---
## Source: prometheus-redis-exporter/templates/deployment.yaml
#apiVersion: apps/v1
#kind: Deployment
#metadata:
# name: redis-exporter-prometheus-redis-exporter
# labels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# app.kubernetes.io/version: "v1.66.0"
# annotations:
# {}
#spec:
# replicas: 1
# selector:
# matchLabels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# template:
# metadata:
# annotations:
# {}
# labels:
# app.kubernetes.io/name: prometheus-redis-exporter
# app.kubernetes.io/instance: redis-exporter
# app.kubernetes.io/version: "v1.66.0"
# spec:
# serviceAccountName: redis-exporter-prometheus-redis-exporter
# containers:
# - name: prometheus-redis-exporter
# image: "oliver006/redis_exporter:v1.66.0"
# imagePullPolicy: IfNotPresent
# ports:
# - name: exporter-port
# containerPort: 9121
# env:
# - name: REDIS_ADDR
# value: redis://jinias-redis-ha:6379
# livenessProbe:
# httpGet:
# path: /
# port: exporter-port
# readinessProbe:
# httpGet:
# path: /
# port: exporter-port
# resources:
# {}
30 changes: 29 additions & 1 deletion deploy/jiniaslog/monolith/redis/redis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -787,6 +787,10 @@ spec:
port: 26379
protocol: TCP
targetPort: sentinel
- name: metrics
port: 9121
protocol: TCP
targetPort: 9121
selector:
release: jinias
app: redis-ha
Expand Down Expand Up @@ -899,6 +903,9 @@ spec:
metadata:
annotations:
checksum/init-config: 35476e45d4cc022feb5f56366eec7a3f71e1f3a10d86c29d8dca4c122db291fe
prometheus.io/scrape: "true"
prometheus.io/port: "9121"

labels:
release: jinias
app: redis-ha
Expand Down Expand Up @@ -1088,6 +1095,28 @@ spec:
lifecycle:
{}

- name: redis-exporter
image: oliver006/redis_exporter:v1.66.0
imagePullPolicy: IfNotPresent
env:
- name: REDIS_ADDR
value: "redis://localhost:6379"
ports:
- name: exporter-port
containerPort: 9121
livenessProbe:
httpGet:
path: /
port: exporter-port
initialDelaySeconds: 5
periodSeconds: 10
readinessProbe:
httpGet:
path: /
port: exporter-port
initialDelaySeconds: 5
periodSeconds: 10

- name: split-brain-fix
image: public.ecr.aws/docker/library/redis:7.2.4-alpine
imagePullPolicy: IfNotPresent
Expand Down Expand Up @@ -1132,7 +1161,6 @@ spec:
kind: PersistentVolumeClaim
metadata:
name: data
annotations:
labels:
{}

Expand Down

0 comments on commit 91220e0

Please sign in to comment.