Skip to content

Commit

Permalink
Merge pull request #15 from dtherhtun/main
Browse files Browse the repository at this point in the history
feat: support updatable port
  • Loading branch information
apetruhin authored May 16, 2024
2 parents 95a41e0 + 4877080 commit fb810e1
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
6 changes: 4 additions & 2 deletions charts/aws-agent/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ spec:
metadata:
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '80'
prometheus.io/port: '{{ .Values.port }}'
{{- with .Values.podAnnotations }}
{{- toYaml . | nindent 8 }}
{{- end }}
Expand Down Expand Up @@ -45,9 +45,11 @@ spec:
value: {{ .Values.rds.filter }}
- name: EC_FILTER
value: {{ .Values.ec.filter }}
- name: LISTEN_ADDRESS
value: {{ .Values.port }}
ports:
- name: http
containerPort: 80
containerPort: {{ .Values.port }}
protocol: TCP
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down
2 changes: 2 additions & 0 deletions charts/aws-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ image:
pullPolicy: IfNotPresent
tag: ""

port: 80

imagePullSecrets: []
nameOverride: ""
fullnameOverride: ""
Expand Down
6 changes: 3 additions & 3 deletions charts/node-agent/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ spec:
app: coroot-node-agent
annotations:
prometheus.io/scrape: 'true'
prometheus.io/port: '80'
prometheus.io/port: '{{ .Values.port }}'
{{- if .Values.podAnnotations }}
{{- toYaml .Values.podAnnotations | nindent 8 }}
{{- end }}
Expand All @@ -31,7 +31,7 @@ spec:
containers:
- name: {{ .Chart.Name }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
command: ["coroot-node-agent", "--cgroupfs-root", "/host/sys/fs/cgroup"]
command: ["coroot-node-agent", "--listen=0.0.0.0:{{ .Values.port }}", "--cgroupfs-root", "/host/sys/fs/cgroup"]
imagePullPolicy: {{ .Values.image.pullPolicy }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
Expand Down Expand Up @@ -68,7 +68,7 @@ spec:
{{- . | toYaml | nindent 12 }}
{{- end }}
ports:
- containerPort: 80
- containerPort: {{ .Values.port }}
name: http
securityContext:
privileged: true
Expand Down
2 changes: 2 additions & 0 deletions charts/node-agent/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ resources:
cpu: "1"
memory: "1Gi"

port: 80

env: []

collectorEndpoint: ""
Expand Down

0 comments on commit fb810e1

Please sign in to comment.