diff --git a/config/helm/aws-node-termination-handler/README.md b/config/helm/aws-node-termination-handler/README.md index 3cc54bda..e0934993 100644 --- a/config/helm/aws-node-termination-handler/README.md +++ b/config/helm/aws-node-termination-handler/README.md @@ -135,7 +135,7 @@ Parameter | Description | Default `windowsNodeSelector` | Tells the Windows daemon set where to place the node-termination-handler pods. For example: `lifecycle: "Ec2Spot"`, `on-demand: "false"`, `aws.amazon.com/purchaseType: "spot"`, etc. Value must be a valid yaml expression. | `{}` `tolerations` | list of node taints to tolerate | `[ {"operator": "Exists"} ]` `rbac.create` | if `true`, create and use RBAC resources | `true` -`rbac.pspEnabled` | If `true`, create and use a restricted pod security policy | `false` +`rbac.pspEnabled` | If `true`, create and use a restricted pod security policy | `true` `serviceAccount.create` | If `true`, create a new service account | `true` `serviceAccount.name` | Service account to be used | None `serviceAccount.annotations` | Specifies the annotations for ServiceAccount | `{}` diff --git a/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml b/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml index e85bf0de..a1add405 100644 --- a/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml +++ b/config/helm/aws-node-termination-handler/templates/daemonset.linux.yaml @@ -180,8 +180,10 @@ spec: value: {{ .Values.kubernetesEventsExtraAnnotations | quote }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.enablePrometheusServer }} + {{- if or .Values.enablePrometheusServer .Values.enableProbesServer }} ports: + {{- end }} + {{- if .Values.enablePrometheusServer }} - containerPort: {{ .Values.prometheusServerPort }} {{- if .Values.useHostNetwork }} hostPort: {{ .Values.prometheusServerPort }} @@ -190,7 +192,6 @@ spec: protocol: TCP {{- end }} {{- if .Values.enableProbesServer }} - ports: - containerPort: {{ .Values.probesServerPort }} {{- if .Values.useHostNetwork }} hostPort: {{ .Values.probesServerPort }} diff --git a/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml b/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml index 7c7babcf..9ada6a3f 100644 --- a/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml +++ b/config/helm/aws-node-termination-handler/templates/daemonset.windows.yaml @@ -154,15 +154,16 @@ spec: value: {{ .Values.kubernetesEventsExtraAnnotations | quote }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.enablePrometheusServer }} + {{- if or .Values.enablePrometheusServer .Values.enableProbesServer }} ports: + {{- end }} + {{- if .Values.enablePrometheusServer }} - containerPort: {{ .Values.prometheusServerPort }} hostPort: {{ .Values.prometheusServerPort }} name: http-metrics protocol: TCP {{- end }} {{- if .Values.enableProbesServer }} - ports: - containerPort: {{ .Values.probesServerPort }} hostPort: {{ .Values.probesServerPort }} name: liveness-probe diff --git a/config/helm/aws-node-termination-handler/templates/deployment.yaml b/config/helm/aws-node-termination-handler/templates/deployment.yaml index e9262647..c5c4664f 100644 --- a/config/helm/aws-node-termination-handler/templates/deployment.yaml +++ b/config/helm/aws-node-termination-handler/templates/deployment.yaml @@ -156,15 +156,16 @@ spec: value: {{ .Values.kubernetesEventsExtraAnnotations | quote }} resources: {{- toYaml .Values.resources | nindent 12 }} - {{- if .Values.enablePrometheusServer }} + {{- if or .Values.enablePrometheusServer .Values.enableProbesServer }} ports: + {{- end }} + {{- if .Values.enablePrometheusServer }} - containerPort: {{ .Values.prometheusServerPort }} hostPort: {{ .Values.prometheusServerPort }} name: http-metrics protocol: TCP {{- end }} {{- if .Values.enableProbesServer }} - ports: - containerPort: {{ .Values.probesServerPort }} hostPort: {{ .Values.probesServerPort }} name: liveness-probe