Skip to content

Commit

Permalink
support custom container port (#119)
Browse files Browse the repository at this point in the history
* support custom container port

* bump chart version
  • Loading branch information
ilyesAj authored Feb 24, 2025
1 parent 0bdab47 commit 3332827
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 7 deletions.
2 changes: 1 addition & 1 deletion charts/aws-xray/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ maintainers:
name: aws-xray
sources:
- https://github.com/aws/aws-xray-daemon
version: 4.0.9
version: 4.0.10
4 changes: 2 additions & 2 deletions charts/aws-xray/templates/configmap.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ data:
Socket:
# Change the address and port on which the daemon listens for UDP packets containing segment documents.
# Make sure we listen on all IP's by default for the k8s setup
UDPAddress: "0.0.0.0:2000"
TCPAddress: "0.0.0.0:2000"
UDPAddress: "0.0.0.0:{{ .Values.xray.containerPort }}"
TCPAddress: "0.0.0.0:{{ .Values.xray.containerPort }}"
Logging:
LogRotation: true
# Change the log level, from most verbose to least: dev, debug, info, warn, error, prod (default).
Expand Down
8 changes: 4 additions & 4 deletions charts/aws-xray/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,12 @@ spec:
command: ["/xray", "-c", "/aws/xray/config.yaml"]
ports:
- name: xray-ingest
containerPort: 2000
hostPort: 2000
containerPort: {{ .Values.xray.containerPort }}
hostPort: {{ .Values.xray.containerPort }}
protocol: UDP
- name: xray-tcp
containerPort: 2000
hostPort: 2000
containerPort: {{ .Values.xray.containerPort }}
hostPort: {{ .Values.xray.containerPort }}
protocol: TCP
volumeMounts:
- name: config-volume
Expand Down
2 changes: 2 additions & 0 deletions charts/aws-xray/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,11 @@ spec:
clusterIP: None
ports:
- port: {{ .Values.service.port }}
targetPort: {{ .Values.xray.containerPort }}
protocol: UDP
name: incoming
- port: {{ .Values.service.port }}
targetPort: {{ .Values.xray.containerPort }}
protocol: TCP
name: xray-tcp
selector:
Expand Down
2 changes: 2 additions & 0 deletions charts/aws-xray/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@ xray:
loglevel: prod
# ARN of IAM role to assume
roleArn:
# Port to be used as a hostPort and containerPort on the pod
containerPort: 2000

service:
port: 2000
Expand Down

0 comments on commit 3332827

Please sign in to comment.