Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DEV: Add cadvisor yaml, and modify other yamls #26

Merged
merged 1 commit into from
Jun 22, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions deploy/kubernetes/apps/monitoring/cadvisor/cadvisor-svc.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
apiVersion: v1
kind: Service
metadata:
name: cadvisor
namespace: monitoring
labels:
name: cadvisor
annotations:
prometheus.io/scrape: 'true'
spec:
type: NodePort
ports:
- name: http-metrics
port: 8080
nodePort: 31194
targetPort: http-metrics
selector:
name: cadvisor

53 changes: 53 additions & 0 deletions deploy/kubernetes/apps/monitoring/cadvisor/cadvisor.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: cadvisor
namespace: monitoring
spec:
selector:
matchLabels:
name: cadvisor
template:
metadata:
labels:
name: cadvisor
annotations:
prometheus.io.scrape: "true"
spec:
containers:
- name: cadvisor
image: google/cadvisor:latest
volumeMounts:
- name: rootfs
mountPath: /rootfs
readOnly: true
- name: var-run
mountPath: /var/run
readOnly: false
- name: sys
mountPath: /sys
readOnly: true
- name: docker
mountPath: /var/lib/docker
readOnly: true
ports:
- name: http-metrics
containerPort: 8080
protocol: TCP
args:
- --profiling
- --housekeeping_interval=1s
terminationGracePeriodSeconds: 30
volumes:
- name: rootfs
hostPath:
path: /
- name: var-run
hostPath:
path: /var/run
- name: sys
hostPath:
path: /sys
- name: docker
hostPath:
path: /var/lib/docker
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ spec:
metadata:
labels:
k8s-app: kube-state-metrics
annotations:
prometheus.io.scrape: "true"
spec:
serviceAccountName: default
containers:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ metadata:
name: node-exporter
labels:
app: node-exporter
annotations:
prometheus.io/scrape: 'true'
spec:
type: NodePort
ports:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ spec:
name: node-exporter
labels:
name: node-exporter
annotations:
prometheus.io.scrape: "true"
spec:
hostPID: true
containers:
Expand All @@ -20,3 +18,4 @@ spec:
privileged: true
ports:
- containerPort: 9100
hostNetwork: true
3 changes: 2 additions & 1 deletion developers/Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Vagrant.configure("2") do |config|
PROTOC_TARGET="${HOME}/protoc"

# Install ntp
sudo apt-get install ntp
sudo apt-get install -y ntp

# Install Docker
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Expand Down Expand Up @@ -52,6 +52,7 @@ Vagrant.configure("2") do |config|
# setup golang dir
mkdir -p /home/$USER/go/src
rm -rf /home/$USER/go1.10.2.linux-amd64.tar.gz

# install protoc
if [ ! -d "${PROTOC_TARGET}" ]; then curl -fsSL "$PROTOC_RELEASE" > "${PROTOC_TARGET}.zip"; fi
if [ -f "${PROTOC_TARGET}.zip" ]; then unzip "${PROTOC_TARGET}.zip" -d "${PROTOC_TARGET}"; fi
Expand Down