update conduit installation

pull/147/head
Jimmy Song 2017-12-13 23:05:05 +08:00
parent 5cc1304444
commit 597c6ffcc1
155 changed files with 384 additions and 195 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,18 @@
kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2beta1
metadata:
name: sample-metrics-app-hpa
spec:
scaleTargetRef:
kind: Deployment
name: sample-metrics-app
minReplicas: 2
maxReplicas: 10
metrics:
- type: Object
object:
target:
kind: Service
name: sample-metrics-app
metricName: http_requests
targetValue: 100

View File

@ -1,4 +1,17 @@
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: prometheus-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus-operator
subjects:
- kind: ServiceAccount
name: prometheus-operator
namespace: default
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole kind: ClusterRole
metadata: metadata:
name: prometheus-operator name: prometheus-operator
@ -8,7 +21,13 @@ rules:
resources: resources:
- thirdpartyresources - thirdpartyresources
verbs: verbs:
- create - "*"
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- "*"
- apiGroups: - apiGroups:
- monitoring.coreos.com - monitoring.coreos.com
resources: resources:
@ -40,46 +59,43 @@ rules:
resources: resources:
- nodes - nodes
verbs: ["list", "watch"] verbs: ["list", "watch"]
- apiGroups: [""]
resources:
- namespaces
verbs: ["list"]
--- ---
apiVersion: v1 apiVersion: v1
kind: ServiceAccount kind: ServiceAccount
metadata: metadata:
name: prometheus-operator name: prometheus-operator
--- ---
apiVersion: rbac.authorization.k8s.io/v1beta1 apiVersion: extensions/v1beta1
kind: ClusterRoleBinding
metadata:
name: prometheus-operator
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: prometheus-operator
subjects:
- kind: ServiceAccount
name: prometheus-operator
namespace: default
---
apiVersion: apps/v1beta1
kind: Deployment kind: Deployment
metadata: metadata:
name: prometheus-operator
labels: labels:
operator: prometheus k8s-app: prometheus-operator
name: prometheus-operator
spec: spec:
replicas: 1 replicas: 1
template: template:
metadata: metadata:
labels: labels:
operator: prometheus k8s-app: prometheus-operator
spec: spec:
serviceAccountName: prometheus-operator
containers: containers:
- name: prometheus-operator - args:
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-operator:v0.10.1 - --kubelet-service=kube-system/kubelet
- --config-reloader-image=sz-pg-oam-docker-hub-001.tendcloud.com/library/configmap-reload:v0.0.1
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-operator:v0.15.0
name: prometheus-operator
ports:
- containerPort: 8080
name: http
resources: resources:
requests:
cpu: 100m
memory: 50Mi
limits: limits:
cpu: 200m cpu: 200m
memory: 100Mi memory: 100Mi
requests:
cpu: 100m
memory: 50Mi
serviceAccountName: prometheus-operator

View File

@ -44,7 +44,7 @@ spec:
selector: selector:
app: sample-metrics-app app: sample-metrics-app
--- ---
apiVersion: monitoring.coreos.com/v1alpha1 apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor kind: ServiceMonitor
metadata: metadata:
name: sample-metrics-app name: sample-metrics-app
@ -58,7 +58,7 @@ spec:
- port: web - port: web
--- ---
kind: HorizontalPodAutoscaler kind: HorizontalPodAutoscaler
apiVersion: autoscaling/v2alpha1 apiVersion: autoscaling/v2beta1
metadata: metadata:
name: sample-metrics-app-hpa name: sample-metrics-app-hpa
spec: spec:

View File

@ -33,7 +33,7 @@ subjects:
name: prometheus name: prometheus
namespace: default namespace: default
--- ---
apiVersion: monitoring.coreos.com/v1alpha1 apiVersion: monitoring.coreos.com/v1
kind: Prometheus kind: Prometheus
metadata: metadata:
name: sample-metrics-prom name: sample-metrics-prom
@ -42,7 +42,7 @@ metadata:
prometheus: sample-metrics-prom prometheus: sample-metrics-prom
spec: spec:
replicas: 1 replicas: 1
baseImage: prom/prometheus baseImage: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus
version: v1.7.1 version: v1.7.1
serviceAccountName: prometheus serviceAccountName: prometheus
serviceMonitorSelector: serviceMonitorSelector:

View File

@ -3,7 +3,39 @@ kind: Namespace
apiVersion: v1 apiVersion: v1
metadata: metadata:
name: conduit name: conduit
### RBAC ###
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: conduit-controller
namespace: conduit
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRole
metadata:
name: conduit-controller
rules:
- apiGroups: ["extensions"]
resources: ["deployments", "replicasets"]
verbs: ["list", "get", "watch"]
- apiGroups: [""]
resources: ["pods","services","endpoints"]
verbs: ["list", "get", "watch"]
---
apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
name: conduit-controller
namespace: conduit
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: conduit-controller
subjects:
- kind: ServiceAccount
name: conduit-controller
namespace: conduit
### Controller ### ### Controller ###
--- ---
kind: Service kind: Service
@ -66,6 +98,7 @@ spec:
annotations: annotations:
conduit.io/created-by: "conduit/cli v0.1.0" conduit.io/created-by: "conduit/cli v0.1.0"
spec: spec:
serviceAccount: conduit-controller
containers: containers:
- name: public-api - name: public-api
ports: ports:
@ -179,6 +212,7 @@ spec:
annotations: annotations:
conduit.io/created-by: "conduit/cli v0.1.0" conduit.io/created-by: "conduit/cli v0.1.0"
spec: spec:
serviceAccount: conduit-controller
containers: containers:
- name: web - name: web
ports: ports:
@ -239,6 +273,7 @@ spec:
annotations: annotations:
conduit.io/created-by: "conduit/cli v0.1.0" conduit.io/created-by: "conduit/cli v0.1.0"
spec: spec:
serviceAccount: conduit-controller
volumes: volumes:
- name: prometheus-config - name: prometheus-config
configMap: configMap:

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

Some files were not shown because too many files have changed in this diff Show More