linkerd / linkerd/website

Tracing reference architecture

Open
#491 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
60
Forks
221
Avg merge
4h 32m
Merged PRs (30d)
1

Description

## Emojivoto

```yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: emojivoto
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: emoji
namespace: emojivoto
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: voting
namespace: emojivoto
---
kind: ServiceAccount
apiVersion: v1
metadata:
name: web
namespace: emojivoto
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: emoji
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: emoji-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: emoji-svc
spec:
serviceAccountName: emoji
containers:
- env:
- name: GRPC_PORT
value: "8080"
- name: OC_AGENT_HOST
value: "oc-collector.tracing:55678"
image: buoyantio/emojivoto-emoji-svc:git-254451a
name: emoji-svc
ports:
- containerPort: 8080
name: grpc
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: emoji-svc
namespace: emojivoto
spec:
selector:
app: emoji-svc
clusterIP: None
ports:
- name: grpc
port: 8080
targetPort: 8080
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: voting
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: voting-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: voting-svc
spec:
serviceAccountName: voting
containers:
- env:
- name: GRPC_PORT
value: "8080"
- name: OC_AGENT_HOST
value: "oc-collector.tracing:55678"
image: buoyantio/emojivoto-voting-svc:git-254451a
name: voting-svc
ports:
- containerPort: 8080
name: grpc
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: voting-svc
namespace: emojivoto
spec:
selector:
app: voting-svc
clusterIP: None
ports:
- name: grpc
port: 8080
targetPort: 8080
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: web
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: web-svc
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: web-svc
spec:
serviceAccountName: web
containers:
- env:
- name: WEB_PORT
value: "80"
- name: OC_AGENT_HOST
value: "oc-collector.tracing:55678"
- name: EMOJISVC_HOST
value: emoji-svc.emojivoto:8080
- name: VOTINGSVC_HOST
value: voting-svc.emojivoto:8080
- name: INDEX_BUNDLE
value: dist/index_bundle.js
image: buoyantio/emojivoto-web:git-254451a
name: web-svc
ports:
- containerPort: 80
name: http
resources:
requests:
cpu: 100m
status: {}
---
apiVersion: v1
kind: Service
metadata:
name: web-svc
namespace: emojivoto
spec:
type: LoadBalancer
selector:
app: web-svc
ports:
- name: http
port: 80
targetPort: 80
---
apiVersion: apps/v1beta1
kind: Deployment
metadata:
creationTimestamp: null
name: vote-bot
namespace: emojivoto
spec:
replicas: 1
selector:
matchLabels:
app: vote-bot
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: vote-bot
spec:
containers:
- command:
- emojivoto-vote-bot
env:
- name: WEB_HOST
value: web-svc.emojivoto:80
image: buoyantio/emojivoto-web:v8
name: vote-bot
resources:
requests:
cpu: 10m
status: {}
---
```

## Tracing System

```yaml
---
apiVersion: v1
kind: Namespace
metadata:
name: tracing
---
apiVersion: v1
kind: ConfigMap
metadata:
name: oc-collector-conf
namespace: tracing
labels:
app: opencensus
component: oc-collector-conf
data:
oc-collector-config: |
receivers:
opencensus:
port: 55678
jaeger:
jaeger-thrift-tchannel-port: 14267
jaeger-thrift-http-port: 14268
zipkin:
port: 9411
queued-exporters:
jaeger-all-in-one:
num-workers: 4
queue-size: 100
retry-on-failure: true
sender-type: jaeger-thrift-http
jaeger-thrift-http:
collector-endpoint: http://jaeger.tracing:14268/api/traces
timeout: 5s
---
apiVersion: v1
kind: Service
metadata:
name: oc-collector
namespace: tracing
labels:
app: opencensus
component: oc-collector
spec:
# This is only important for jaeger, for reasons I don't quite understand.
clusterIP: None
ports:
- name: zipkin
port: 9411
- name: opencensus
port: 55678
- name: jaeger-thrift
port: 14627
targetPort: 14627
protocol: TCP
- name: jaeger-http
port: 14628
targetPort: 14628
protocol: TCP
selector:
app: opencensus
component: oc-collector
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
name: oc-collector
namespace: tracing
labels:
app: opencensus
component: oc-collector
spec:
replicas: 1
template:
metadata:
annotations:
prometheus.io/path: "/metrics"
prometheus.io/port: "8888"
prometheus.io/scrape: "true"
labels:
app: opencensus
component: oc-collector
spec:
containers:
- image: alpine:3.10
name: dummy

command: ["/bin/sh", "-c"]
args:
- |-
while true; do sleep 100; done

- command:
- "/occollector_linux"
- "--config=/conf/oc-collector-config.yaml"
- "--receive-jaeger"
- "--receive-zipkin"
- "--log-level=debug"
env:
- name: GOGC
value: "80"
image: omnition/opencensus-collector:0.1.10
name: oc-collector
ports:
- containerPort: 9411
- containerPort: 55678
- containerPort: 14627
- containerPort: 14628
volumeMounts:
- name: oc-collector-config-vol
mountPath: /conf
volumes:
- configMap:
name: oc-collector-conf
items:
- key: oc-collector-config
path: oc-collector-config.yaml
name: oc-collector-config-vol
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: jaeger
namespace: tracing
labels:
app: jaeger
app.kubernetes.io/component: all-in-one
spec:
replicas: 1
template:
metadata:
labels:
app: jaeger
app.kubernetes.io/component: all-in-one
spec:
dnsPolicy: ClusterFirst
containers:
- name: jaeger
image: jaegertracing/all-in-one:1.8
ports:
- name: collection
containerPort: 14268
- name: ui
containerPort: 16686
---
apiVersion: v1
kind: Service
metadata:
name: jaeger
namespace: tracing
labels:
app: jaeger
app.kubernetes.io/component: all-in-one
spec:
selector:
app: jaeger
app.kubernetes.io/component: all-in-one
ports:
- name: collection
port: 14268
- name: ui
port: 16686
```

## Ingress

### Nginx

```bash
kubectl create ns nginx && \
helm fetch stable/nginx-ingress && \
cat <

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No repository file or test is named. Start by reviewing the Emojivoto, Tracing System, and ingress YAML and shell examples, then determine the intended reference-architecture documentation scope. Done should be a clear, maintained tracing architecture covering the shown Kubernetes deployments and Nginx, Traefik, and Ambassador ingress examples.

Written by the indexing model from the issue text.

Assessment

Tech stack
kubernetes, nginx
Domain
infrastructure, observability
Issue type
Documentation
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.