mirror of https://github.com/linkerd/linkerd2.git
713 lines
18 KiB
Plaintext
Executable File
713 lines
18 KiB
Plaintext
Executable File
### Namespace ###
|
|
kind: Namespace
|
|
apiVersion: v1
|
|
metadata:
|
|
name: conduit
|
|
|
|
### Service Account Controller ###
|
|
---
|
|
kind: ServiceAccount
|
|
apiVersion: v1
|
|
metadata:
|
|
name: conduit-controller
|
|
namespace: conduit
|
|
|
|
### RBAC ###
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: conduit-controller
|
|
rules:
|
|
- apiGroups: ["extensions", "apps"]
|
|
resources: ["deployments", "replicasets"]
|
|
verbs: ["list", "get", "watch"]
|
|
- apiGroups: [""]
|
|
resources: ["pods", "endpoints", "services", "namespaces"]
|
|
verbs: ["list", "get", "watch"]
|
|
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
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
|
|
|
|
### Service Account Prometheus ###
|
|
---
|
|
kind: ServiceAccount
|
|
apiVersion: v1
|
|
metadata:
|
|
name: conduit-prometheus
|
|
namespace: conduit
|
|
|
|
### RBAC ###
|
|
---
|
|
kind: ClusterRole
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: conduit-prometheus
|
|
rules:
|
|
- apiGroups: [""]
|
|
resources: ["pods"]
|
|
verbs: ["list", "watch"]
|
|
|
|
---
|
|
kind: ClusterRoleBinding
|
|
apiVersion: rbac.authorization.k8s.io/v1beta1
|
|
metadata:
|
|
name: conduit-prometheus
|
|
namespace: conduit
|
|
roleRef:
|
|
apiGroup: rbac.authorization.k8s.io
|
|
kind: ClusterRole
|
|
name: conduit-prometheus
|
|
subjects:
|
|
- kind: ServiceAccount
|
|
name: conduit-prometheus
|
|
namespace: conduit
|
|
|
|
### Controller ###
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: api
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: controller
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
conduit.io/control-plane-component: controller
|
|
ports:
|
|
- name: http
|
|
port: 8085
|
|
targetPort: 8085
|
|
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: proxy-api
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: controller
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
conduit.io/control-plane-component: controller
|
|
ports:
|
|
- name: grpc
|
|
port: 8086
|
|
targetPort: 8086
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: controller
|
|
name: controller
|
|
namespace: conduit
|
|
spec:
|
|
replicas: 1
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
conduit.io/proxy-version: undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: controller
|
|
conduit.io/control-plane-ns: conduit
|
|
conduit.io/proxy-deployment: controller
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- public-api
|
|
- -prometheus-url=http://prometheus.conduit.svc.cluster.local:9090
|
|
- -controller-namespace=conduit
|
|
- -log-level=info
|
|
- -logtostderr=true
|
|
image: gcr.io/runconduit/controller:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: public-api
|
|
ports:
|
|
- containerPort: 8085
|
|
name: http
|
|
- containerPort: 9995
|
|
name: admin-http
|
|
resources: {}
|
|
- args:
|
|
- destination
|
|
- -log-level=info
|
|
- -logtostderr=true
|
|
image: gcr.io/runconduit/controller:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: destination
|
|
ports:
|
|
- containerPort: 8089
|
|
name: grpc
|
|
- containerPort: 9999
|
|
name: admin-http
|
|
resources: {}
|
|
- args:
|
|
- proxy-api
|
|
- -log-level=info
|
|
- -logtostderr=true
|
|
image: gcr.io/runconduit/controller:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: proxy-api
|
|
ports:
|
|
- containerPort: 8086
|
|
name: grpc
|
|
- containerPort: 9996
|
|
name: admin-http
|
|
resources: {}
|
|
- args:
|
|
- tap
|
|
- -log-level=info
|
|
- -logtostderr=true
|
|
image: gcr.io/runconduit/controller:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: tap
|
|
ports:
|
|
- containerPort: 8088
|
|
name: grpc
|
|
- containerPort: 9998
|
|
name: admin-http
|
|
resources: {}
|
|
- env:
|
|
- name: CONDUIT_PROXY_LOG
|
|
value: warn,conduit_proxy=info
|
|
- name: CONDUIT_PROXY_CONTROL_URL
|
|
value: tcp://localhost:8086
|
|
- name: CONDUIT_PROXY_CONTROL_LISTENER
|
|
value: tcp://0.0.0.0:4190
|
|
- name: CONDUIT_PROXY_METRICS_LISTENER
|
|
value: tcp://0.0.0.0:4191
|
|
- name: CONDUIT_PROXY_PRIVATE_LISTENER
|
|
value: tcp://127.0.0.1:4140
|
|
- name: CONDUIT_PROXY_PUBLIC_LISTENER
|
|
value: tcp://0.0.0.0:4143
|
|
- name: CONDUIT_PROXY_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
image: gcr.io/runconduit/proxy:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-proxy
|
|
ports:
|
|
- containerPort: 4143
|
|
name: conduit-proxy
|
|
- containerPort: 4191
|
|
name: conduit-metrics
|
|
resources: {}
|
|
securityContext:
|
|
runAsUser: 2102
|
|
initContainers:
|
|
- args:
|
|
- --incoming-proxy-port
|
|
- "4143"
|
|
- --outgoing-proxy-port
|
|
- "4140"
|
|
- --proxy-uid
|
|
- "2102"
|
|
- --inbound-ports-to-ignore
|
|
- "4190"
|
|
image: gcr.io/runconduit/proxy-init:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-init
|
|
resources: {}
|
|
securityContext:
|
|
capabilities:
|
|
add:
|
|
- NET_ADMIN
|
|
privileged: false
|
|
serviceAccount: conduit-controller
|
|
status: {}
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: web
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: web
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
conduit.io/control-plane-component: web
|
|
ports:
|
|
- name: http
|
|
port: 8084
|
|
targetPort: 8084
|
|
- name: admin-http
|
|
port: 9994
|
|
targetPort: 9994
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: web
|
|
name: web
|
|
namespace: conduit
|
|
spec:
|
|
replicas: 1
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
conduit.io/proxy-version: undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: web
|
|
conduit.io/control-plane-ns: conduit
|
|
conduit.io/proxy-deployment: web
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- -api-addr=api.conduit.svc.cluster.local:8085
|
|
- -static-dir=/dist
|
|
- -template-dir=/templates
|
|
- -uuid=deaab91a-f4ab-448a-b7d1-c832a2fa0a60
|
|
- -controller-namespace=conduit
|
|
- -log-level=info
|
|
image: gcr.io/runconduit/web:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: web
|
|
ports:
|
|
- containerPort: 8084
|
|
name: http
|
|
- containerPort: 9994
|
|
name: admin-http
|
|
resources: {}
|
|
- env:
|
|
- name: CONDUIT_PROXY_LOG
|
|
value: warn,conduit_proxy=info
|
|
- name: CONDUIT_PROXY_CONTROL_URL
|
|
value: tcp://proxy-api.conduit.svc.cluster.local:8086
|
|
- name: CONDUIT_PROXY_CONTROL_LISTENER
|
|
value: tcp://0.0.0.0:4190
|
|
- name: CONDUIT_PROXY_METRICS_LISTENER
|
|
value: tcp://0.0.0.0:4191
|
|
- name: CONDUIT_PROXY_PRIVATE_LISTENER
|
|
value: tcp://127.0.0.1:4140
|
|
- name: CONDUIT_PROXY_PUBLIC_LISTENER
|
|
value: tcp://0.0.0.0:4143
|
|
- name: CONDUIT_PROXY_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
image: gcr.io/runconduit/proxy:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-proxy
|
|
ports:
|
|
- containerPort: 4143
|
|
name: conduit-proxy
|
|
- containerPort: 4191
|
|
name: conduit-metrics
|
|
resources: {}
|
|
securityContext:
|
|
runAsUser: 2102
|
|
initContainers:
|
|
- args:
|
|
- --incoming-proxy-port
|
|
- "4143"
|
|
- --outgoing-proxy-port
|
|
- "4140"
|
|
- --proxy-uid
|
|
- "2102"
|
|
- --inbound-ports-to-ignore
|
|
- "4190"
|
|
image: gcr.io/runconduit/proxy-init:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-init
|
|
resources: {}
|
|
securityContext:
|
|
capabilities:
|
|
add:
|
|
- NET_ADMIN
|
|
privileged: false
|
|
status: {}
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: prometheus
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: prometheus
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
conduit.io/control-plane-component: prometheus
|
|
ports:
|
|
- name: admin-http
|
|
port: 9090
|
|
targetPort: 9090
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: prometheus
|
|
name: prometheus
|
|
namespace: conduit
|
|
spec:
|
|
replicas: 1
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
conduit.io/proxy-version: undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: prometheus
|
|
conduit.io/control-plane-ns: conduit
|
|
conduit.io/proxy-deployment: prometheus
|
|
spec:
|
|
containers:
|
|
- args:
|
|
- --storage.tsdb.retention=6h
|
|
- --config.file=/etc/prometheus/prometheus.yml
|
|
image: prom/prometheus:v2.1.0
|
|
imagePullPolicy: IfNotPresent
|
|
name: prometheus
|
|
ports:
|
|
- containerPort: 9090
|
|
name: admin-http
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /etc/prometheus
|
|
name: prometheus-config
|
|
readOnly: true
|
|
- env:
|
|
- name: CONDUIT_PROXY_LOG
|
|
value: warn,conduit_proxy=info
|
|
- name: CONDUIT_PROXY_CONTROL_URL
|
|
value: tcp://proxy-api.conduit.svc.cluster.local:8086
|
|
- name: CONDUIT_PROXY_CONTROL_LISTENER
|
|
value: tcp://0.0.0.0:4190
|
|
- name: CONDUIT_PROXY_METRICS_LISTENER
|
|
value: tcp://0.0.0.0:4191
|
|
- name: CONDUIT_PROXY_PRIVATE_LISTENER
|
|
value: tcp://127.0.0.1:4140
|
|
- name: CONDUIT_PROXY_PUBLIC_LISTENER
|
|
value: tcp://0.0.0.0:4143
|
|
- name: CONDUIT_PROXY_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
image: gcr.io/runconduit/proxy:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-proxy
|
|
ports:
|
|
- containerPort: 4143
|
|
name: conduit-proxy
|
|
- containerPort: 4191
|
|
name: conduit-metrics
|
|
resources: {}
|
|
securityContext:
|
|
runAsUser: 2102
|
|
initContainers:
|
|
- args:
|
|
- --incoming-proxy-port
|
|
- "4143"
|
|
- --outgoing-proxy-port
|
|
- "4140"
|
|
- --proxy-uid
|
|
- "2102"
|
|
- --inbound-ports-to-ignore
|
|
- "4190"
|
|
image: gcr.io/runconduit/proxy-init:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-init
|
|
resources: {}
|
|
securityContext:
|
|
capabilities:
|
|
add:
|
|
- NET_ADMIN
|
|
privileged: false
|
|
serviceAccount: conduit-prometheus
|
|
volumes:
|
|
- configMap:
|
|
name: prometheus-config
|
|
name: prometheus-config
|
|
status: {}
|
|
---
|
|
kind: ConfigMap
|
|
apiVersion: v1
|
|
metadata:
|
|
name: prometheus-config
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: prometheus
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
data:
|
|
prometheus.yml: |-
|
|
global:
|
|
scrape_interval: 10s
|
|
evaluation_interval: 10s
|
|
|
|
scrape_configs:
|
|
- job_name: 'prometheus'
|
|
static_configs:
|
|
- targets: ['localhost:9090']
|
|
|
|
- job_name: 'conduit-controller'
|
|
kubernetes_sd_configs:
|
|
- role: pod
|
|
namespaces:
|
|
names: ['conduit']
|
|
# TODO: do something with "conduit.io/control-plane-component"
|
|
relabel_configs:
|
|
- source_labels:
|
|
- __meta_kubernetes_pod_label_conduit_io_control_plane_component
|
|
- __meta_kubernetes_pod_container_port_name
|
|
action: keep
|
|
regex: (.*);admin-http$
|
|
- source_labels: [__meta_kubernetes_pod_container_name]
|
|
action: replace
|
|
target_label: component
|
|
|
|
- job_name: 'conduit-proxy'
|
|
kubernetes_sd_configs:
|
|
- role: pod
|
|
relabel_configs:
|
|
- source_labels:
|
|
- __meta_kubernetes_pod_container_name
|
|
- __meta_kubernetes_pod_container_port_name
|
|
action: keep
|
|
regex: ^conduit-proxy;conduit-metrics$
|
|
- source_labels: [__meta_kubernetes_namespace]
|
|
action: replace
|
|
target_label: namespace
|
|
- source_labels: [__meta_kubernetes_pod_name]
|
|
action: replace
|
|
target_label: pod
|
|
# special case k8s' "job" label, to not interfere with prometheus' "job"
|
|
# label
|
|
# __meta_kubernetes_pod_label_conduit_io_proxy_job=foo =>
|
|
# k8s_job=foo
|
|
- source_labels: [__meta_kubernetes_pod_label_conduit_io_proxy_job]
|
|
action: replace
|
|
target_label: k8s_job
|
|
# __meta_kubernetes_pod_label_conduit_io_proxy_deployment=foo =>
|
|
# deployment=foo
|
|
- action: labelmap
|
|
regex: __meta_kubernetes_pod_label_conduit_io_proxy_(.+)
|
|
# drop all labels that we just made copies of in the previous labelmap
|
|
- action: labeldrop
|
|
regex: __meta_kubernetes_pod_label_conduit_io_proxy_(.+)
|
|
# __meta_kubernetes_pod_label_foo=bar => foo=bar
|
|
- action: labelmap
|
|
regex: __meta_kubernetes_pod_label_(.+)
|
|
|
|
### Grafana ###
|
|
---
|
|
kind: Service
|
|
apiVersion: v1
|
|
metadata:
|
|
name: grafana
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: grafana
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
spec:
|
|
type: ClusterIP
|
|
selector:
|
|
conduit.io/control-plane-component: grafana
|
|
ports:
|
|
- name: http
|
|
port: 3000
|
|
targetPort: 3000
|
|
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Deployment
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: grafana
|
|
name: grafana
|
|
namespace: conduit
|
|
spec:
|
|
replicas: 1
|
|
strategy: {}
|
|
template:
|
|
metadata:
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
conduit.io/proxy-version: undefined
|
|
creationTimestamp: null
|
|
labels:
|
|
conduit.io/control-plane-component: grafana
|
|
conduit.io/control-plane-ns: conduit
|
|
conduit.io/proxy-deployment: grafana
|
|
spec:
|
|
containers:
|
|
- image: gcr.io/runconduit/grafana:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: grafana
|
|
ports:
|
|
- containerPort: 3000
|
|
name: http
|
|
resources: {}
|
|
volumeMounts:
|
|
- mountPath: /etc/grafana
|
|
name: grafana-config
|
|
readOnly: true
|
|
- env:
|
|
- name: CONDUIT_PROXY_LOG
|
|
value: warn,conduit_proxy=info
|
|
- name: CONDUIT_PROXY_CONTROL_URL
|
|
value: tcp://proxy-api.conduit.svc.cluster.local:8086
|
|
- name: CONDUIT_PROXY_CONTROL_LISTENER
|
|
value: tcp://0.0.0.0:4190
|
|
- name: CONDUIT_PROXY_METRICS_LISTENER
|
|
value: tcp://0.0.0.0:4191
|
|
- name: CONDUIT_PROXY_PRIVATE_LISTENER
|
|
value: tcp://127.0.0.1:4140
|
|
- name: CONDUIT_PROXY_PUBLIC_LISTENER
|
|
value: tcp://0.0.0.0:4143
|
|
- name: CONDUIT_PROXY_POD_NAMESPACE
|
|
valueFrom:
|
|
fieldRef:
|
|
fieldPath: metadata.namespace
|
|
image: gcr.io/runconduit/proxy:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-proxy
|
|
ports:
|
|
- containerPort: 4143
|
|
name: conduit-proxy
|
|
- containerPort: 4191
|
|
name: conduit-metrics
|
|
resources: {}
|
|
securityContext:
|
|
runAsUser: 2102
|
|
initContainers:
|
|
- args:
|
|
- --incoming-proxy-port
|
|
- "4143"
|
|
- --outgoing-proxy-port
|
|
- "4140"
|
|
- --proxy-uid
|
|
- "2102"
|
|
- --inbound-ports-to-ignore
|
|
- "4190"
|
|
image: gcr.io/runconduit/proxy-init:undefined
|
|
imagePullPolicy: IfNotPresent
|
|
name: conduit-init
|
|
resources: {}
|
|
securityContext:
|
|
capabilities:
|
|
add:
|
|
- NET_ADMIN
|
|
privileged: false
|
|
volumes:
|
|
- configMap:
|
|
items:
|
|
- key: grafana.ini
|
|
path: grafana.ini
|
|
- key: datasources.yaml
|
|
path: provisioning/datasources/datasources.yaml
|
|
- key: dashboards.yaml
|
|
path: provisioning/dashboards/dashboards.yaml
|
|
name: grafana-config
|
|
name: grafana-config
|
|
status: {}
|
|
---
|
|
kind: ConfigMap
|
|
apiVersion: v1
|
|
metadata:
|
|
name: grafana-config
|
|
namespace: conduit
|
|
labels:
|
|
conduit.io/control-plane-component: grafana
|
|
annotations:
|
|
conduit.io/created-by: conduit/cli undefined
|
|
data:
|
|
grafana.ini: |-
|
|
instance_name = conduit-grafana
|
|
|
|
[server]
|
|
root_url = %(protocol)s://%(domain)s:/api/v1/namespaces/conduit/services/grafana:http/proxy/
|
|
|
|
[auth]
|
|
disable_login_form = true
|
|
|
|
[auth.anonymous]
|
|
enabled = true
|
|
org_role = Editor
|
|
|
|
[auth.basic]
|
|
enabled = false
|
|
|
|
[analytics]
|
|
check_for_updates = false
|
|
|
|
datasources.yaml: |-
|
|
apiVersion: 1
|
|
datasources:
|
|
- name: prometheus
|
|
type: prometheus
|
|
access: proxy
|
|
orgId: 1
|
|
url: http://prometheus.conduit.svc.cluster.local:9090
|
|
isDefault: true
|
|
jsonData:
|
|
timeInterval: "5s"
|
|
version: 1
|
|
editable: true
|
|
|
|
dashboards.yaml: |-
|
|
apiVersion: 1
|
|
providers:
|
|
- name: 'default'
|
|
orgId: 1
|
|
folder: ''
|
|
type: file
|
|
disableDeletion: true
|
|
editable: true
|
|
options:
|
|
path: /var/lib/grafana/dashboards
|
|
homeDashboardId: conduit-top-line
|
|
---
|