imfreedom/k8s-cluster

Lower the resources for trac

15 months ago, Gary Kramlich
5e0f351f8ee3
Lower the resources for trac

We haven't had any stability issues with trac since we redirected the issues,
so we're going to lower the resources to reflect that and hopefully bring them
down a bit more over time.
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: prometheus
rules:
- apiGroups: [""]
resources:
- namespaces
- nodes
- nodes/metrics
- services
- endpoints
- pods
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources:
- configmaps
verbs: ["get"]
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs: ["get", "list", "watch"]
- nonResourceURLs: ["/metrics"]
verbs: ["get"]
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: prometheus
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus
subjects:
- kind: ServiceAccount
name: prometheus
namespace: monitoring
---
apiVersion: monitoring.coreos.com/v1
kind: Prometheus
metadata:
name: prometheus
labels:
app: prometheus
spec:
additionalScrapeConfigs:
name: prometheus-scrape-configs
key: prometheus-scrape-configs.yaml
serviceAccountName: prometheus
serviceMonitorNamespaceSelector:
matchLabels:
prometheus: cluster-wide
serviceMonitorSelector:
matchLabels:
prometheus: cluster-wide
resources:
limits:
cpu: 1000m
memory: 512Mi
requests:
cpu: 500m
memory: 256Mi
enableAdminAPI: false
securityContext:
fsGroup: 65534
runAsUser: 65534
storage:
volumeClaimTemplate:
spec:
resources:
requests:
storage: 2Gi
# externalUrl: 'https://monitoring.imfreedom.org/prometheus/'
# routePrefix: '/'
---
apiVersion: v1
kind: Service
metadata:
name: prometheus
labels:
app: prometheus
spec:
ports:
- port: 9090
protocol: TCP
selector:
app: prometheus
prometheus: prometheus
---