Skip to content

Commit

Permalink
change default node agent ports for health and metrics (#2543)
Browse files Browse the repository at this point in the history
  • Loading branch information
jdn5126 authored Sep 5, 2023
1 parent 74188a5 commit 7701091
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 1 deletion.
2 changes: 2 additions & 0 deletions charts/aws-vpc-cni/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,8 @@ The following table lists the configurable parameters for this chart and their d
| `nodeAgent.image.pullPolicy` | Container pull policy | `IfNotPresent` |
| `nodeAgent.securityContext` | Node Agent container Security context | `capabilities: add: - "NET_ADMIN" privileged: true` |
| `nodeAgent.enableCloudWatchLogs` | Enable CW logging for Node Agent | `false` |
| `nodeAgent.metricsBindAddr` | Node Agent port for metrics | `8162` |
| `nodeAgent.healthProbeBindAddr` | Node Agent port for health probes | `8163` |
| `nodeAgent.enableIpv6` | Enable IPv6 support for Node Agent | `false` |
| `extraVolumes` | Array to add extra volumes | `[]` |
| `extraVolumeMounts` | Array to add extra mount | `[]` |
Expand Down
16 changes: 15 additions & 1 deletion charts/aws-vpc-cni/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -87,4 +87,18 @@ The aws-network-policy-agent image to use
{{- else }}
{{- printf "%s.dkr.%s.%s.%s/amazon/aws-network-policy-agent:%s" .Values.nodeAgent.image.account .Values.nodeAgent.image.endpoint .Values.nodeAgent.image.region .Values.nodeAgent.image.domain .Values.nodeAgent.image.tag }}
{{- end -}}
{{- end -}}
{{- end -}}

{{/*
The aws-network-policy-agent port to bind to for metrics
*/}}
{{- define "aws-vpc-cni.nodeAgentMetricsBindAddr" -}}
{{- printf ":%s" .Values.nodeAgent.metricsBindAddr }}
{{- end -}}

{{/*
The aws-network-policy-agent port to bind to for health probes
*/}}
{{- define "aws-vpc-cni.nodeAgentHealthProbeBindAddr" -}}
{{- printf ":%s" .Values.nodeAgent.healthProbeBindAddr }}
{{- end -}}
2 changes: 2 additions & 0 deletions charts/aws-vpc-cni/templates/daemonset.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,8 @@ spec:
- --enable-ipv6={{ .Values.nodeAgent.enableIpv6 }}
- --enable-network-policy={{ .Values.enableNetworkPolicy }}
- --enable-cloudwatch-logs={{ .Values.nodeAgent.enableCloudWatchLogs }}
- --metrics-bind-addr={{ include "aws-vpc-cni.nodeAgentMetricsBindAddr" . }}
- --health-probe-bind-addr={{ include "aws-vpc-cni.nodeAgentHealthProbeBindAddr" . }}
resources:
{{- toYaml .Values.resources | nindent 12 }}
securityContext:
Expand Down
2 changes: 2 additions & 0 deletions charts/aws-vpc-cni/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,8 @@ nodeAgent:
privileged: true
enableCloudWatchLogs: "false"
enableIpv6: "false"
metricsBindAddr: "8162"
healthProbeBindAddr: "8163"

image:
tag: v1.15.0
Expand Down
2 changes: 2 additions & 0 deletions config/master/aws-k8s-cni-cn.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ spec:
- --enable-ipv6=false
- --enable-network-policy=false
- --enable-cloudwatch-logs=false
- --metrics-bind-addr=:8162
- --health-probe-bind-addr=:8163
resources:
requests:
cpu: 25m
Expand Down
2 changes: 2 additions & 0 deletions config/master/aws-k8s-cni-us-gov-east-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ spec:
- --enable-ipv6=false
- --enable-network-policy=false
- --enable-cloudwatch-logs=false
- --metrics-bind-addr=:8162
- --health-probe-bind-addr=:8163
resources:
requests:
cpu: 25m
Expand Down
2 changes: 2 additions & 0 deletions config/master/aws-k8s-cni-us-gov-west-1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ spec:
- --enable-ipv6=false
- --enable-network-policy=false
- --enable-cloudwatch-logs=false
- --metrics-bind-addr=:8162
- --health-probe-bind-addr=:8163
resources:
requests:
cpu: 25m
Expand Down
2 changes: 2 additions & 0 deletions config/master/aws-k8s-cni.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,8 @@ spec:
- --enable-ipv6=false
- --enable-network-policy=false
- --enable-cloudwatch-logs=false
- --metrics-bind-addr=:8162
- --health-probe-bind-addr=:8163
resources:
requests:
cpu: 25m
Expand Down

0 comments on commit 7701091

Please sign in to comment.