diff --git a/deployments/sgx_epc_metrics/kustomization.yaml b/deployments/sgx_epc_metrics/kustomization.yaml new file mode 100644 index 000000000..b27597218 --- /dev/null +++ b/deployments/sgx_epc_metrics/kustomization.yaml @@ -0,0 +1,5 @@ +resources: + - "https://github.com/google/cadvisor/deploy/kubernetes/base?ref=master" + - service.yaml +patches: + - path: misc-metrics.yaml diff --git a/deployments/sgx_epc_metrics/misc-metrics.yaml b/deployments/sgx_epc_metrics/misc-metrics.yaml new file mode 100644 index 000000000..e96ea1b64 --- /dev/null +++ b/deployments/sgx_epc_metrics/misc-metrics.yaml @@ -0,0 +1,18 @@ +apiVersion: apps/v1 +kind: DaemonSet +metadata: + name: cadvisor + namespace: cadvisor +spec: + template: + spec: + nodeSelector: + intel.feature.node.kubernetes.io/sgx: 'true' + containers: + - name: cadvisor + image: docker.io/library/cadvisor:4af2b9b9 + command: [ + "/usr/bin/cadvisor", + "-enable_metrics", "misc", + "-logtostderr" + ] diff --git a/deployments/sgx_epc_metrics/service.yaml b/deployments/sgx_epc_metrics/service.yaml new file mode 100644 index 000000000..746d3984d --- /dev/null +++ b/deployments/sgx_epc_metrics/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + app: cadvisor + name: cadvisor + namespace: cadvisor +spec: + ports: + - name: http + port: 8080 + targetPort: http + selector: + app: cadvisor