From d1bffe00719889c04c425628c772868932bdfd83 Mon Sep 17 00:00:00 2001 From: eks-bot Date: Tue, 4 Jun 2024 20:09:23 +0000 Subject: [PATCH 1/2] cni-metrics-helper: v1.18.2 --- stable/cni-metrics-helper/Chart.yaml | 2 +- stable/cni-metrics-helper/README.md | 64 ++++++++++++------- .../templates/clusterrole.yaml | 2 + .../templates/deployment.yaml | 26 +++++++- stable/cni-metrics-helper/values.yaml | 33 +++++++++- 5 files changed, 101 insertions(+), 26 deletions(-) diff --git a/stable/cni-metrics-helper/Chart.yaml b/stable/cni-metrics-helper/Chart.yaml index 5bc50145c..1ddce40bb 100644 --- a/stable/cni-metrics-helper/Chart.yaml +++ b/stable/cni-metrics-helper/Chart.yaml @@ -1,7 +1,7 @@ apiVersion: v2 name: cni-metrics-helper version: 1.18.1 -appVersion: v1.18.1 +appVersion: v1.18.2 description: A Helm chart for the AWS VPC CNI Metrics Helper icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png home: https://github.com/aws/amazon-vpc-cni-k8s diff --git a/stable/cni-metrics-helper/README.md b/stable/cni-metrics-helper/README.md index a6a165113..09637235c 100644 --- a/stable/cni-metrics-helper/README.md +++ b/stable/cni-metrics-helper/README.md @@ -12,10 +12,22 @@ This chart provides a Kubernetes deployment for the Amazon VPC CNI Metrics Helpe First add the EKS repository to Helm: ```shell -helm repo add eks https://aws.github.io/eks-charts +$ helm repo add eks https://aws.github.io/eks-charts ``` -To install the chart with the release name `cni-metrics-helper` and default configuration: +Ensure helm repository up to date + +```shell +$ helm repo update eks +``` + +To identify the version you are going to apply + +```shell +$ helm search repo eks/cni-metrics-helper --versions +``` + +To install the latest chart with the release name `cni-metrics-helper` and default configuration: ```shell $ helm install cni-metrics-helper --namespace kube-system eks/cni-metrics-helper @@ -43,26 +55,34 @@ $ helm uninstall cni-metrics-helper --namespace kube-system The following table lists the configurable parameters for this chart and their default values. -| Parameter | Description | Default | -|------------------------------|---------------------------------------------------------------|--------------------| -| fullnameOverride | Override the fullname of the chart | cni-metrics-helper | -| image.region | ECR repository region to use. Should match your cluster | us-west-2 | -| image.tag | Image tag | v1.18.1 | -| image.account | ECR repository account number | 602401143452 | -| image.domain | ECR repository domain | amazonaws.com | -| env.USE_CLOUDWATCH | Whether to export CNI metrics to CloudWatch | true | -| env.USE_PROMETHEUS | Whether to export CNI metrics to Prometheus | false | -| env.AWS_CLUSTER_ID | ID of the cluster to use when exporting metrics to CloudWatch | default | -| env.AWS_VPC_K8S_CNI_LOGLEVEL | Log verbosity level (ie. FATAL, ERROR, WARN, INFO, DEBUG) | INFO | -| env.METRIC_UPDATE_INTERVAL | Interval at which to update CloudWatch metrics, in seconds. | | -| | Metrics are published to CloudWatch at 2x the interval | 30 | -| serviceAccount.name | The name of the ServiceAccount to use | nil | -| serviceAccount.create | Specifies whether a ServiceAccount should be created | true | -| serviceAccount.annotations | Specifies the annotations for ServiceAccount | {} | -| podAnnotations | Specifies the annotations for pods | {} | -| revisionHistoryLimit | The number of revisions to keep | 10 | -| podSecurityContext | SecurityContext to set on the pod | {} | -| containerSecurityContext | SecurityContext to set on the container | {} | + +| Parameter | Description | Default | +| -------------------------------|---------------------------------------------------------------|-------------------------------------| +| `affinity` | Map of node/pod affinities | `{}` | +| `fullnameOverride` | Override the fullname of the chart | `cni-metrics-helper` | +| `image.tag` | Image tag | `v1.18.2` | +| `image.domain` | ECR repository domain | `amazonaws.com` | +| `image.region` | ECR repository region to use. Should match your cluster | `us-west-2` | +| `image.account` | ECR repository account number | `602401143452` | +| `env.USE_CLOUDWATCH` | Whether to export CNI metrics to CloudWatch | `true` | +| `env.USE_PROMETHEUS` | Whether to export CNI metrics to Prometheus | `false` | +| `env.AWS_CLUSTER_ID` | ID of the cluster to use when exporting metrics to CloudWatch | `default` | +| `env.AWS_VPC_K8S_CNI_LOGLEVEL` | Log verbosity level (ie. FATAL, ERROR, WARN, INFO, DEBUG) | `INFO` | +| `env.METRIC_UPDATE_INTERVAL` | Interval at which to update CloudWatch metrics, in seconds. | | +| | Metrics are published to CloudWatch at 2x the interval | `30` | +| `serviceAccount.name` | The name of the ServiceAccount to use | `nil` | +| `serviceAccount.create` | Specifies whether a ServiceAccount should be created | `true` | +| `serviceAccount.annotations` | Specifies the annotations for ServiceAccount | `{}` | +| `podAnnotations` | Specifies the annotations for pods | `{}` | +| `revisionHistoryLimit` | The number of revisions to keep | `10` | +| `podSecurityContext` | SecurityContext to set on the pod | `{}` | +| `containerSecurityContext` | SecurityContext to set on the container | `{}` | +| `tolerations` | Optional deployment tolerations | `[]` | +| `updateStrategy` | Optional update strategy | `{}` | +| `imagePullSecrets` | Docker registry pull secret | `[]` | +| `nodeSelector` | Node labels for pod assignment | `{}` | +| `tolerations` | Optional deployment tolerations | `[]` | + Specify each parameter using the `--set key=value[,key=value]` argument to `helm install` or provide a YAML file containing the values for the above parameters: diff --git a/stable/cni-metrics-helper/templates/clusterrole.yaml b/stable/cni-metrics-helper/templates/clusterrole.yaml index 6f45efd8a..901952d75 100644 --- a/stable/cni-metrics-helper/templates/clusterrole.yaml +++ b/stable/cni-metrics-helper/templates/clusterrole.yaml @@ -2,6 +2,8 @@ apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: {{ include "cni-metrics-helper.fullname" . }} + labels: +{{ include "cni-metrics-helper.labels" . | indent 4 }} rules: - apiGroups: [""] resources: diff --git a/stable/cni-metrics-helper/templates/deployment.yaml b/stable/cni-metrics-helper/templates/deployment.yaml index adadf2bf7..192ce9e56 100644 --- a/stable/cni-metrics-helper/templates/deployment.yaml +++ b/stable/cni-metrics-helper/templates/deployment.yaml @@ -5,7 +5,11 @@ metadata: namespace: {{ .Release.Namespace }} labels: k8s-app: cni-metrics-helper +{{ include "cni-metrics-helper.labels" . | indent 4 }} spec: +{{- if .Values.updateStrategy }} + strategy: {{ toYaml .Values.updateStrategy | nindent 4 }} +{{- end }} revisionHistoryLimit: {{ .Values.revisionHistoryLimit }} selector: matchLabels: @@ -19,6 +23,8 @@ spec: {{- end }} {{- end }} labels: + app.kubernetes.io/name: {{ include "cni-metrics-helper.name" . }} + app.kubernetes.io/instance: {{ .Release.Name }} k8s-app: cni-metrics-helper spec: containers: @@ -36,6 +42,22 @@ spec: name: cni-metrics-helper image: "{{- if .Values.image.override }}{{- .Values.image.override }}{{- else }}{{- .Values.image.account }}.dkr.ecr.{{- .Values.image.region }}.{{- .Values.image.domain }}/cni-metrics-helper:{{- .Values.image.tag }}{{- end}}" serviceAccountName: {{ template "cni-metrics-helper.serviceAccountName" . }} -{{- if .Values.podSecurityContext }} + {{- with .Values.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.podSecurityContext }} securityContext: {{ toYaml .Values.podSecurityContext | nindent 8 }} -{{- end }} + {{- end }} + {{- with .Values.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} \ No newline at end of file diff --git a/stable/cni-metrics-helper/values.yaml b/stable/cni-metrics-helper/values.yaml index 3f4416e06..edf99213c 100644 --- a/stable/cni-metrics-helper/values.yaml +++ b/stable/cni-metrics-helper/values.yaml @@ -4,7 +4,7 @@ nameOverride: cni-metrics-helper image: region: us-west-2 - tag: v1.18.1 + tag: v1.18.2 account: "602401143452" domain: "amazonaws.com" # Set to use custom image @@ -36,3 +36,34 @@ podSecurityContext: {} containerSecurityContext: {} podAnnotations: {} + +imagePullSecrets: [] + +updateStrategy: {} +# type: RollingUpdate +# rollingUpdate: +# maxUnavailable: "10%" + +nodeSelector: {} + +tolerations: [] +# - operator: Exists + +affinity: {} +# nodeAffinity: +# requiredDuringSchedulingIgnoredDuringExecution: +# nodeSelectorTerms: +# - matchExpressions: +# - key: "kubernetes.io/os" +# operator: In +# values: +# - linux +# - key: "kubernetes.io/arch" +# operator: In +# values: +# - amd64 +# - arm64 +# - key: "eks.amazonaws.com/compute-type" +# operator: NotIn +# values: +# - fargate From 6b3d7538bc98c12928070ec01f404a21c586de66 Mon Sep 17 00:00:00 2001 From: Senthil Kumaran Date: Tue, 4 Jun 2024 13:48:33 -0700 Subject: [PATCH 2/2] Update Chart.yaml Update Chart Version in Sync with appVersion --- stable/cni-metrics-helper/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/stable/cni-metrics-helper/Chart.yaml b/stable/cni-metrics-helper/Chart.yaml index 1ddce40bb..e3c4721fb 100644 --- a/stable/cni-metrics-helper/Chart.yaml +++ b/stable/cni-metrics-helper/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: cni-metrics-helper -version: 1.18.1 +version: 1.18.2 appVersion: v1.18.2 description: A Helm chart for the AWS VPC CNI Metrics Helper icon: https://raw.githubusercontent.com/aws/eks-charts/master/docs/logo/aws.png