Skip to content

Commit

Permalink
addressing comments
Browse files Browse the repository at this point in the history
  • Loading branch information
tanmayja committed Aug 13, 2024
1 parent 0c8ae2d commit 94c36b1
Show file tree
Hide file tree
Showing 16 changed files with 28 additions and 78 deletions.
1 change: 1 addition & 0 deletions config/monitoring/alertmanager/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ labels:
- includeSelectors: true
pairs:
app.kubernetes.io/component: aerospike-alertmanager
app: aerospike-monitoring-stack-alertmanager

resources:
- statefulset.yaml
Expand Down
3 changes: 2 additions & 1 deletion config/monitoring/alertmanager/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: alertmanagerdata
name: alertmanager-data
namespace: monitoring
spec:
accessModes:
- ReadWriteOnce
Expand Down
9 changes: 1 addition & 8 deletions config/monitoring/alertmanager/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ kind: Service
metadata:
name: aerospike-monitoring-stack-alertmanager
namespace: monitoring
labels:
app: aerospike-monitoring-stack-alertmanager
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: aerospike-alertmanager
spec:
ports:
- name: http
port: 9093
selector:
app: aerospike-monitoring-stack-alertmanager
port: 9093
17 changes: 5 additions & 12 deletions config/monitoring/alertmanager/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,7 @@ kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-alertmanager
namespace: monitoring
labels:
app: aerospike-monitoring-stack-alertmanager
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: aerospike-alertmanager
unique-app: aerospike-monitoring-stack-alertmanager
spec:
selector: {}
template:
spec:
containers:
Expand All @@ -35,17 +28,17 @@ spec:
port: 9093
volumeMounts:
- mountPath: /etc/alertmanager
name: alertmanagerconf
name: alertmanager-conf
- mountPath: /alertmanager
name: alertmanagerdata
name: alertmanager-data
securityContext:
fsGroup: 26
serviceAccountName: aerospike-monitoring-stack
volumes:
- name: alertmanagerdata
- name: alertmanager-data
persistentVolumeClaim:
claimName: alertmanagerdata
- name: alertmanagerconf
claimName: alertmanager-data
- name: alertmanager-conf
configMap:
defaultMode: 420
name: alertmanager-config
3 changes: 2 additions & 1 deletion config/monitoring/grafana/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ labels:
- includeSelectors: true
pairs:
app.kubernetes.io/component: aerospike-grafana
app: aerospike-monitoring-stack-grafana

resources:
- statefulset.yaml
Expand All @@ -21,7 +22,7 @@ configMapGenerator:
- config/grafana.ini
- name: grafana-dashboards
files:
- config/aerospike_grafana_dashboards.yaml
- config/aerospike_grafana_dashboards_config.yaml

generatorOptions:
disableNameSuffixHash: true
3 changes: 2 additions & 1 deletion config/monitoring/grafana/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: grafanadata
name: grafana-data
namespace: monitoring
spec:
accessModes:
- ReadWriteOnce
Expand Down
9 changes: 1 addition & 8 deletions config/monitoring/grafana/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,9 @@ kind: Service
metadata:
name: aerospike-monitoring-stack-grafana
namespace: monitoring
labels:
app: aerospike-monitoring-stack-grafana
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: grafana
spec:
ports:
- name: http
port: 80
protocol: TCP
targetPort: 3000
selector:
app: aerospike-monitoring-stack-grafana
targetPort: 3000
17 changes: 3 additions & 14 deletions config/monitoring/grafana/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,10 @@ kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-grafana
namespace: monitoring
labels: &Labels
app: aerospike-monitoring-stack-grafana
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: grafana
unique-app: aerospike-monitoring-stack-grafana
spec:
serviceName: aerospike-monitoring-stack-grafana
replicas: 1
selector:
matchLabels: *Labels
template:
metadata:
labels: *Labels
annotations:
spec:
serviceAccountName: aerospike-monitoring-stack
terminationGracePeriodSeconds: 120
Expand All @@ -38,7 +27,7 @@ spec:
- name: node-dashboard
mountPath: "/var/lib/grafana/dashboards/node.json"
subPath: node.json
- name: grafanadata
- name: grafana-data
mountPath: "/data"
ports:
- name: service
Expand Down Expand Up @@ -93,6 +82,6 @@ spec:
configMap:
defaultMode: 420
name: node-dashboard
- name: grafanadata
- name: grafana-data
persistentVolumeClaim:
claimName: grafanadata
claimName: grafana-data
4 changes: 1 addition & 3 deletions config/monitoring/prometheus/clusterrole.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,7 @@ kind: ClusterRole
metadata:
labels:
app: aerospike-monitoring-stack
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
name: aerospike-monitoring-stack-aerospike-monitoring-stack
name: aerospike-monitoring-stack
rules:
- apiGroups:
- ""
Expand Down
6 changes: 2 additions & 4 deletions config/monitoring/prometheus/clusterrolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ kind: ClusterRoleBinding
metadata:
labels:
app: aerospike-monitoring-stack
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
name: aerospike-monitoring-stack-aerospike-monitoring-stack
name: aerospike-monitoring-stack
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: aerospike-monitoring-stack-aerospike-monitoring-stack
name: aerospike-monitoring-stack
subjects:
- kind: ServiceAccount
name: aerospike-monitoring-stack
Expand Down
1 change: 1 addition & 0 deletions config/monitoring/prometheus/kustomization.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ labels:
- includeSelectors: true
pairs:
app.kubernetes.io/component: aerospike-prometheus
app: aerospike-monitoring-stack-prometheus

resources:
- statefulset.yaml
Expand Down
3 changes: 2 additions & 1 deletion config/monitoring/prometheus/pvc.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: prometheusdata
name: prometheus-data
namespace: monitoring
spec:
accessModes:
- ReadWriteOnce
Expand Down
9 changes: 1 addition & 8 deletions config/monitoring/prometheus/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,10 @@ apiVersion: v1
metadata:
name: aerospike-monitoring-stack-prometheus
namespace: monitoring
labels:
app: aerospike-monitoring-stack-prometheus
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: prometheus
spec:
ports:
- name: http
port: 9090
protocol: TCP
targetPort: 9090
sessionAffinity: ClientIP
selector:
app: aerospike-monitoring-stack-prometheus
sessionAffinity: ClientIP
2 changes: 0 additions & 2 deletions config/monitoring/prometheus/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,5 @@ kind: ServiceAccount
metadata:
labels:
app: aerospike-monitoring-stack
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
name: aerospike-monitoring-stack
namespace: monitoring
19 changes: 4 additions & 15 deletions config/monitoring/prometheus/statefulset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,24 +3,13 @@ kind: StatefulSet
metadata:
name: aerospike-monitoring-stack-prometheus
namespace: monitoring
labels: &Labels
app: aerospike-monitoring-stack-prometheus
chart: aerospike-monitoring-stack
release: aerospike-monitoring-stack
app.kubernetes.io/component: prometheus
unique-app: aerospike-monitoring-stack-prometheus
spec:
serviceName: aerospike-monitoring-stack-prometheus
replicas: 1
podManagementPolicy: Parallel
updateStrategy:
type: RollingUpdate
selector:
matchLabels: *Labels
template:
metadata:
labels: *Labels
annotations:
spec:
serviceAccountName: aerospike-monitoring-stack
containers:
Expand Down Expand Up @@ -59,18 +48,18 @@ spec:
- name: "prometheus-data"
mountPath: /data
- mountPath: /etc/prometheus/alert-rules.d
name: alertmanagerrules
name: alert-manager-rules
terminationGracePeriodSeconds: 120
securityContext:
fsGroup: 65534
volumes:
- name: config-volume
configMap:
name: aerospike-monitoring-stack-prometheus-config
- name: "prometheus-data"
- name: prometheus-data
persistentVolumeClaim:
claimName: prometheusdata
- name: alertmanagerrules
claimName: prometheus-data
- name: alert-manager-rules
configMap:
defaultMode: 420
name: alert-rules-config

0 comments on commit 94c36b1

Please sign in to comment.