Skip to content

Commit

Permalink
Added new options
Browse files Browse the repository at this point in the history
  • Loading branch information
p404 committed Mar 26, 2024
1 parent ef82669 commit 385951a
Show file tree
Hide file tree
Showing 4 changed files with 65 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .kustomize/client.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: client
spec:
replicas: 1
selector:
matchLabels:
app: client
template:
metadata:
labels:
app: client
spec:
containers:
- name: client
image: ghcr.io/p404/python-otel-example/client:latest
env:
- name: OTEL_SERVICE_NAME
value: client
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.name=client
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://otel-collector:4317"
- name: WEBAPP_ENDPOINT
value: "http://webapp:8080"
37 changes: 37 additions & 0 deletions .kustomize/webapp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: webapp
spec:
replicas: 1
selector:
matchLabels:
app: webapp
template:
metadata:
labels:
app: webapp
spec:
containers:
- name: webapp
image: ghcr.io/p404/python-otel-example/webapp:latest
env:
- name: OTEL_SERVICE_NAME
value: webapp
- name: OTEL_RESOURCE_ATTRIBUTES
value: service.name=webapp
- name: OTEL_EXPORTER_OTLP_ENDPOINT
value: "http://observe-traces.observe.svc.cluster.local:4317"
ports:
- containerPort: 8080
---
apiVersion: v1
kind: Service
metadata:
name: webapp
spec:
selector:
app: webapp
ports:
- port: 8080
targetPort: 8080
1 change: 1 addition & 0 deletions Dockerfile.client
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ COPY src/client/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/client /app

ENV PYTHONUNBUFFERED=1
CMD ["python", "main.py"]
1 change: 1 addition & 0 deletions Dockerfile.webapp
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ COPY src/webapp/requirements.txt .
RUN pip install --no-cache-dir -r requirements.txt
COPY src/webapp /app

ENV PYTHONUNBUFFERED=1
CMD ["python", "main.py"]

0 comments on commit 385951a

Please sign in to comment.