Created
July 6, 2023 18:45
-
-
Save rootfs/7ee3098af59b291964968e05536947dc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Namespace | |
metadata: | |
labels: | |
sustainable-computing.io/app: kepler | |
name: kepler | |
--- | |
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
labels: | |
sustainable-computing.io/app: kepler | |
name: kepler-sa | |
namespace: kepler | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: Role | |
metadata: | |
labels: | |
app.kubernetes.io/component: prometheus | |
app.kubernetes.io/instance: k8s | |
app.kubernetes.io/name: prometheus | |
sustainable-computing.io/app: kepler | |
name: prometheus-k8s | |
namespace: kepler | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- services | |
- endpoints | |
- pods | |
verbs: | |
- get | |
- list | |
- watch | |
- apiGroups: | |
- extensions | |
resources: | |
- ingresses | |
verbs: | |
- get | |
- list | |
- watch | |
- apiGroups: | |
- networking.k8s.io | |
resources: | |
- ingresses | |
verbs: | |
- get | |
- list | |
- watch | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRole | |
metadata: | |
labels: | |
sustainable-computing.io/app: kepler | |
name: kepler-clusterrole | |
rules: | |
- apiGroups: | |
- "" | |
resources: | |
- nodes/metrics | |
- nodes/proxy | |
- nodes/stats | |
- pods | |
verbs: | |
- get | |
- watch | |
- list | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: RoleBinding | |
metadata: | |
labels: | |
app.kubernetes.io/component: prometheus | |
app.kubernetes.io/instance: k8s | |
app.kubernetes.io/name: prometheus | |
sustainable-computing.io/app: kepler | |
name: prometheus-k8s | |
namespace: kepler | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: Role | |
name: prometheus-k8s | |
subjects: | |
- kind: ServiceAccount | |
name: prometheus-k8s | |
namespace: monitoring | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1 | |
kind: ClusterRoleBinding | |
metadata: | |
labels: | |
sustainable-computing.io/app: kepler | |
name: kepler-clusterrole-binding | |
roleRef: | |
apiGroup: rbac.authorization.k8s.io | |
kind: ClusterRole | |
name: kepler-clusterrole | |
subjects: | |
- kind: ServiceAccount | |
name: kepler-sa | |
namespace: kepler | |
--- | |
apiVersion: v1 | |
data: | |
BIND_ADDRESS: 0.0.0.0:9102 | |
CGROUP_METRICS: '*' | |
CPU_ARCH_OVERRIDE: "" | |
ENABLE_EBPF_CGROUPID: "true" | |
ENABLE_GPU: "true" | |
ENABLE_PROCESS_METRICS: "false" | |
EXPOSE_CGROUP_METRICS: "true" | |
EXPOSE_HW_COUNTER_METRICS: "true" | |
EXPOSE_IRQ_COUNTER_METRICS: "true" | |
EXPOSE_KUBELET_METRICS: "true" | |
KEPLER_LOG_LEVEL: "1" | |
KEPLER_NAMESPACE: kepler | |
METRIC_PATH: /metrics | |
MODEL_CONFIG: | | |
CONTAINER_COMPONENTS_ESTIMATOR=false | |
# by default we use buildin weight file | |
# CONTAINER_COMPONENTS_INIT_URL=https://raw.githubusercontent.com/sustainable-computing-io/kepler-model-server/main/tests/test_models/DynComponentModelWeight/CgroupOnly/ScikitMixed/ScikitMixed.json | |
kind: ConfigMap | |
metadata: | |
labels: | |
sustainable-computing.io/app: kepler | |
name: kepler-cfm | |
namespace: kepler | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
labels: | |
app.kubernetes.io/component: exporter | |
app.kubernetes.io/name: kepler-exporter | |
sustainable-computing.io/app: kepler | |
name: kepler-exporter | |
namespace: kepler | |
spec: | |
clusterIP: None | |
ports: | |
- name: http | |
port: 9102 | |
targetPort: http | |
selector: | |
app.kubernetes.io/component: exporter | |
app.kubernetes.io/name: kepler-exporter | |
sustainable-computing.io/app: kepler | |
--- | |
apiVersion: apps/v1 | |
kind: DaemonSet | |
metadata: | |
labels: | |
sustainable-computing.io/app: kepler | |
name: kepler-exporter | |
namespace: kepler | |
spec: | |
selector: | |
matchLabels: | |
app.kubernetes.io/component: exporter | |
app.kubernetes.io/name: kepler-exporter | |
sustainable-computing.io/app: kepler | |
template: | |
metadata: | |
labels: | |
app.kubernetes.io/component: exporter | |
app.kubernetes.io/name: kepler-exporter | |
sustainable-computing.io/app: kepler | |
spec: | |
containers: | |
- args: | |
- /usr/bin/kepler -v=1 -kernel-source-dir=/usr/share/kepler/kernel_sources | |
command: | |
- /bin/sh | |
- -c | |
env: | |
- name: NODE_IP | |
valueFrom: | |
fieldRef: | |
fieldPath: status.hostIP | |
- name: NODE_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: spec.nodeName | |
image: quay.io/sustainable_computing_io/kepler:latest | |
imagePullPolicy: Always | |
livenessProbe: | |
failureThreshold: 5 | |
httpGet: | |
path: /healthz | |
port: 9102 | |
scheme: HTTP | |
initialDelaySeconds: 10 | |
periodSeconds: 60 | |
successThreshold: 1 | |
timeoutSeconds: 10 | |
name: kepler-exporter | |
ports: | |
- containerPort: 9102 | |
name: http | |
resources: | |
requests: | |
cpu: 100m | |
memory: 400Mi | |
securityContext: | |
privileged: true | |
volumeMounts: | |
- mountPath: /lib/modules | |
name: lib-modules | |
- mountPath: /sys | |
name: tracing | |
- mountPath: /proc | |
name: proc | |
- mountPath: /etc/kepler/kepler.config | |
name: cfm | |
readOnly: true | |
dnsPolicy: ClusterFirstWithHostNet | |
serviceAccountName: kepler-sa | |
tolerations: | |
- effect: NoSchedule | |
key: node-role.kubernetes.io/master | |
volumes: | |
- hostPath: | |
path: /lib/modules | |
type: Directory | |
name: lib-modules | |
- hostPath: | |
path: /sys | |
type: Directory | |
name: tracing | |
- hostPath: | |
path: /proc | |
type: Directory | |
name: proc | |
- configMap: | |
name: kepler-cfm | |
name: cfm | |
--- | |
apiVersion: monitoring.coreos.com/v1 | |
kind: ServiceMonitor | |
metadata: | |
labels: | |
app.kubernetes.io/component: exporter | |
app.kubernetes.io/name: kepler-exporter | |
sustainable-computing.io/app: kepler | |
name: kepler-exporter | |
namespace: monitoring | |
spec: | |
endpoints: | |
- interval: 3s | |
port: http | |
relabelings: | |
- action: replace | |
regex: (.*) | |
replacement: $1 | |
sourceLabels: | |
- __meta_kubernetes_pod_node_name | |
targetLabel: instance | |
scheme: http | |
jobLabel: app.kubernetes.io/name | |
namespaceSelector: | |
matchNames: | |
- kepler | |
selector: | |
matchLabels: | |
app.kubernetes.io/component: exporter | |
app.kubernetes.io/name: kepler-exporter |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment