Skip to content

Commit

Permalink
Merge pull request #1146 from stevehipwell/release-helm-chart-v3-8-3
Browse files Browse the repository at this point in the history
Release Helm chart v3.8.3
  • Loading branch information
k8s-ci-robot authored Dec 8, 2022
2 parents cf396d8 + e80450b commit eb650ca
Show file tree
Hide file tree
Showing 13 changed files with 113 additions and 27 deletions.
18 changes: 15 additions & 3 deletions charts/metrics-server/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: metrics-server
description: Metrics Server is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
type: application
version: 3.8.2
appVersion: 0.6.1
version: 3.8.3
appVersion: 0.6.2
keywords:
- kubernetes
- metrics-server
Expand All @@ -21,5 +21,17 @@ maintainers:
url: https://github.com/endrec
annotations:
artifacthub.io/changes: |
- kind: added
description: "Added support for topologySpreadConstraints."
- kind: added
description: "Set resource namespaces explicitly."
- kind: added
description: "Allow configuring TLS on the APIService."
- kind: added
description: "Enabled service monitor relabelling."
- kind: added
description: "Added ability to set the scheduler name."
- kind: added
description: "Added support for common labels."
- kind: changed
description: "Allow probes to be turned off completly (this is not advised unless you know what you're doing)."
description: "Updated Metrics Server image to v0.6.2."
12 changes: 11 additions & 1 deletion charts/metrics-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,14 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `serviceAccount.create` | If `true`, create a new service account. | `true` |
| `serviceAccount.annotations` | Annotations to add to the service account. | `{}` |
| `serviceAccount.name` | Service account to be used. If not set and `serviceAccount.create` is `true`, a name is generated using the full name template. | `nil` |
| `serviceAccount.secrets` | The list of secrets mountable by this service account. See https://kubernetes.io/docs/reference/labels-annotations-taints/#enforce-mountable-secrets | `[]` |
| `rbac.create` | If `true`, create the RBAC resources. | `true` |
| `rbac.pspEnabled` | If `true`, create a pod security policy resource. | `false` |
| `apiService.create` | If `true`, create the `v1beta1.metrics.k8s.io` API service. You typically want this enabled! If you disable API service creation you have to manage it outside of this chart for e.g horizontal pod autoscaling to work with this release. | `true` |
| `apiService.annotations` | Annotations to add to the API service. | `{}` |
| `apiService.insecureSkipTLSVerify` | Specifies whether to skip TLS verification | `true` |
| `apiService.caBundle` | The PEM encoded CA bundle for TLS verification | `""` |
| `commonLabels` | Labels to add to each object of the chart. | `{}` |
| `podLabels` | Labels to add to the pod. | `{}` |
| `podAnnotations` | Annotations to add to the pod. | `{}` |
| `podSecurityContext` | Security context for the pod. | `{}` |
Expand All @@ -59,11 +64,16 @@ The following table lists the configurable parameters of the _Metrics Server_ ch
| `metrics.enabled` | If `true`, allow unauthenticated access to `/metrics`. | `false` |
| `serviceMonitor.enabled` | If `true`, create a _Prometheus_ service monitor. This needs `metrics.enabled` to be `true`. | `false` |
| `serviceMonitor.additionalLabels` | Additional labels to be set on the ServiceMonitor. | `{}` |
| `serviceMonitor.metricRelabelings` | _Prometheus_ metric relabeling. | `[]` |
| `serviceMonitor.relabelings` | _Prometheus_ relabeling. | `[]` |
| `serviceMonitor.interval` | _Prometheus_ scrape frequency. | `1m` |
| `serviceMonitor.scrapeTimeout` | _Prometheus_ scrape timeout. | `10s` |
| `resources` | Resource requests and limits for the _metrics-server_ container. | `{}` |
| `resources` | Resource requests and limits for the _metrics-server_ container. See https://github.com/kubernetes-sigs/metrics-server#scaling | `{}` |
| `extraVolumeMounts` | Additional volume mounts for the _metrics-server_ container. | `[]` |
| `extraVolumes` | Additional volumes for the pod. | `[]` |
| `nodeSelector` | Node labels for pod assignment. | `{}` |
| `tolerations` | Tolerations for pod assignment. | `[]` |
| `affinity` | Affinity for pod assignment. | `{}` |
| `topologySpreadConstraints` | Pod Topology Spread Constraints. | `[]` |
| `deploymentAnnotations` | Annotations to add to the deployment. | `{}` |
| `schedulerName` | scheduler to set to the deployment. | `""` |
3 changes: 3 additions & 0 deletions charts/metrics-server/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ helm.sh/chart: {{ include "metrics-server.chart" . }}
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
{{- end }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
{{- if .Values.commonLabels }}
{{ toYaml .Values.commonLabels }}
{{- end }}
{{- end }}

{{/*
Expand Down
10 changes: 9 additions & 1 deletion charts/metrics-server/templates/apiservice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,21 @@ metadata:
name: v1beta1.metrics.k8s.io
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.apiService.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- with .Values.apiService.caBundle }}
caBundle: {{ b64enc . }}
{{- end }}
group: metrics.k8s.io
groupPriorityMinimum: 100
insecureSkipTLSVerify: true
insecureSkipTLSVerify: {{ .Values.apiService.insecureSkipTLSVerify }}
service:
name: {{ include "metrics-server.fullname" . }}
namespace: {{ .Release.Namespace }}
port: {{ .Values.service.port }}
version: v1beta1
versionPriority: 100
{{- end -}}
10 changes: 10 additions & 0 deletions charts/metrics-server/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,13 @@ apiVersion: apps/v1
kind: Deployment
metadata:
name: {{ include "metrics-server.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
replicas: {{ .Values.replicas }}
{{- with .Values.updateStrategy }}
Expand All @@ -25,6 +30,7 @@ spec:
{{- toYaml . | nindent 8 }}
{{- end }}
spec:
schedulerName: {{ .Values.schedulerName }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
Expand Down Expand Up @@ -99,3 +105,7 @@ spec:
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.topologySpreadConstraints }}
topologySpreadConstraints:
{{- toYaml . | nindent 8 }}
{{- end }}
1 change: 1 addition & 0 deletions charts/metrics-server/templates/pdb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: {{ include "metrics-server.pdb.apiVersion" . }}
kind: PodDisruptionBudget
metadata:
name: {{ include "metrics-server.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
spec:
Expand Down
2 changes: 1 addition & 1 deletion charts/metrics-server/templates/rolebinding.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ apiVersion: rbac.authorization.k8s.io/v1
kind: RoleBinding
metadata:
name: {{ printf "%s-auth-reader" (include "metrics-server.fullname" .) }}
namespace: kube-system
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
roleRef:
Expand Down
5 changes: 3 additions & 2 deletions charts/metrics-server/templates/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,13 @@ apiVersion: v1
kind: Service
metadata:
name: {{ include "metrics-server.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.service.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.service.labels -}}
{{- toYaml . | nindent 4 }}
{{- end }}
Expand Down
9 changes: 7 additions & 2 deletions charts/metrics-server/templates/serviceaccount.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,15 @@ apiVersion: v1
kind: ServiceAccount
metadata:
name: {{ template "metrics-server.serviceAccountName" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.serviceAccount.secrets }}
secrets:
{{- toYaml . | nindent 2 }}
{{- end }}
{{- end -}}
9 changes: 9 additions & 0 deletions charts/metrics-server/templates/servicemonitor.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: {{ include "metrics-server.fullname" . }}
namespace: {{ .Release.Namespace }}
labels:
{{- include "metrics-server.labels" . | nindent 4 }}
{{- with .Values.serviceMonitor.additionalLabels }}
Expand All @@ -28,4 +29,12 @@ spec:
{{- with .Values.serviceMonitor.scrapeTimeout }}
scrapeTimeout: {{ . }}
{{- end }}
{{- with .Values.serviceMonitor.metricRelabelings }}
metricRelabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.serviceMonitor.relabelings }}
relabelings:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- end -}}
22 changes: 21 additions & 1 deletion charts/metrics-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ image:
pullPolicy: IfNotPresent

imagePullSecrets: []
# - registrySecretName
# - name: registrySecretName

nameOverride: ""
fullnameOverride: ""
Expand All @@ -22,6 +22,9 @@ serviceAccount:
# The name of the service account to use.
# If not set and create is true, a name is generated using the fullname template
name: ""
# The list of secrets mountable by this service account.
# See https://kubernetes.io/docs/reference/labels-annotations-taints/#enforce-mountable-secrets
secrets: []

rbac:
# Specifies whether RBAC resources should be created
Expand All @@ -35,7 +38,14 @@ apiService:
# manage it outside of this chart for e.g horizontal pod autoscaling to
# work with this release.
create: true
# Annotations to add to the API service
annotations: {}
# Specifies whether to skip TLS verification
insecureSkipTLSVerify: true
# The PEM encoded CA bundle for TLS verification
caBundle: ""

commonLabels: {}
podLabels: {}
podAnnotations: {}

Expand Down Expand Up @@ -116,7 +126,10 @@ serviceMonitor:
additionalLabels: {}
interval: 1m
scrapeTimeout: 10s
metricRelabelings: []
relabelings: []

# See https://github.com/kubernetes-sigs/metrics-server#scaling
resources: {}

extraVolumeMounts: []
Expand All @@ -128,3 +141,10 @@ nodeSelector: {}
tolerations: []

affinity: {}

topologySpreadConstraints: []

# Annotations to add to the deployment
deploymentAnnotations: {}

schedulerName: ""
28 changes: 17 additions & 11 deletions skaffold.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,32 +7,38 @@ build:
useDockerCLI: true
useBuildkit: true
artifacts:
- image: gcr.io/k8s-staging-metrics-server/metrics-server
docker:
dockerfile: Dockerfile
buildArgs:
ARCH: "amd64"
GIT_TAG: "devel"
deploy:
kustomize:
paths:
- manifests/test
- image: gcr.io/k8s-staging-metrics-server/metrics-server
docker:
dockerfile: Dockerfile
buildArgs:
ARCH: "amd64"
GIT_TAG: "devel"

profiles:
- name: test
deploy:
kustomize:
paths:
- manifests/test
- name: test-ha
deploy:
kustomize:
paths:
- manifests/test-ha
- manifests/test-ha
- name: helm
deploy:
helm:
releases:
- name: metrics-server
namespace: kube-system
artifactOverrides:
imageKey: gcr.io/k8s-staging-metrics-server/metrics-server
chartPath: charts/metrics-server
setValueTemplates:
image.repository: "{{.IMAGE_REPO}}"
image.tag: "{{.IMAGE_TAG}}"
setValues:
podLabels: { k8s-app: metrics-server }
containerPort: 4443
valuesFiles:
- charts/metrics-server/ci/ci-values.yaml
11 changes: 6 additions & 5 deletions test/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
set -e

: ${NODE_IMAGE:?Need to set NODE_IMAGE to test}
: ${SKAFFOLD_PROFILE:-""}
: ${SKAFFOLD_PROFILE:="test"}


KIND_VERSION=0.14.0
SKAFFOLD_VERSION=1.38.0
HELM_VERSION=3.7.1
HELM_VERSION=3.10.2

delete_cluster() {
${KIND} delete cluster --name=e2e &> /dev/null || true
Expand All @@ -22,9 +22,10 @@ setup_helm() {
if ! [[ $(${HELM} version |grep Version |awk -F'Version:' '{print $2}' |awk -F',' '{print $1}') == "\"v${HELM_VERSION}\"" ]] ; then
echo "helm not found or bad version, downloading binary"
mkdir -p _output
wget https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz
tar -zxvf helm-v${HELM_VERSION}-linux-amd64.tar.gz
mv linux-amd64/helm _output/helm
curl -Lo /tmp/helm.tar.gz "https://get.helm.sh/helm-v${HELM_VERSION}-linux-amd64.tar.gz"
tar -xzf /tmp/helm.tar.gz -C /tmp
rm -f /tmp/helm.tar.gz
mv -f /tmp/linux-amd64/helm _output/helm
chmod +x _output/helm
HELM=_output/helm
fi
Expand Down

0 comments on commit eb650ca

Please sign in to comment.