-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merged in phstsai/add-kube-state-metrics (pull request #8)
DEV: Phstsai/add kube state metrics Approved-by: Yo-An Lin <[email protected]> Approved-by: Hung-Wei Chiu <[email protected]> Former-commit-id: c2568673160410ee5c27de9dd6ec1556d07159e7 [formerly c2568673160410ee5c27de9dd6ec1556d07159e7 [formerly da59bf3]] Former-commit-id: 6c81e35fc5be5c022fc666d558a549b42c32175e Former-commit-id: d37dd00
- Loading branch information
Showing
9 changed files
with
135 additions
and
0 deletions.
There are no files selected for viewing
14 changes: 14 additions & 0 deletions
14
deploy/monitoring/kube-state-metrics/kube-state-metrics-cluster-role-binding.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
# kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRoleBinding | ||
metadata: | ||
name: kube-state-metrics | ||
roleRef: | ||
apiGroup: rbac.authorization.k8s.io | ||
kind: ClusterRole | ||
name: kube-state-metrics | ||
subjects: | ||
- kind: ServiceAccount | ||
name: default | ||
namespace: monitoring | ||
|
40 changes: 40 additions & 0 deletions
40
deploy/monitoring/kube-state-metrics/kube-state-metrics-cluster-role.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
apiVersion: rbac.authorization.k8s.io/v1 | ||
# kubernetes versions before 1.8.0 should use rbac.authorization.k8s.io/v1beta1 | ||
kind: ClusterRole | ||
metadata: | ||
name: kube-state-metrics | ||
rules: | ||
- apiGroups: [""] | ||
resources: | ||
- configmaps | ||
- secrets | ||
- nodes | ||
- pods | ||
- services | ||
- resourcequotas | ||
- replicationcontrollers | ||
- limitranges | ||
- persistentvolumeclaims | ||
- persistentvolumes | ||
- namespaces | ||
- endpoints | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["extensions"] | ||
resources: | ||
- daemonsets | ||
- deployments | ||
- replicasets | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["apps"] | ||
resources: | ||
- statefulsets | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["batch"] | ||
resources: | ||
- cronjobs | ||
- jobs | ||
verbs: ["list", "watch"] | ||
- apiGroups: ["autoscaling"] | ||
resources: | ||
- horizontalpodautoscalers | ||
verbs: ["list", "watch"] |
59 changes: 59 additions & 0 deletions
59
deploy/monitoring/kube-state-metrics/kube-state-metrics-deployment.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
apiVersion: apps/v1 | ||
# Kubernetes versions after 1.9.0 should use apps/v1 | ||
# Kubernetes versions before 1.8.0 should use apps/v1beta1 or extensions/v1beta1 | ||
kind: Deployment | ||
metadata: | ||
name: kube-state-metrics | ||
namespace: monitoring | ||
spec: | ||
selector: | ||
matchLabels: | ||
k8s-app: kube-state-metrics | ||
replicas: 1 | ||
template: | ||
metadata: | ||
labels: | ||
k8s-app: kube-state-metrics | ||
spec: | ||
serviceAccountName: default | ||
containers: | ||
- name: kube-state-metrics | ||
image: asia.gcr.io/linker-aurora/kube-state-metrics:develop | ||
ports: | ||
- name: http-metrics | ||
containerPort: 8080 | ||
- name: telemetry | ||
containerPort: 8081 | ||
readinessProbe: | ||
httpGet: | ||
path: /healthz | ||
port: 8080 | ||
initialDelaySeconds: 5 | ||
timeoutSeconds: 5 | ||
- name: addon-resizer | ||
image: k8s.gcr.io/addon-resizer:1.7 | ||
resources: | ||
limits: | ||
cpu: 100m | ||
memory: 30Mi | ||
requests: | ||
cpu: 100m | ||
memory: 30Mi | ||
env: | ||
- name: MY_POD_NAME | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.name | ||
- name: MY_POD_NAMESPACE | ||
valueFrom: | ||
fieldRef: | ||
fieldPath: metadata.namespace | ||
command: | ||
- /pod_nanny | ||
- --container=kube-state-metrics | ||
- --cpu=100m | ||
- --extra-cpu=1m | ||
- --memory=100Mi | ||
- --extra-memory=2Mi | ||
- --threshold=5 | ||
- --deployment=kube-state-metrics |
22 changes: 22 additions & 0 deletions
22
deploy/monitoring/kube-state-metrics/kube-state-metrics-service.yaml
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: kube-state-metrics | ||
namespace: monitoring | ||
labels: | ||
k8s-app: kube-state-metrics | ||
annotations: | ||
prometheus.io/scrape: 'true' | ||
spec: | ||
ports: | ||
- name: http-metrics | ||
port: 8080 | ||
targetPort: http-metrics | ||
protocol: TCP | ||
- name: telemetry | ||
port: 8081 | ||
targetPort: telemetry | ||
protocol: TCP | ||
selector: | ||
k8s-app: kube-state-metrics | ||
|
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.