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
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
metadata:
name: prometheus-operator
@ -8,7 +21,13 @@ rules:
resources:
- thirdpartyresources
verbs:
- create
- "*"
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- "*"
- apiGroups:
- monitoring.coreos.com
resources:
@ -40,46 +59,43 @@ rules:
resources:
- nodes
verbs: ["list", "watch"]
- apiGroups: [""]
resources:
- namespaces
verbs: ["list"]
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: prometheus-operator
---
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: apps/v1beta1
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: prometheus-operator
labels:
operator: prometheus
k8s-app: prometheus-operator
name: prometheus-operator
spec:
replicas: 1
template:
metadata:
labels:
operator: prometheus
k8s-app: prometheus-operator
spec:
serviceAccountName: prometheus-operator
containers:
- name: prometheus-operator
image: sz-pg-oam-docker-hub-001.tendcloud.com/library/prometheus-operator:v0.10.1
- args:
- --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:
requests:
cpu: 100m
memory: 50Mi
limits:
cpu: 200m
memory: 100Mi
requests:
cpu: 100m
memory: 50Mi
serviceAccountName: prometheus-operator

View File

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

View File

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

View File

@ -3,7 +3,39 @@ kind: Namespace
apiVersion: v1
metadata:
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 ###
---
kind: Service
@ -66,6 +98,7 @@ spec:
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
serviceAccount: conduit-controller
containers:
- name: public-api
ports:
@ -179,6 +212,7 @@ spec:
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
serviceAccount: conduit-controller
containers:
- name: web
ports:
@ -239,6 +273,7 @@ spec:
annotations:
conduit.io/created-by: "conduit/cli v0.1.0"
spec:
serviceAccount: conduit-controller
volumes:
- name: prometheus-config
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