-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
70cc056
commit 6e3b745
Showing
14 changed files
with
332 additions
and
101 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: echo-server-deployment | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: echo-server | ||
replicas: 2 | ||
template: | ||
metadata: | ||
labels: | ||
app: echo-server | ||
spec: | ||
containers: | ||
- name: echo-server | ||
image: naumovandrey/echo-server:v0.1.1 | ||
ports: | ||
- containerPort: 8080 |
8 changes: 4 additions & 4 deletions
8
cluster/default-ns/nginx/service.yaml → cluster/default/echo-server/service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,11 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: nginx-service | ||
name: echo-server-svc | ||
spec: | ||
selector: | ||
app: nginx | ||
app: echo-server | ||
ports: | ||
- port: 80 | ||
targetPort: 80 | ||
- port: 8080 | ||
targetPort: 8080 | ||
protocol: TCP |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: jaegertracing.io/v1 | ||
kind: Jaeger | ||
metadata: | ||
name: jaeger | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: nginx-ingress | ||
annotations: | ||
nginx.ingress.kubernetes.io/rewrite-target: / | ||
spec: | ||
ingressClassName: nginx | ||
rules: | ||
- http: | ||
paths: | ||
- path: /echo | ||
pathType: Exact | ||
backend: | ||
service: | ||
name: echo-server-svc | ||
port: | ||
number: 8080 | ||
- path: / | ||
pathType: Prefix | ||
backend: | ||
service: | ||
name: jaeger-query | ||
port: | ||
number: 16686 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
kind: Namespace | ||
metadata: | ||
name: observability | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
FROM golang:1.19-alpine as builder | ||
|
||
WORKDIR /build | ||
COPY go.mod . | ||
COPY go.sum . | ||
|
||
RUN go mod download | ||
|
||
COPY . . | ||
|
||
RUN CGO_ENABLED=0 GOOS=linux go build -o ./echo-server ./cmd/main.go | ||
|
||
FROM alpine:latest | ||
|
||
WORKDIR /service | ||
COPY --from=builder /build/echo-server ./echo-server | ||
|
||
ENTRYPOINT ["./echo-server"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
package config | ||
|
||
const ( | ||
ServiceName = "echo-server" | ||
ServiceVersion = "v0.1.1" | ||
|
||
Env = "demo" | ||
Port = ":8080" | ||
|
||
JaegerCollectorEndpoint = "http://jaeger-collector:14268/api/traces" | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.