Add goldilocks
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,6 @@
|
||||
dependencies:
|
||||
- name: metrics-server
|
||||
repository: https://kubernetes-sigs.github.io/metrics-server/
|
||||
version: 3.10.0
|
||||
digest: sha256:0a1ceadffa31a28b452eddff98027bcc4df9894d22f2e74ccbfa1828477db27c
|
||||
generated: "2023-06-05T09:00:56.207403385+02:00"
|
||||
@@ -0,0 +1,19 @@
|
||||
apiVersion: v2
|
||||
appVersion: 0.13.0
|
||||
dependencies:
|
||||
- alias: metrics-server
|
||||
condition: metrics-server.enabled
|
||||
name: metrics-server
|
||||
repository: https://kubernetes-sigs.github.io/metrics-server/
|
||||
version: 3.10.0
|
||||
description: A Helm chart for Kubernetes Vertical Pod Autoscaler
|
||||
home: https://github.com/FairwindsOps/charts/tree/master/stable/vpa
|
||||
kubeVersion: '>= 1.21.0-0'
|
||||
maintainers:
|
||||
- name: sudermanjr
|
||||
name: vpa
|
||||
sources:
|
||||
- https://github.com/FairwindsOps/charts/tree/master/stable/vpa
|
||||
- https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler
|
||||
type: application
|
||||
version: 2.2.0
|
||||
@@ -0,0 +1,190 @@
|
||||
# VPA
|
||||
|
||||
A chart to install the [Kubernetes Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler)
|
||||
|
||||
This chart is mostly based on the manifests and various scripts in the `deploy` and `hack` directories of the VPA repository.
|
||||
|
||||
## Tests and Debugging
|
||||
|
||||
There are a few tests included with this chart that can help debug why your installation of VPA isn't working as expected. You can run `helm test -n <Release Namespace> <Release Name>` to run them.
|
||||
|
||||
* `crds-available` - Checks for both the _verticalpodautoscalers_ and _verticalpodautoscalercheckpoints_ CRDs
|
||||
* `metrics-api-available` - Checks to make sure that the metrics API endpoint is available. If it's not, install [metrics-server](https://github.com/kubernetes-sigs/metrics-server) in your cluster.
|
||||
* `create-vpa` - A simple check to make sure that VPA objects can be created in your cluster. Does not check for functionality of that VPA.
|
||||
+ `webhook-configuration` - Checks that both the service and the CA bundle in the MutatingWebhookconfiguration are configured correctly.
|
||||
|
||||
## Components
|
||||
|
||||
There are three primary components to the Vertical Pod Autoscaler that can be enabled individually here.
|
||||
|
||||
* recommender
|
||||
* updater
|
||||
* admissionController
|
||||
|
||||
The admissionController is the only one that poses a stability consideration because it will create a `MutatingWebhookconfiguration` in your cluster. This _could_ cause the cluster to stop accepting pod creation requests, if it is not configured correctly. Because of this, the `MutatingWebhookconfiguration` has its `failurePolicy` set to `Ignore` by default.
|
||||
|
||||
For more details, please see the values below, and the vertical pod autosclaer documentation.
|
||||
|
||||
## *BREAKING* Upgrading from <= v1.7.x to 2.0.0
|
||||
|
||||
### Certificate generation
|
||||
|
||||
The certificate creation process was changed from using OpenSSL to [kube-webhook-certgen](https://github.com/kubernetes/ingress-nginx/tree/main/images/kube-webhook-certgen) to simplify the process.
|
||||
It still uses the same configuration keys (.Values.admissionController.certGen), which makes it impossible to reuse the values from a previous install.
|
||||
|
||||
You can mitigate this change by setting the correct image for the upgrade:
|
||||
|
||||
```bash
|
||||
helm upgrade <release name> fairwinds-stable/vpa --version 2.0.0 --reuse-values \
|
||||
--set "admissionController.certGen.image.repository=registry.k8s.io/ingress-nginx/kube-webhook-certgen" \
|
||||
--set "admissionController.certGen.image.tag=v20230312-helm-chart-4.5.2-28-g66a760794"
|
||||
```
|
||||
|
||||
The new process is incompatible with the old secrets layout. To mitigate this, the secret was renamed to (by default) `<release name>-tls-certs` and can now also be customized.
|
||||
|
||||
All other changes are implemented in a non breaking fashion.
|
||||
|
||||
### MutatingWebhookconfiguration
|
||||
|
||||
Previously, the webhook creation was handled by the admission controller itself. This had the downside that Helm is not in control of the resource and therefore required the cleanupOnDelete job.
|
||||
|
||||
This version disables the *selfRegistration* by the admission controller and creates the MutatingWebhookconfiguration using Helm.
|
||||
|
||||
You can either:
|
||||
|
||||
* Migrate the MutatingWebhookconfiguration by:
|
||||
* adding the label `app.kubernetes.io/managed-by: Helm`
|
||||
* adding the annotation `meta.helm.sh/release-name: <release name>`
|
||||
* adding the annotation `meta.helm.sh/release-namespace: <release namespace>`
|
||||
|
||||
* delete the configuration and it will be recreated by Helm
|
||||
* or keep the configuration as it is and Helm will ignore it. Execute the tests, to make sure everything works.
|
||||
|
||||
Also, the `cleanupOnDelete` configuration is obsolete.
|
||||
|
||||
### Admission controller
|
||||
|
||||
The admission controller is enabled by default.
|
||||
|
||||
## *BREAKING* Upgrading from v0.x.x to v1.x.x
|
||||
|
||||
In the previous version, when the admissionController.cleanupOnDelete flag was set to true, MutatingWebhookconfiguration and the tls secret for the admission controller were removed. There was no chance to pass any image information to start remove process. Now, it could be passed custom image by version 1.0.0.
|
||||
|
||||
```yaml
|
||||
cleanupOnDelete:
|
||||
enabled: true
|
||||
image:
|
||||
repository: quay.io/reactiveops/ci-images
|
||||
tag: v11-alpine
|
||||
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
helm repo add fairwinds-stable https://charts.fairwinds.com/stable
|
||||
helm install vpa fairwinds-stable/vpa --namespace vpa --create-namespace
|
||||
```
|
||||
|
||||
## Utilize Prometheus for History
|
||||
|
||||
In order to utilize prometheus for recommender history, you will need to pass some extra flags to the recommender. If you use prometheus operator installed in the `prometheus-operator` namespace, these values will do the trick.
|
||||
|
||||
```yaml
|
||||
recommender:
|
||||
extraArgs:
|
||||
prometheus-address: |
|
||||
http://prometheus-operator-prometheus.prometheus-operator.svc.cluster.local:9090
|
||||
storage: prometheus
|
||||
```
|
||||
|
||||
## Values
|
||||
|
||||
| Key | Type | Default | Description |
|
||||
|-----|------|---------|-------------|
|
||||
| imagePullSecrets | list | `[]` | A list of image pull secrets to be used for all pods |
|
||||
| priorityClassName | string | `""` | To set the priorityclass for all pods |
|
||||
| nameOverride | string | `""` | A template override for the name |
|
||||
| fullnameOverride | string | `""` | A template override for the fullname |
|
||||
| podLabels | object | `{}` | Labels to add to all pods |
|
||||
| rbac.create | bool | `true` | If true, then rbac resources (clusterroles and clusterrolebindings) will be created for the selected components. Temporary rbac resources will still be created, to ensure a functioning installation process |
|
||||
| serviceAccount.create | bool | `true` | Specifies whether a service account should be created for each component |
|
||||
| serviceAccount.annotations | object | `{}` | Annotations to add to the service accounts for each component |
|
||||
| serviceAccount.name | string | `""` | The base name of the service account to use (appended with the component). If not set and create is true, a name is generated using the fullname template and appended for each component |
|
||||
| serviceAccount.automountServiceAccountToken | bool | `true` | Automount API credentials for the Service Account |
|
||||
| recommender.enabled | bool | `true` | If true, the vpa recommender component will be installed. |
|
||||
| recommender.extraArgs | object | `{"pod-recommendation-min-cpu-millicores":15,"pod-recommendation-min-memory-mb":100,"v":"4"}` | A set of key-value flags to be passed to the recommender |
|
||||
| recommender.replicaCount | int | `1` | |
|
||||
| recommender.podDisruptionBudget | object | `{}` | This is the setting for the pod disruption budget |
|
||||
| recommender.image.repository | string | `"registry.k8s.io/autoscaling/vpa-recommender"` | The location of the recommender image |
|
||||
| recommender.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion |
|
||||
| recommender.image.pullPolicy | string | `"Always"` | The pull policy for the recommender image. Recommend not changing this |
|
||||
| recommender.podAnnotations | object | `{}` | Annotations to add to the recommender pod |
|
||||
| recommender.podLabels | object | `{}` | Labels to add to the recommender pod |
|
||||
| recommender.podSecurityContext | object | `{"runAsNonRoot":true,"runAsUser":65534}` | The security context for the recommender pod |
|
||||
| recommender.securityContext | object | `{}` | The security context for the containers inside the recommender pod |
|
||||
| recommender.livenessProbe | object | `{"failureThreshold":6,"httpGet":{"path":"/health-check","port":"metrics","scheme":"HTTP"},"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3}` | The liveness probe definition inside the recommender pod |
|
||||
| recommender.readinessProbe | object | `{"failureThreshold":120,"httpGet":{"path":"/health-check","port":"metrics","scheme":"HTTP"},"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3}` | The readiness probe definition inside the recommender pod |
|
||||
| recommender.resources | object | `{"limits":{"cpu":"200m","memory":"1000Mi"},"requests":{"cpu":"50m","memory":"500Mi"}}` | The resources block for the recommender pod |
|
||||
| recommender.nodeSelector | object | `{}` | |
|
||||
| recommender.tolerations | list | `[]` | |
|
||||
| recommender.affinity | object | `{}` | |
|
||||
| recommender.podMonitor | object | `{"annotations":{},"enabled":false,"labels":{}}` | Enables a prometheus operator podMonitor for the recommender |
|
||||
| updater.enabled | bool | `true` | If true, the updater component will be deployed |
|
||||
| updater.extraArgs | object | `{}` | A key-value map of flags to pass to the updater |
|
||||
| updater.replicaCount | int | `1` | |
|
||||
| updater.podDisruptionBudget | object | `{}` | This is the setting for the pod disruption budget |
|
||||
| updater.image.repository | string | `"registry.k8s.io/autoscaling/vpa-updater"` | The location of the updater image |
|
||||
| updater.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion |
|
||||
| updater.image.pullPolicy | string | `"Always"` | The pull policy for the updater image. Recommend not changing this |
|
||||
| updater.podAnnotations | object | `{}` | Annotations to add to the updater pod |
|
||||
| updater.podLabels | object | `{}` | Labels to add to the updater pod |
|
||||
| updater.podSecurityContext | object | `{"runAsNonRoot":true,"runAsUser":65534}` | The security context for the updater pod |
|
||||
| updater.securityContext | object | `{}` | The security context for the containers inside the updater pod |
|
||||
| updater.livenessProbe | object | `{"failureThreshold":6,"httpGet":{"path":"/health-check","port":"metrics","scheme":"HTTP"},"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3}` | The liveness probe definition inside the updater pod |
|
||||
| updater.readinessProbe | object | `{"failureThreshold":120,"httpGet":{"path":"/health-check","port":"metrics","scheme":"HTTP"},"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3}` | The readiness probe definition inside the updater pod |
|
||||
| updater.resources | object | `{"limits":{"cpu":"200m","memory":"1000Mi"},"requests":{"cpu":"50m","memory":"500Mi"}}` | The resources block for the updater pod |
|
||||
| updater.nodeSelector | object | `{}` | |
|
||||
| updater.tolerations | list | `[]` | |
|
||||
| updater.affinity | object | `{}` | |
|
||||
| updater.podMonitor | object | `{"annotations":{},"enabled":false,"labels":{}}` | Enables a prometheus operator podMonitor for the updater |
|
||||
| admissionController.enabled | bool | `true` | If true, will install the admission-controller component of vpa |
|
||||
| admissionController.extraArgs | object | `{}` | A key-value map of flags to pass to the admissionController |
|
||||
| admissionController.generateCertificate | bool | `true` | If true and admissionController is enabled, a pre-install hook will run to create the certificate for the webhook |
|
||||
| admissionController.secretName | string | `"{{ include \"vpa.fullname\" . }}-tls-secret"` | Name for the TLS secret created for the webhook. Default {{ .Release.Name }}-tls-secret |
|
||||
| admissionController.certGen.image.repository | string | `"registry.k8s.io/ingress-nginx/kube-webhook-certgen"` | An image that contains certgen for creating certificates. Only used if admissionController.generateCertificate is true |
|
||||
| admissionController.certGen.image.tag | string | `"v20230312-helm-chart-4.5.2-28-g66a760794"` | An image tag for the admissionController.certGen.image.repository image. Only used if admissionController.generateCertificate is true |
|
||||
| admissionController.certGen.image.pullPolicy | string | `"Always"` | The pull policy for the certgen image. Recommend not changing this |
|
||||
| admissionController.certGen.env | object | `{}` | Additional environment variables to be added to the certgen container. Format is KEY: Value format |
|
||||
| admissionController.certGen.resources | object | `{}` | The resources block for the certgen pod |
|
||||
| admissionController.certGen.securityContext | object | `{}` | The securityContext block for the certgen pod |
|
||||
| admissionController.certGen.nodeSelector | object | `{}` | |
|
||||
| admissionController.certGen.tolerations | list | `[]` | |
|
||||
| admissionController.certGen.affinity | object | `{}` | |
|
||||
| admissionController.mutatingWebhookConfiguration.annotations | object | `{}` | Additional annotations for the MutatingWebhookConfiguration. Can be used for integration with cert-manager |
|
||||
| admissionController.mutatingWebhookConfiguration.failurePolicy | string | `"Ignore"` | The failurePolicy for the mutating webhook. Allowed values are: Ignore, Fail |
|
||||
| admissionController.mutatingWebhookConfiguration.namespaceSelector | object | `{}` | The namespaceSelector controls, which namespaces are affected by the webhook |
|
||||
| admissionController.mutatingWebhookConfiguration.objectSelector | object | `{}` | The objectSelector can filter object on e.g. labels |
|
||||
| admissionController.mutatingWebhookConfiguration.timeoutSeconds | int | `30` | |
|
||||
| admissionController.replicaCount | int | `1` | |
|
||||
| admissionController.podDisruptionBudget | object | `{}` | This is the setting for the pod disruption budget |
|
||||
| admissionController.image.repository | string | `"registry.k8s.io/autoscaling/vpa-admission-controller"` | The location of the vpa admission controller image |
|
||||
| admissionController.image.tag | string | `""` | Overrides the image tag whose default is the chart appVersion |
|
||||
| admissionController.image.pullPolicy | string | `"Always"` | The pull policy for the admission controller image. Recommend not changing this |
|
||||
| admissionController.podAnnotations | object | `{}` | Annotations to add to the admission controller pod |
|
||||
| admissionController.podLabels | object | `{}` | Labels to add to the admission controller pod |
|
||||
| admissionController.podSecurityContext | object | `{"runAsNonRoot":true,"runAsUser":65534}` | The security context for the admission controller pod |
|
||||
| admissionController.securityContext | object | `{}` | The security context for the containers inside the admission controller pod |
|
||||
| admissionController.livenessProbe | object | `{"failureThreshold":6,"httpGet":{"path":"/health-check","port":"metrics","scheme":"HTTP"},"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3}` | The liveness probe definition inside the admission controller pod |
|
||||
| admissionController.readinessProbe | object | `{"failureThreshold":120,"httpGet":{"path":"/health-check","port":"metrics","scheme":"HTTP"},"periodSeconds":5,"successThreshold":1,"timeoutSeconds":3}` | The readiness probe definition inside the admission controller pod |
|
||||
| admissionController.resources | object | `{"limits":{"cpu":"200m","memory":"500Mi"},"requests":{"cpu":"50m","memory":"200Mi"}}` | The resources block for the admission controller pod |
|
||||
| admissionController.tlsSecretKeys | list | `[]` | The keys in the vpa-tls-certs secret to map in to the admission controller |
|
||||
| admissionController.nodeSelector | object | `{}` | |
|
||||
| admissionController.tolerations | list | `[]` | |
|
||||
| admissionController.affinity | object | `{}` | |
|
||||
| tests.securityContext | object | `{"allowPrivilegeEscalation":false,"capabilities":{"drop":["ALL"]},"readOnlyRootFilesystem":true,"runAsNonRoot":true,"runAsUser":10324}` | The security context for the containers run as helm hook tests |
|
||||
| tests.image.repository | string | `"bitnami/kubectl"` | An image used for testing containing bash, cat and kubectl |
|
||||
| tests.image.tag | string | `""` | An image tag for the tests image |
|
||||
| tests.image.pullPolicy | string | `"Always"` | The pull policy for the tests image. |
|
||||
| metrics-server | object | `{"enabled":false}` | configuration options for the [metrics server Helm chart](https://github.com/kubernetes-sigs/metrics-server/tree/master/charts/metrics-server). See the projects [README.md](https://github.com/kubernetes-sigs/metrics-server/tree/master/charts/metrics-server#configuration) for all available options |
|
||||
| metrics-server.enabled | bool | `false` | Whether or not the metrics server Helm chart should be installed |
|
||||
@@ -0,0 +1,101 @@
|
||||
# VPA
|
||||
|
||||
A chart to install the [Kubernetes Vertical Pod Autoscaler](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler)
|
||||
|
||||
This chart is mostly based on the manifests and various scripts in the `deploy` and `hack` directories of the VPA repository.
|
||||
|
||||
## Tests and Debugging
|
||||
|
||||
There are a few tests included with this chart that can help debug why your installation of VPA isn't working as expected. You can run `helm test -n <Release Namespace> <Release Name>` to run them.
|
||||
|
||||
* `crds-available` - Checks for both the _verticalpodautoscalers_ and _verticalpodautoscalercheckpoints_ CRDs
|
||||
* `metrics-api-available` - Checks to make sure that the metrics API endpoint is available. If it's not, install [metrics-server](https://github.com/kubernetes-sigs/metrics-server) in your cluster.
|
||||
* `create-vpa` - A simple check to make sure that VPA objects can be created in your cluster. Does not check for functionality of that VPA.
|
||||
+ `webhook-configuration` - Checks that both the service and the CA bundle in the MutatingWebhookconfiguration are configured correctly.
|
||||
|
||||
## Components
|
||||
|
||||
There are three primary components to the Vertical Pod Autoscaler that can be enabled individually here.
|
||||
|
||||
* recommender
|
||||
* updater
|
||||
* admissionController
|
||||
|
||||
The admissionController is the only one that poses a stability consideration because it will create a `MutatingWebhookconfiguration` in your cluster. This _could_ cause the cluster to stop accepting pod creation requests, if it is not configured correctly. Because of this, the `MutatingWebhookconfiguration` has its `failurePolicy` set to `Ignore` by default.
|
||||
|
||||
For more details, please see the values below, and the vertical pod autosclaer documentation.
|
||||
|
||||
## *BREAKING* Upgrading from <= v1.7.x to 2.0.0
|
||||
|
||||
### Certificate generation
|
||||
|
||||
The certificate creation process was changed from using OpenSSL to [kube-webhook-certgen](https://github.com/kubernetes/ingress-nginx/tree/main/images/kube-webhook-certgen) to simplify the process.
|
||||
It still uses the same configuration keys (.Values.admissionController.certGen), which makes it impossible to reuse the values from a previous install.
|
||||
|
||||
You can mitigate this change by setting the correct image for the upgrade:
|
||||
|
||||
```bash
|
||||
helm upgrade <release name> fairwinds-stable/vpa --version 2.0.0 --reuse-values \
|
||||
--set "admissionController.certGen.image.repository=registry.k8s.io/ingress-nginx/kube-webhook-certgen" \
|
||||
--set "admissionController.certGen.image.tag=v20230312-helm-chart-4.5.2-28-g66a760794"
|
||||
```
|
||||
|
||||
The new process is incompatible with the old secrets layout. To mitigate this, the secret was renamed to (by default) `<release name>-tls-certs` and can now also be customized.
|
||||
|
||||
All other changes are implemented in a non breaking fashion.
|
||||
|
||||
### MutatingWebhookconfiguration
|
||||
|
||||
Previously, the webhook creation was handled by the admission controller itself. This had the downside that Helm is not in control of the resource and therefore required the cleanupOnDelete job.
|
||||
|
||||
This version disables the *selfRegistration* by the admission controller and creates the MutatingWebhookconfiguration using Helm.
|
||||
|
||||
You can either:
|
||||
|
||||
* Migrate the MutatingWebhookconfiguration by:
|
||||
* adding the label `app.kubernetes.io/managed-by: Helm`
|
||||
* adding the annotation `meta.helm.sh/release-name: <release name>`
|
||||
* adding the annotation `meta.helm.sh/release-namespace: <release namespace>`
|
||||
|
||||
* delete the configuration and it will be recreated by Helm
|
||||
* or keep the configuration as it is and Helm will ignore it. Execute the tests, to make sure everything works.
|
||||
|
||||
Also, the `cleanupOnDelete` configuration is obsolete.
|
||||
|
||||
### Admission controller
|
||||
|
||||
The admission controller is enabled by default.
|
||||
|
||||
## *BREAKING* Upgrading from v0.x.x to v1.x.x
|
||||
|
||||
In the previous version, when the admissionController.cleanupOnDelete flag was set to true, MutatingWebhookconfiguration and the tls secret for the admission controller were removed. There was no chance to pass any image information to start remove process. Now, it could be passed custom image by version 1.0.0.
|
||||
|
||||
```yaml
|
||||
cleanupOnDelete:
|
||||
enabled: true
|
||||
image:
|
||||
repository: quay.io/reactiveops/ci-images
|
||||
tag: v11-alpine
|
||||
|
||||
```
|
||||
|
||||
## Installation
|
||||
|
||||
```bash
|
||||
helm repo add fairwinds-stable https://charts.fairwinds.com/stable
|
||||
helm install vpa fairwinds-stable/vpa --namespace vpa --create-namespace
|
||||
```
|
||||
|
||||
## Utilize Prometheus for History
|
||||
|
||||
In order to utilize prometheus for recommender history, you will need to pass some extra flags to the recommender. If you use prometheus operator installed in the `prometheus-operator` namespace, these values will do the trick.
|
||||
|
||||
```yaml
|
||||
recommender:
|
||||
extraArgs:
|
||||
prometheus-address: |
|
||||
http://prometheus-operator-prometheus.prometheus-operator.svc.cluster.local:9090
|
||||
storage: prometheus
|
||||
```
|
||||
|
||||
{{ template "chart.valuesSection" . }}
|
||||
@@ -0,0 +1,23 @@
|
||||
# Patterns to ignore when building packages.
|
||||
# This supports shell glob matching, relative path matching, and
|
||||
# negation (prefixed with !). Only one pattern per line.
|
||||
.DS_Store
|
||||
# Common VCS dirs
|
||||
.git/
|
||||
.gitignore
|
||||
.bzr/
|
||||
.bzrignore
|
||||
.hg/
|
||||
.hgignore
|
||||
.svn/
|
||||
# Common backup files
|
||||
*.swp
|
||||
*.bak
|
||||
*.tmp
|
||||
*.orig
|
||||
*~
|
||||
# Various IDEs
|
||||
.project
|
||||
.idea/
|
||||
*.tmproj
|
||||
.vscode/
|
||||
@@ -0,0 +1,32 @@
|
||||
annotations:
|
||||
artifacthub.io/changes: |
|
||||
- kind: fixed
|
||||
description: "Fixed auth-reader role binding namespace to always use kube-system."
|
||||
- kind: fixed
|
||||
description: "Fixed addon resizer configuration."
|
||||
- kind: added
|
||||
description: "Added support for running under PodSecurity restricted."
|
||||
- kind: fixed
|
||||
description: "Fixed container port default not having been updated to 10250."
|
||||
apiVersion: v2
|
||||
appVersion: 0.6.3
|
||||
description: Metrics Server is a scalable, efficient source of container resource
|
||||
metrics for Kubernetes built-in autoscaling pipelines.
|
||||
home: https://github.com/kubernetes-sigs/metrics-server
|
||||
icon: https://avatars.githubusercontent.com/u/36015203?s=400&v=4
|
||||
keywords:
|
||||
- kubernetes
|
||||
- metrics-server
|
||||
- metrics
|
||||
maintainers:
|
||||
- name: stevehipwell
|
||||
url: https://github.com/stevehipwell
|
||||
- name: krmichel
|
||||
url: https://github.com/krmichel
|
||||
- name: endrec
|
||||
url: https://github.com/endrec
|
||||
name: metrics-server
|
||||
sources:
|
||||
- https://github.com/kubernetes-sigs/metrics-server
|
||||
type: application
|
||||
version: 3.10.0
|
||||
@@ -0,0 +1,90 @@
|
||||
# Kubernetes Metrics Server
|
||||
|
||||
[Metrics Server](https://github.com/kubernetes-sigs/metrics-server/) is a scalable, efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
|
||||
|
||||
<!-- Trigger release -->
|
||||
|
||||
## Installing the Chart
|
||||
|
||||
Before you can install the chart you will need to add the `metrics-server` repo to [Helm](https://helm.sh/).
|
||||
|
||||
```shell
|
||||
helm repo add metrics-server https://kubernetes-sigs.github.io/metrics-server/
|
||||
```
|
||||
|
||||
After you've installed the repo you can install the chart.
|
||||
|
||||
```shell
|
||||
helm upgrade --install metrics-server metrics-server/metrics-server
|
||||
```
|
||||
|
||||
## Configuration
|
||||
|
||||
The following table lists the configurable parameters of the _Metrics Server_ chart and their default values.
|
||||
|
||||
| Parameter | Description | Default |
|
||||
| ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------ |
|
||||
| `image.repository` | Image repository. | `registry.k8s.io/metrics-server/metrics-server` |
|
||||
| `image.tag` | Image tag, will override the default tag derived from the chart app version. | `""` |
|
||||
| `image.pullPolicy` | Image pull policy. | `IfNotPresent` |
|
||||
| `imagePullSecrets` | Image pull secrets. | `[]` |
|
||||
| `nameOverride` | Override the `name` of the chart. | `nil` |
|
||||
| `fullnameOverride` | Override the `fullname` of the chart. | `nil` |
|
||||
| `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. | `{}` |
|
||||
| `securityContext` | Security context for the _metrics-server_ container. | _See values.yaml_ |
|
||||
| `priorityClassName` | Priority class name to use. | `system-cluster-critical` |
|
||||
| `containerPort` | port for the _metrics-server_ container. | `10250` |
|
||||
| `hostNetwork.enabled` | If `true`, start _metric-server_ in hostNetwork mode. You would require this enabled if you use alternate overlay networking for pods and API server unable to communicate with metrics-server. As an example, this is required if you use Weave network on EKS. | `false` |
|
||||
| `replicas` | Number of replicas to run. | `1` |
|
||||
| `updateStrategy` | Customise the default update strategy. | `{}` |
|
||||
| `podDisruptionBudget.enabled` | If `true`, create `PodDisruptionBudget` resource. | `{}` |
|
||||
| `podDisruptionBudget.minAvailable` | Set the `PodDisruptionBugdet` minimum available pods. | `nil` |
|
||||
| `podDisruptionBudget.maxUnavailable` | Set the `PodDisruptionBugdet` maximum unavailable pods. | `nil` |
|
||||
| `defaultArgs` | Default arguments to pass to the _metrics-server_ command. | See _values.yaml_ |
|
||||
| `args` | Additional arguments to pass to the _metrics-server_ command. | `[]` |
|
||||
| `livenessProbe` | Liveness probe. | See _values.yaml_ |
|
||||
| `readinessProbe` | Readiness probe. | See _values.yaml_ |
|
||||
| `service.type` | Service type. | `ClusterIP` |
|
||||
| `service.port` | Service port. | `443` |
|
||||
| `service.annotations` | Annotations to add to the service. | `{}` |
|
||||
| `service.labels` | Labels to add to the service. | `{}` |
|
||||
| `addonResizer.enabled` | If `true`, run the addon-resizer as a sidecar to automatically scale resource requests with cluster size. | `false` |
|
||||
| `addonResizer.image.repository` | addon-resizer image repository | registry.k8s.io/autoscaling/addon-resizer |
|
||||
| `addonResizer.image.tag` | addon-resizer image tag | 1.8.14 |
|
||||
| `addonResizer.resources` | Resource requests and limits for the _nanny_ container. | `{limits: {cpu: 40m, memory: 25Mi}, requests: {cpu: 40m, memory: 25Mi}}` |
|
||||
| `addonResizer.nanny.cpu` | The base CPU requirement. | 20m |
|
||||
| `addonResizer.nanny.extraCPU` | The amount of CPU to add per node. | 1m |
|
||||
| `addonResizer.nanny.extraMemory` | The amount of memory to add per node. | 2Mi |
|
||||
| `addonResizer.nanny.memory` | The base memory requirement. | 15Mi |
|
||||
| `addonResizer.nanny.minClusterSize` | Specifies the smallest number of nodes resources will be scaled to. | 10 |
|
||||
| `addonResizer.nanny.pollPeriod` | The time, in milliseconds, to poll the dependent container. | 300000 |
|
||||
| `addonResizer.nanny.threshold` | A number between 0-100. The dependent's resources are rewritten when they deviate from expected by more than threshold. | 5 |
|
||||
| `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. 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. | `""` |
|
||||
@@ -0,0 +1,2 @@
|
||||
args:
|
||||
- --kubelet-insecure-tls
|
||||
@@ -0,0 +1,7 @@
|
||||
***********************************************************************
|
||||
* Metrics Server *
|
||||
***********************************************************************
|
||||
Chart version: {{ .Chart.Version }}
|
||||
App version: {{ .Chart.AppVersion }}
|
||||
Image tag: {{ include "metrics-server.image" . }}
|
||||
***********************************************************************
|
||||
@@ -0,0 +1,102 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "metrics-server.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "metrics-server.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "metrics-server.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "metrics-server.labels" -}}
|
||||
helm.sh/chart: {{ include "metrics-server.chart" . }}
|
||||
{{ include "metrics-server.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if .Values.commonLabels }}
|
||||
{{ toYaml .Values.commonLabels }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "metrics-server.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "metrics-server.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "metrics-server.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "metrics-server.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
The image to use
|
||||
*/}}
|
||||
{{- define "metrics-server.image" -}}
|
||||
{{- printf "%s:%s" .Values.image.repository (default (printf "v%s" .Chart.AppVersion) .Values.image.tag) }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
The image to use for the addon resizer
|
||||
*/}}
|
||||
{{- define "metrics-server.addonResizer.image" -}}
|
||||
{{- printf "%s:%s" .Values.addonResizer.image.repository .Values.addonResizer.image.tag }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
ConfigMap name of addon resizer
|
||||
*/}}
|
||||
{{- define "metrics-server.addonResizer.configMap" -}}
|
||||
{{- printf "%s-%s" (include "metrics-server.fullname" .) "nanny-config" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Role name of addon resizer
|
||||
*/}}
|
||||
{{- define "metrics-server.addonResizer.role" -}}
|
||||
{{ printf "system:%s-nanny" (include "metrics-server.fullname" .) }}
|
||||
{{- end }}
|
||||
|
||||
{{/* Get PodDisruptionBudget API Version */}}
|
||||
{{- define "metrics-server.pdb.apiVersion" -}}
|
||||
{{- if and (.Capabilities.APIVersions.Has "policy/v1") (semverCompare ">= 1.21-0" .Capabilities.KubeVersion.Version) -}}
|
||||
{{- print "policy/v1" -}}
|
||||
{{- else -}}
|
||||
{{- print "policy/v1beta1" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,25 @@
|
||||
{{- if .Values.apiService.create -}}
|
||||
apiVersion: apiregistration.k8s.io/v1
|
||||
kind: APIService
|
||||
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: {{ .Values.apiService.insecureSkipTLSVerify }}
|
||||
service:
|
||||
name: {{ include "metrics-server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
port: {{ .Values.service.port }}
|
||||
version: v1beta1
|
||||
versionPriority: 100
|
||||
{{- end -}}
|
||||
+21
@@ -0,0 +1,21 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ printf "system:%s-aggregated-reader" (include "metrics-server.name" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
rbac.authorization.k8s.io/aggregate-to-admin: "true"
|
||||
rbac.authorization.k8s.io/aggregate-to-edit: "true"
|
||||
rbac.authorization.k8s.io/aggregate-to-view: "true"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- metrics.k8s.io
|
||||
resources:
|
||||
- pods
|
||||
- nodes
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- if and .Values.rbac.create .Values.addonResizer.enabled -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ printf "system:%s-nanny" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- nonResourceURLs:
|
||||
- /metrics
|
||||
verbs:
|
||||
- get
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,37 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ printf "system:%s" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- nodes/metrics
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- nodes
|
||||
- namespaces
|
||||
- configmaps
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
- apiGroups:
|
||||
- extensions
|
||||
- policy
|
||||
resources:
|
||||
- podsecuritypolicies
|
||||
resourceNames:
|
||||
- {{ printf "privileged-%s" (include "metrics-server.fullname" .) }}
|
||||
verbs:
|
||||
- use
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s:system:auth-delegator" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:auth-delegator
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,18 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
{{- if .Values.addonResizer.enabled -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ printf "system:%s-nanny" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:{{ template "metrics-server.fullname" . }}-nanny
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,16 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ printf "system:%s" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: system:{{ template "metrics-server.fullname" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.addonResizer.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ include "metrics-server.addonResizer.configMap" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
data:
|
||||
NannyConfiguration: |-
|
||||
apiVersion: nannyconfig/v1alpha1
|
||||
kind: NannyConfiguration
|
||||
baseCPU: {{ .Values.addonResizer.nanny.cpu }}
|
||||
cpuPerNode: {{ .Values.addonResizer.nanny.extraCpu }}
|
||||
baseMemory: {{ .Values.addonResizer.nanny.memory }}
|
||||
memoryPerNode: {{ .Values.addonResizer.nanny.extraMemory }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,147 @@
|
||||
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 }}
|
||||
strategy:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 8 }}
|
||||
{{- with .Values.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
schedulerName: {{ .Values.schedulerName }}
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "metrics-server.serviceAccountName" . }}
|
||||
{{- with .Values.podSecurityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . | quote }}
|
||||
{{- end }}
|
||||
{{- if .Values.hostNetwork.enabled }}
|
||||
hostNetwork: true
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: metrics-server
|
||||
{{- with .Values.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
image: {{ include "metrics-server.image" . }}
|
||||
imagePullPolicy: {{ .Values.image.pullPolicy }}
|
||||
args:
|
||||
- {{ printf "--secure-port=%d" (int .Values.containerPort) }}
|
||||
{{- range .Values.defaultArgs }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
{{- if .Values.metrics.enabled }}
|
||||
- --authorization-always-allow-paths=/metrics
|
||||
{{- end }}
|
||||
{{- range .Values.args }}
|
||||
- {{ . }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: https
|
||||
protocol: TCP
|
||||
containerPort: {{ .Values.containerPort }}
|
||||
{{- with .Values.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: tmp
|
||||
mountPath: /tmp
|
||||
{{- with .Values.extraVolumeMounts }}
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- with .Values.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.addonResizer.enabled }}
|
||||
- name: metrics-server-nanny
|
||||
image: {{ include "metrics-server.addonResizer.image" . }}
|
||||
env:
|
||||
- name: MY_POD_NAME
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.name
|
||||
- name: MY_POD_NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
command:
|
||||
- /pod_nanny
|
||||
- --config-dir=/etc/config
|
||||
- --deployment={{ include "metrics-server.fullname" . }}
|
||||
- --threshold={{ .Values.addonResizer.nanny.threshold }}
|
||||
- --deployment={{ include "metrics-server.fullname" . }}
|
||||
- --container=metrics-server
|
||||
- --poll-period={{ .Values.addonResizer.nanny.pollPeriod }}
|
||||
- --estimator=exponential
|
||||
- --minClusterSize={{ .Values.addonResizer.nanny.minClusterSize }}
|
||||
- --use-metrics=true
|
||||
volumeMounts:
|
||||
- name: nanny-config-volume
|
||||
mountPath: /etc/config
|
||||
{{- with .Values.addonResizer.resources }}
|
||||
resources:
|
||||
{{- toYaml . | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumes:
|
||||
- name: tmp
|
||||
emptyDir: {}
|
||||
{{- if .Values.addonResizer.enabled }}
|
||||
- name: nanny-config-volume
|
||||
configMap:
|
||||
name: {{ include "metrics-server.addonResizer.configMap" . }}
|
||||
{{- end }}
|
||||
{{- with .Values.extraVolumes }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.topologySpreadConstraints }}
|
||||
topologySpreadConstraints:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.podDisruptionBudget.enabled -}}
|
||||
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:
|
||||
{{- if .Values.podDisruptionBudget.minAvailable }}
|
||||
minAvailable: {{ .Values.podDisruptionBudget.minAvailable }}
|
||||
{{- end }}
|
||||
{{- if .Values.podDisruptionBudget.maxUnavailable }}
|
||||
maxUnavailable: {{ .Values.podDisruptionBudget.maxUnavailable }}
|
||||
{{- end }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.rbac.pspEnabled }}
|
||||
apiVersion: policy/v1beta1
|
||||
kind: PodSecurityPolicy
|
||||
metadata:
|
||||
name: {{ printf "privileged-%s" (include "metrics-server.fullname" .) }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
spec:
|
||||
allowedCapabilities:
|
||||
- '*'
|
||||
fsGroup:
|
||||
rule: RunAsAny
|
||||
privileged: true
|
||||
runAsUser:
|
||||
rule: RunAsAny
|
||||
seLinux:
|
||||
rule: RunAsAny
|
||||
supplementalGroups:
|
||||
rule: RunAsAny
|
||||
volumes:
|
||||
- '*'
|
||||
hostPID: true
|
||||
hostIPC: true
|
||||
hostNetwork: true
|
||||
hostPorts:
|
||||
- min: 1
|
||||
max: 65536
|
||||
{{- end }}
|
||||
@@ -0,0 +1,27 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
{{- if .Values.addonResizer.enabled -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "metrics-server.addonResizer.role" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- deployments
|
||||
resourceNames:
|
||||
- {{ include "metrics-server.fullname" . }}
|
||||
verbs:
|
||||
- get
|
||||
- patch
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,19 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
{{- if .Values.addonResizer.enabled -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s-nanny" (include "metrics-server.fullname" .) }}
|
||||
namespace: kube-system
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "metrics-server.addonResizer.role" . }}
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.rbac.create -}}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ printf "%s-auth-reader" (include "metrics-server.fullname" .) }}
|
||||
namespace: kube-system
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: extension-apiserver-authentication-reader
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "metrics-server.serviceAccountName" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,23 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "metrics-server.fullname" . }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
labels:
|
||||
{{- include "metrics-server.labels" . | nindent 4 }}
|
||||
{{- with .Values.service.labels -}}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.service.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
type: {{ .Values.service.type }}
|
||||
ports:
|
||||
- name: https
|
||||
port: {{ .Values.service.port }}
|
||||
protocol: TCP
|
||||
targetPort: https
|
||||
selector:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 4 }}
|
||||
@@ -0,0 +1,17 @@
|
||||
{{- if .Values.serviceAccount.create -}}
|
||||
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 }}
|
||||
{{- with .Values.serviceAccount.secrets }}
|
||||
secrets:
|
||||
{{- toYaml . | nindent 2 }}
|
||||
{{- end }}
|
||||
{{- end -}}
|
||||
@@ -0,0 +1,40 @@
|
||||
{{- if and .Values.serviceMonitor.enabled .Values.metrics.enabled -}}
|
||||
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 }}
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
jobLabel: {{ .Release.Name }}
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "metrics-server.selectorLabels" . | nindent 6 }}
|
||||
endpoints:
|
||||
- port: https
|
||||
path: /metrics
|
||||
scheme: https
|
||||
tlsConfig:
|
||||
insecureSkipVerify: true
|
||||
{{- with .Values.serviceMonitor.interval }}
|
||||
interval: {{ . }}
|
||||
{{- end }}
|
||||
{{- 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 -}}
|
||||
@@ -0,0 +1,176 @@
|
||||
# Default values for metrics-server.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
image:
|
||||
repository: registry.k8s.io/metrics-server/metrics-server
|
||||
# Overrides the image tag whose default is v{{ .Chart.AppVersion }}
|
||||
tag: ""
|
||||
pullPolicy: IfNotPresent
|
||||
|
||||
imagePullSecrets: []
|
||||
# - name: registrySecretName
|
||||
|
||||
nameOverride: ""
|
||||
fullnameOverride: ""
|
||||
|
||||
serviceAccount:
|
||||
# Specifies whether a service account should be created
|
||||
create: true
|
||||
# Annotations to add to the service account
|
||||
annotations: {}
|
||||
# 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
|
||||
create: true
|
||||
pspEnabled: false
|
||||
|
||||
apiService:
|
||||
# Specifies if the v1beta1.metrics.k8s.io API service should be created.
|
||||
#
|
||||
# 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.
|
||||
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: {}
|
||||
|
||||
podSecurityContext: {}
|
||||
|
||||
securityContext:
|
||||
allowPrivilegeEscalation: false
|
||||
readOnlyRootFilesystem: true
|
||||
runAsNonRoot: true
|
||||
runAsUser: 1000
|
||||
seccompProfile:
|
||||
type: RuntimeDefault
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
|
||||
priorityClassName: system-cluster-critical
|
||||
|
||||
containerPort: 10250
|
||||
|
||||
hostNetwork:
|
||||
# Specifies if metrics-server should be started in hostNetwork mode.
|
||||
#
|
||||
# You would require this enabled if you use alternate overlay networking for pods and
|
||||
# API server unable to communicate with metrics-server. As an example, this is required
|
||||
# if you use Weave network on EKS
|
||||
enabled: false
|
||||
|
||||
replicas: 1
|
||||
|
||||
updateStrategy: {}
|
||||
# type: RollingUpdate
|
||||
# rollingUpdate:
|
||||
# maxSurge: 0
|
||||
# maxUnavailable: 1
|
||||
|
||||
podDisruptionBudget:
|
||||
# https://kubernetes.io/docs/tasks/run-application/configure-pdb/
|
||||
enabled: false
|
||||
minAvailable:
|
||||
maxUnavailable:
|
||||
|
||||
defaultArgs:
|
||||
- --cert-dir=/tmp
|
||||
- --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
|
||||
- --kubelet-use-node-status-port
|
||||
- --metric-resolution=15s
|
||||
|
||||
args: []
|
||||
|
||||
livenessProbe:
|
||||
httpGet:
|
||||
path: /livez
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 0
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
|
||||
readinessProbe:
|
||||
httpGet:
|
||||
path: /readyz
|
||||
port: https
|
||||
scheme: HTTPS
|
||||
initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
failureThreshold: 3
|
||||
|
||||
service:
|
||||
type: ClusterIP
|
||||
port: 443
|
||||
annotations: {}
|
||||
labels: {}
|
||||
# Add these labels to have metrics-server show up in `kubectl cluster-info`
|
||||
# kubernetes.io/cluster-service: "true"
|
||||
# kubernetes.io/name: "Metrics-server"
|
||||
|
||||
addonResizer:
|
||||
enabled: false
|
||||
image:
|
||||
repository: registry.k8s.io/autoscaling/addon-resizer
|
||||
tag: 1.8.14
|
||||
resources:
|
||||
limits:
|
||||
cpu: 40m
|
||||
memory: 25Mi
|
||||
requests:
|
||||
cpu: 40m
|
||||
memory: 25Mi
|
||||
nanny:
|
||||
cpu: 20m
|
||||
extraCpu: 1m
|
||||
extraMemory: 2Mi
|
||||
memory: 15Mi
|
||||
minClusterSize: 10
|
||||
pollPeriod: 300000
|
||||
threshold: 5
|
||||
|
||||
metrics:
|
||||
enabled: false
|
||||
|
||||
serviceMonitor:
|
||||
enabled: false
|
||||
additionalLabels: {}
|
||||
interval: 1m
|
||||
scrapeTimeout: 10s
|
||||
metricRelabelings: []
|
||||
relabelings: []
|
||||
|
||||
# See https://github.com/kubernetes-sigs/metrics-server#scaling
|
||||
resources: {}
|
||||
|
||||
extraVolumeMounts: []
|
||||
|
||||
extraVolumes: []
|
||||
|
||||
nodeSelector: {}
|
||||
|
||||
tolerations: []
|
||||
|
||||
affinity: {}
|
||||
|
||||
topologySpreadConstraints: []
|
||||
|
||||
# Annotations to add to the deployment
|
||||
deploymentAnnotations: {}
|
||||
|
||||
schedulerName: ""
|
||||
@@ -0,0 +1,30 @@
|
||||
recommender:
|
||||
enabled: true
|
||||
podLabels:
|
||||
app: test
|
||||
foo: bar
|
||||
updater:
|
||||
enabled: true
|
||||
podLabels:
|
||||
app: test
|
||||
foo: bar
|
||||
admissionController:
|
||||
enabled: true
|
||||
extraArgs:
|
||||
v: "4"
|
||||
generateCertificate: true
|
||||
certGen:
|
||||
env:
|
||||
ENVIRONMENTVARIABLE: exists
|
||||
podLabels:
|
||||
app: test
|
||||
foo: bar
|
||||
podLabels:
|
||||
app: test
|
||||
foo: bar
|
||||
metrics-server:
|
||||
enabled: true
|
||||
apiService:
|
||||
insecureSkipTLSVerify: true
|
||||
args:
|
||||
- "--kubelet-insecure-tls"
|
||||
@@ -0,0 +1,758 @@
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes/kubernetes/pull/63797
|
||||
controller-gen.kubebuilder.io/version: v0.4.0
|
||||
creationTimestamp: null
|
||||
name: verticalpodautoscalers.autoscaling.k8s.io
|
||||
spec:
|
||||
group: autoscaling.k8s.io
|
||||
names:
|
||||
kind: VerticalPodAutoscaler
|
||||
listKind: VerticalPodAutoscalerList
|
||||
plural: verticalpodautoscalers
|
||||
shortNames:
|
||||
- vpa
|
||||
singular: verticalpodautoscaler
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- additionalPrinterColumns:
|
||||
- jsonPath: .spec.updatePolicy.updateMode
|
||||
name: Mode
|
||||
type: string
|
||||
- jsonPath: .status.recommendation.containerRecommendations[0].target.cpu
|
||||
name: CPU
|
||||
type: string
|
||||
- jsonPath: .status.recommendation.containerRecommendations[0].target.memory
|
||||
name: Mem
|
||||
type: string
|
||||
- jsonPath: .status.conditions[?(@.type=='RecommendationProvided')].status
|
||||
name: Provided
|
||||
type: string
|
||||
- jsonPath: .metadata.creationTimestamp
|
||||
name: Age
|
||||
type: date
|
||||
name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VerticalPodAutoscaler is the configuration for a vertical pod
|
||||
autoscaler, which automatically manages pod resources based on historical
|
||||
and real time resource utilization.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: 'Specification of the behavior of the autoscaler. More info:
|
||||
https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.'
|
||||
properties:
|
||||
recommenders:
|
||||
description: Recommender responsible for generating recommendation
|
||||
for this object. List should be empty (then the default recommender
|
||||
will generate the recommendation) or contain exactly one recommender.
|
||||
items:
|
||||
description: VerticalPodAutoscalerRecommenderSelector points to
|
||||
a specific Vertical Pod Autoscaler recommender. In the future
|
||||
it might pass parameters to the recommender.
|
||||
properties:
|
||||
name:
|
||||
description: Name of the recommender responsible for generating
|
||||
recommendation for this object.
|
||||
type: string
|
||||
required:
|
||||
- name
|
||||
type: object
|
||||
type: array
|
||||
resourcePolicy:
|
||||
description: Controls how the autoscaler computes recommended resources.
|
||||
The resource policy may be used to set constraints on the recommendations
|
||||
for individual containers. If not specified, the autoscaler computes
|
||||
recommended resources for all containers in the pod, without additional
|
||||
constraints.
|
||||
properties:
|
||||
containerPolicies:
|
||||
description: Per-container resource policies.
|
||||
items:
|
||||
description: ContainerResourcePolicy controls how autoscaler
|
||||
computes the recommended resources for a specific container.
|
||||
properties:
|
||||
containerName:
|
||||
description: Name of the container or DefaultContainerResourcePolicy,
|
||||
in which case the policy is used by the containers that
|
||||
don't have their own policy specified.
|
||||
type: string
|
||||
controlledResources:
|
||||
description: Specifies the type of recommendations that
|
||||
will be computed (and possibly applied) by VPA. If not
|
||||
specified, the default of [ResourceCPU, ResourceMemory]
|
||||
will be used.
|
||||
items:
|
||||
description: ResourceName is the name identifying various
|
||||
resources in a ResourceList.
|
||||
type: string
|
||||
type: array
|
||||
controlledValues:
|
||||
description: Specifies which resource values should be controlled.
|
||||
The default is "RequestsAndLimits".
|
||||
enum:
|
||||
- RequestsAndLimits
|
||||
- RequestsOnly
|
||||
type: string
|
||||
maxAllowed:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Specifies the maximum amount of resources that
|
||||
will be recommended for the container. The default is
|
||||
no maximum.
|
||||
type: object
|
||||
minAllowed:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Specifies the minimal amount of resources that
|
||||
will be recommended for the container. The default is
|
||||
no minimum.
|
||||
type: object
|
||||
mode:
|
||||
description: Whether autoscaler is enabled for the container.
|
||||
The default is "Auto".
|
||||
enum:
|
||||
- Auto
|
||||
- "Off"
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
targetRef:
|
||||
description: TargetRef points to the controller managing the set of
|
||||
pods for the autoscaler to control - e.g. Deployment, StatefulSet.
|
||||
VerticalPodAutoscaler can be targeted at controller implementing
|
||||
scale subresource (the pod set is retrieved from the controller's
|
||||
ScaleStatus) or some well known controllers (e.g. for DaemonSet
|
||||
the pod set is read from the controller's spec). If VerticalPodAutoscaler
|
||||
cannot use specified target it will report ConfigUnsupported condition.
|
||||
Note that VerticalPodAutoscaler does not require full implementation
|
||||
of scale subresource - it will not use it to modify the replica
|
||||
count. The only thing retrieved is a label selector matching pods
|
||||
grouped by the target resource.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
updatePolicy:
|
||||
description: Describes the rules on how changes are applied to the
|
||||
pods. If not specified, all fields in the `PodUpdatePolicy` are
|
||||
set to their default values.
|
||||
properties:
|
||||
minReplicas:
|
||||
description: Minimal number of replicas which need to be alive
|
||||
for Updater to attempt pod eviction (pending other checks like
|
||||
PDB). Only positive values are allowed. Overrides global '--min-replicas'
|
||||
flag.
|
||||
format: int32
|
||||
type: integer
|
||||
updateMode:
|
||||
description: Controls when autoscaler applies changes to the pod
|
||||
resources. The default is 'Auto'.
|
||||
enum:
|
||||
- "Off"
|
||||
- Initial
|
||||
- Recreate
|
||||
- Auto
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- targetRef
|
||||
type: object
|
||||
status:
|
||||
description: Current information about the autoscaler.
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions is the set of conditions required for this
|
||||
autoscaler to scale its target, and indicates whether or not those
|
||||
conditions are met.
|
||||
items:
|
||||
description: VerticalPodAutoscalerCondition describes the state
|
||||
of a VerticalPodAutoscaler at a certain point.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human-readable explanation containing
|
||||
details about the transition
|
||||
type: string
|
||||
reason:
|
||||
description: reason is the reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: status is the status of the condition (True, False,
|
||||
Unknown)
|
||||
type: string
|
||||
type:
|
||||
description: type describes the current condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
recommendation:
|
||||
description: The most recently computed amount of resources recommended
|
||||
by the autoscaler for the controlled pods.
|
||||
properties:
|
||||
containerRecommendations:
|
||||
description: Resources recommended by the autoscaler for each
|
||||
container.
|
||||
items:
|
||||
description: RecommendedContainerResources is the recommendation
|
||||
of resources computed by autoscaler for a specific container.
|
||||
Respects the container resource policy if present in the spec.
|
||||
In particular the recommendation is not produced for containers
|
||||
with `ContainerScalingMode` set to 'Off'.
|
||||
properties:
|
||||
containerName:
|
||||
description: Name of the container.
|
||||
type: string
|
||||
lowerBound:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Minimum recommended amount of resources. Observes
|
||||
ContainerResourcePolicy. This amount is not guaranteed
|
||||
to be sufficient for the application to operate in a stable
|
||||
way, however running with less resources is likely to
|
||||
have significant impact on performance/availability.
|
||||
type: object
|
||||
target:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Recommended amount of resources. Observes ContainerResourcePolicy.
|
||||
type: object
|
||||
uncappedTarget:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: The most recent recommended resources target
|
||||
computed by the autoscaler for the controlled pods, based
|
||||
only on actual resource usage, not taking into account
|
||||
the ContainerResourcePolicy. May differ from the Recommendation
|
||||
if the actual resource usage causes the target to violate
|
||||
the ContainerResourcePolicy (lower than MinAllowed or
|
||||
higher that MaxAllowed). Used only as status indication,
|
||||
will not affect actual resource assignment.
|
||||
type: object
|
||||
upperBound:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Maximum recommended amount of resources. Observes
|
||||
ContainerResourcePolicy. Any resources allocated beyond
|
||||
this value are likely wasted. This value may be larger
|
||||
than the maximum amount of application is actually capable
|
||||
of consuming.
|
||||
type: object
|
||||
required:
|
||||
- target
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
subresources: {}
|
||||
- name: v1beta2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VerticalPodAutoscaler is the configuration for a vertical pod
|
||||
autoscaler, which automatically manages pod resources based on historical
|
||||
and real time resource utilization.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: 'Specification of the behavior of the autoscaler. More info:
|
||||
https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.'
|
||||
properties:
|
||||
resourcePolicy:
|
||||
description: Controls how the autoscaler computes recommended resources.
|
||||
The resource policy may be used to set constraints on the recommendations
|
||||
for individual containers. If not specified, the autoscaler computes
|
||||
recommended resources for all containers in the pod, without additional
|
||||
constraints.
|
||||
properties:
|
||||
containerPolicies:
|
||||
description: Per-container resource policies.
|
||||
items:
|
||||
description: ContainerResourcePolicy controls how autoscaler
|
||||
computes the recommended resources for a specific container.
|
||||
properties:
|
||||
containerName:
|
||||
description: Name of the container or DefaultContainerResourcePolicy,
|
||||
in which case the policy is used by the containers that
|
||||
don't have their own policy specified.
|
||||
type: string
|
||||
maxAllowed:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Specifies the maximum amount of resources that
|
||||
will be recommended for the container. The default is
|
||||
no maximum.
|
||||
type: object
|
||||
minAllowed:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Specifies the minimal amount of resources that
|
||||
will be recommended for the container. The default is
|
||||
no minimum.
|
||||
type: object
|
||||
mode:
|
||||
description: Whether autoscaler is enabled for the container.
|
||||
The default is "Auto".
|
||||
enum:
|
||||
- Auto
|
||||
- "Off"
|
||||
type: string
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
targetRef:
|
||||
description: TargetRef points to the controller managing the set of
|
||||
pods for the autoscaler to control - e.g. Deployment, StatefulSet.
|
||||
VerticalPodAutoscaler can be targeted at controller implementing
|
||||
scale subresource (the pod set is retrieved from the controller's
|
||||
ScaleStatus) or some well known controllers (e.g. for DaemonSet
|
||||
the pod set is read from the controller's spec). If VerticalPodAutoscaler
|
||||
cannot use specified target it will report ConfigUnsupported condition.
|
||||
Note that VerticalPodAutoscaler does not require full implementation
|
||||
of scale subresource - it will not use it to modify the replica
|
||||
count. The only thing retrieved is a label selector matching pods
|
||||
grouped by the target resource.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: API version of the referent
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind of the referent; More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds"'
|
||||
type: string
|
||||
name:
|
||||
description: 'Name of the referent; More info: http://kubernetes.io/docs/user-guide/identifiers#names'
|
||||
type: string
|
||||
required:
|
||||
- kind
|
||||
- name
|
||||
type: object
|
||||
updatePolicy:
|
||||
description: Describes the rules on how changes are applied to the
|
||||
pods. If not specified, all fields in the `PodUpdatePolicy` are
|
||||
set to their default values.
|
||||
properties:
|
||||
updateMode:
|
||||
description: Controls when autoscaler applies changes to the pod
|
||||
resources. The default is 'Auto'.
|
||||
enum:
|
||||
- "Off"
|
||||
- Initial
|
||||
- Recreate
|
||||
- Auto
|
||||
type: string
|
||||
type: object
|
||||
required:
|
||||
- targetRef
|
||||
type: object
|
||||
status:
|
||||
description: Current information about the autoscaler.
|
||||
properties:
|
||||
conditions:
|
||||
description: Conditions is the set of conditions required for this
|
||||
autoscaler to scale its target, and indicates whether or not those
|
||||
conditions are met.
|
||||
items:
|
||||
description: VerticalPodAutoscalerCondition describes the state
|
||||
of a VerticalPodAutoscaler at a certain point.
|
||||
properties:
|
||||
lastTransitionTime:
|
||||
description: lastTransitionTime is the last time the condition
|
||||
transitioned from one status to another
|
||||
format: date-time
|
||||
type: string
|
||||
message:
|
||||
description: message is a human-readable explanation containing
|
||||
details about the transition
|
||||
type: string
|
||||
reason:
|
||||
description: reason is the reason for the condition's last transition.
|
||||
type: string
|
||||
status:
|
||||
description: status is the status of the condition (True, False,
|
||||
Unknown)
|
||||
type: string
|
||||
type:
|
||||
description: type describes the current condition
|
||||
type: string
|
||||
required:
|
||||
- status
|
||||
- type
|
||||
type: object
|
||||
type: array
|
||||
recommendation:
|
||||
description: The most recently computed amount of resources recommended
|
||||
by the autoscaler for the controlled pods.
|
||||
properties:
|
||||
containerRecommendations:
|
||||
description: Resources recommended by the autoscaler for each
|
||||
container.
|
||||
items:
|
||||
description: RecommendedContainerResources is the recommendation
|
||||
of resources computed by autoscaler for a specific container.
|
||||
Respects the container resource policy if present in the spec.
|
||||
In particular the recommendation is not produced for containers
|
||||
with `ContainerScalingMode` set to 'Off'.
|
||||
properties:
|
||||
containerName:
|
||||
description: Name of the container.
|
||||
type: string
|
||||
lowerBound:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Minimum recommended amount of resources. Observes
|
||||
ContainerResourcePolicy. This amount is not guaranteed
|
||||
to be sufficient for the application to operate in a stable
|
||||
way, however running with less resources is likely to
|
||||
have significant impact on performance/availability.
|
||||
type: object
|
||||
target:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Recommended amount of resources. Observes ContainerResourcePolicy.
|
||||
type: object
|
||||
uncappedTarget:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: The most recent recommended resources target
|
||||
computed by the autoscaler for the controlled pods, based
|
||||
only on actual resource usage, not taking into account
|
||||
the ContainerResourcePolicy. May differ from the Recommendation
|
||||
if the actual resource usage causes the target to violate
|
||||
the ContainerResourcePolicy (lower than MinAllowed or
|
||||
higher that MaxAllowed). Used only as status indication,
|
||||
will not affect actual resource assignment.
|
||||
type: object
|
||||
upperBound:
|
||||
additionalProperties:
|
||||
anyOf:
|
||||
- type: integer
|
||||
- type: string
|
||||
pattern: ^(\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))(([KMGTPE]i)|[numkMGTPE]|([eE](\+|-)?(([0-9]+(\.[0-9]*)?)|(\.[0-9]+))))?$
|
||||
x-kubernetes-int-or-string: true
|
||||
description: Maximum recommended amount of resources. Observes
|
||||
ContainerResourcePolicy. Any resources allocated beyond
|
||||
this value are likely wasted. This value may be larger
|
||||
than the maximum amount of application is actually capable
|
||||
of consuming.
|
||||
type: object
|
||||
required:
|
||||
- target
|
||||
type: object
|
||||
type: array
|
||||
type: object
|
||||
type: object
|
||||
required:
|
||||
- spec
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
---
|
||||
apiVersion: apiextensions.k8s.io/v1
|
||||
kind: CustomResourceDefinition
|
||||
metadata:
|
||||
annotations:
|
||||
api-approved.kubernetes.io: https://github.com/kubernetes/kubernetes/pull/63797
|
||||
controller-gen.kubebuilder.io/version: v0.4.0
|
||||
creationTimestamp: null
|
||||
name: verticalpodautoscalercheckpoints.autoscaling.k8s.io
|
||||
spec:
|
||||
group: autoscaling.k8s.io
|
||||
names:
|
||||
kind: VerticalPodAutoscalerCheckpoint
|
||||
listKind: VerticalPodAutoscalerCheckpointList
|
||||
plural: verticalpodautoscalercheckpoints
|
||||
shortNames:
|
||||
- vpacheckpoint
|
||||
singular: verticalpodautoscalercheckpoint
|
||||
scope: Namespaced
|
||||
versions:
|
||||
- name: v1
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VerticalPodAutoscalerCheckpoint is the checkpoint of the internal
|
||||
state of VPA that is used for recovery after recommender's restart.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: 'Specification of the checkpoint. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.'
|
||||
properties:
|
||||
containerName:
|
||||
description: Name of the checkpointed container.
|
||||
type: string
|
||||
vpaObjectName:
|
||||
description: Name of the VPA object that stored VerticalPodAutoscalerCheckpoint
|
||||
object.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: Data of the checkpoint.
|
||||
properties:
|
||||
cpuHistogram:
|
||||
description: Checkpoint of histogram for consumption of CPU.
|
||||
properties:
|
||||
bucketWeights:
|
||||
description: Map from bucket index to bucket weight.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
referenceTimestamp:
|
||||
description: Reference timestamp for samples collected within
|
||||
this histogram.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
totalWeight:
|
||||
description: Sum of samples to be used as denominator for weights
|
||||
from BucketWeights.
|
||||
type: number
|
||||
type: object
|
||||
firstSampleStart:
|
||||
description: Timestamp of the fist sample from the histograms.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
lastSampleStart:
|
||||
description: Timestamp of the last sample from the histograms.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: The time when the status was last refreshed.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
memoryHistogram:
|
||||
description: Checkpoint of histogram for consumption of memory.
|
||||
properties:
|
||||
bucketWeights:
|
||||
description: Map from bucket index to bucket weight.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
referenceTimestamp:
|
||||
description: Reference timestamp for samples collected within
|
||||
this histogram.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
totalWeight:
|
||||
description: Sum of samples to be used as denominator for weights
|
||||
from BucketWeights.
|
||||
type: number
|
||||
type: object
|
||||
totalSamplesCount:
|
||||
description: Total number of samples in the histograms.
|
||||
type: integer
|
||||
version:
|
||||
description: Version of the format of the stored data.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: true
|
||||
- name: v1beta2
|
||||
schema:
|
||||
openAPIV3Schema:
|
||||
description: VerticalPodAutoscalerCheckpoint is the checkpoint of the internal
|
||||
state of VPA that is used for recovery after recommender's restart.
|
||||
properties:
|
||||
apiVersion:
|
||||
description: 'APIVersion defines the versioned schema of this representation
|
||||
of an object. Servers should convert recognized schemas to the latest
|
||||
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
|
||||
type: string
|
||||
kind:
|
||||
description: 'Kind is a string value representing the REST resource this
|
||||
object represents. Servers may infer this from the endpoint the client
|
||||
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
|
||||
type: string
|
||||
metadata:
|
||||
type: object
|
||||
spec:
|
||||
description: 'Specification of the checkpoint. More info: https://git.k8s.io/community/contributors/devel/api-conventions.md#spec-and-status.'
|
||||
properties:
|
||||
containerName:
|
||||
description: Name of the checkpointed container.
|
||||
type: string
|
||||
vpaObjectName:
|
||||
description: Name of the VPA object that stored VerticalPodAutoscalerCheckpoint
|
||||
object.
|
||||
type: string
|
||||
type: object
|
||||
status:
|
||||
description: Data of the checkpoint.
|
||||
properties:
|
||||
cpuHistogram:
|
||||
description: Checkpoint of histogram for consumption of CPU.
|
||||
properties:
|
||||
bucketWeights:
|
||||
description: Map from bucket index to bucket weight.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
referenceTimestamp:
|
||||
description: Reference timestamp for samples collected within
|
||||
this histogram.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
totalWeight:
|
||||
description: Sum of samples to be used as denominator for weights
|
||||
from BucketWeights.
|
||||
type: number
|
||||
type: object
|
||||
firstSampleStart:
|
||||
description: Timestamp of the fist sample from the histograms.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
lastSampleStart:
|
||||
description: Timestamp of the last sample from the histograms.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
lastUpdateTime:
|
||||
description: The time when the status was last refreshed.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
memoryHistogram:
|
||||
description: Checkpoint of histogram for consumption of memory.
|
||||
properties:
|
||||
bucketWeights:
|
||||
description: Map from bucket index to bucket weight.
|
||||
type: object
|
||||
x-kubernetes-preserve-unknown-fields: true
|
||||
referenceTimestamp:
|
||||
description: Reference timestamp for samples collected within
|
||||
this histogram.
|
||||
format: date-time
|
||||
nullable: true
|
||||
type: string
|
||||
totalWeight:
|
||||
description: Sum of samples to be used as denominator for weights
|
||||
from BucketWeights.
|
||||
type: number
|
||||
type: object
|
||||
totalSamplesCount:
|
||||
description: Total number of samples in the histograms.
|
||||
type: integer
|
||||
version:
|
||||
description: Version of the format of the stored data.
|
||||
type: string
|
||||
type: object
|
||||
type: object
|
||||
served: true
|
||||
storage: false
|
||||
status:
|
||||
acceptedNames:
|
||||
kind: ""
|
||||
plural: ""
|
||||
conditions: []
|
||||
storedVersions: []
|
||||
@@ -0,0 +1,20 @@
|
||||
Congratulations on installing the Vertical Pod Autoscaler!
|
||||
|
||||
Components Installed:
|
||||
{{- if .Values.recommender.enabled }}
|
||||
- recommender
|
||||
{{- end }}
|
||||
{{- if .Values.updater.enabled }}
|
||||
- updater
|
||||
{{- end }}
|
||||
{{- if .Values.admissionController.enabled }}
|
||||
- admission-controller
|
||||
{{- end }}
|
||||
|
||||
To verify functionality, you can try running 'helm -n {{ .Release.Namespace}} test {{ .Release.Name }}'
|
||||
|
||||
{{- if not (include "vpa.webhook.upgradable" .) }}
|
||||
|
||||
Warning: The mutatingwebhookconfiguration '{{ include "vpa.fullname" . }}-webhook-config' is not managed by this Helm release.
|
||||
It is highly encouraged in this case, to verify the webhook's configuration by running all Helm tests.
|
||||
{{- end }}
|
||||
@@ -0,0 +1,65 @@
|
||||
{{/*
|
||||
Expand the name of the chart.
|
||||
*/}}
|
||||
{{- define "vpa.name" -}}
|
||||
{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create a default fully qualified app name.
|
||||
We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec).
|
||||
If release name contains chart name it will be used as a full name.
|
||||
*/}}
|
||||
{{- define "vpa.fullname" -}}
|
||||
{{- if .Values.fullnameOverride }}
|
||||
{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- $name := default .Chart.Name .Values.nameOverride }}
|
||||
{{- if contains $name .Release.Name }}
|
||||
{{- .Release.Name | trunc 63 | trimSuffix "-" }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create chart name and version as used by the chart label.
|
||||
*/}}
|
||||
{{- define "vpa.chart" -}}
|
||||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Common labels
|
||||
*/}}
|
||||
{{- define "vpa.labels" -}}
|
||||
helm.sh/chart: {{ include "vpa.chart" . }}
|
||||
{{ include "vpa.selectorLabels" . }}
|
||||
{{- if .Chart.AppVersion }}
|
||||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/managed-by: {{ .Release.Service }}
|
||||
{{- if .Values.podLabels }}
|
||||
{{ toYaml .Values.podLabels }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Selector labels
|
||||
*/}}
|
||||
{{- define "vpa.selectorLabels" -}}
|
||||
app.kubernetes.io/name: {{ include "vpa.name" . }}
|
||||
app.kubernetes.io/instance: {{ .Release.Name }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Create the name of the service account to use
|
||||
*/}}
|
||||
{{- define "vpa.serviceAccountName" -}}
|
||||
{{- if .Values.serviceAccount.create }}
|
||||
{{- default (include "vpa.fullname" .) .Values.serviceAccount.name }}
|
||||
{{- else }}
|
||||
{{- default "default" .Values.serviceAccount.name }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,103 @@
|
||||
{{- if .Values.admissionController.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-controller
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-controller
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.admissionController.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: admission-controller
|
||||
{{- include "vpa.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.admissionController.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- with .Values.admissionController.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: admission-controller
|
||||
{{- include "vpa.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "vpa.serviceAccountName" . }}-admission-controller
|
||||
securityContext:
|
||||
{{- toYaml .Values.admissionController.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.admissionController.securityContext | nindent 12 }}
|
||||
image: {{ printf "%s:%s" .Values.admissionController.image.repository (.Values.admissionController.image.tag | default .Chart.AppVersion) }}
|
||||
imagePullPolicy: {{ .Values.admissionController.image.pullPolicy }}
|
||||
args:
|
||||
- --register-webhook=false
|
||||
- --webhook-service={{ include "vpa.fullname" . }}-webhook
|
||||
{{- if .Values.admissionController.generateCertificate }}
|
||||
- --client-ca-file=/etc/tls-certs/ca
|
||||
- --tls-cert-file=/etc/tls-certs/cert
|
||||
- --tls-private-key=/etc/tls-certs/key
|
||||
{{- end }}
|
||||
{{- if .Values.admissionController.extraArgs }}
|
||||
{{- range $key, $value := .Values.admissionController.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
volumeMounts:
|
||||
- name: tls-certs
|
||||
mountPath: "/etc/tls-certs"
|
||||
readOnly: true
|
||||
{{- if .Values.admissionController.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.admissionController.livenessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.admissionController.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml .Values.admissionController.readinessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8000
|
||||
protocol: TCP
|
||||
- name: metrics
|
||||
containerPort: 8944
|
||||
protocol: TCP
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
resources:
|
||||
{{- toYaml .Values.admissionController.resources | nindent 12 }}
|
||||
volumes:
|
||||
- name: tls-certs
|
||||
secret:
|
||||
secretName: {{ include "vpa.webhook.secret" . }}
|
||||
{{- with .Values.admissionController.tlsSecretKeys }}
|
||||
items:
|
||||
{{- toYaml . | nindent 14 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
{{- if and .Values.admissionController.podDisruptionBudget (gt (int .Values.admissionController.replicaCount) 1) .Values.admissionController.enabled }}
|
||||
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "vpa.fullname" . }}-admission-controller-pdb"
|
||||
spec:
|
||||
{{- toYaml .Values.admissionController.podDisruptionBudget | nindent 2 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: admission-controller
|
||||
app.kubernetes.io/name: {{ template "vpa.fullname" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,67 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.rbac.create }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-admission-controller
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- configmaps
|
||||
- nodes
|
||||
- limitranges
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "admissionregistration.k8s.io"
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- create
|
||||
- delete
|
||||
- get
|
||||
- list
|
||||
- apiGroups:
|
||||
- "poc.autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- create
|
||||
- update
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-admission-controller
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-admission-controller
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-admission-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- if and .Values.serviceAccount.create .Values.admissionController.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
metadata:
|
||||
name: {{ include "vpa.serviceAccountName" . }}-admission-controller
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: admission-controller
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
{{- if .Values.admissionController.enabled }}
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-webhook
|
||||
spec:
|
||||
ports:
|
||||
- port: 443
|
||||
targetPort: 8000
|
||||
selector:
|
||||
app.kubernetes.io/component: admission-controller
|
||||
{{- include "vpa.selectorLabels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,112 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
|
||||
{{- if .Values.recommender.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-metrics-reader
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-metrics-reader
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-recommender
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-checkpoint-actor
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-checkpoint-actor
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-recommender
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.updater.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-evictionter-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-evictioner
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-updater
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-status-reader-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-status-reader
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-updater
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
|
||||
{{- if or .Values.recommender.enabled .Values.updater.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-actor
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-actor
|
||||
subjects:
|
||||
{{- if .Values.recommender.enabled }}
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-recommender
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.updater.enabled }}
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-updater
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- if coalesce .Values.recommender.enabled .Values.updater.enabled .Values.admissionController.enabled }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: vpa-target-reader-binding
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: vpa-target-reader
|
||||
subjects:
|
||||
{{- if .Values.recommender.enabled }}
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-recommender
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.admissionController.enabled}}
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-admission-controller
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- if .Values.updater.enabled }}
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.serviceAccountName" . }}-updater
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{- end }}
|
||||
@@ -0,0 +1,167 @@
|
||||
{{- if .Values.rbac.create }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-metrics-reader
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "metrics.k8s.io"
|
||||
resources:
|
||||
- pods
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-actor
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods
|
||||
- nodes
|
||||
- limitranges
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- events
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- apiGroups:
|
||||
- "poc.autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- patch
|
||||
- apiGroups:
|
||||
- "autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- patch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-checkpoint-actor
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "poc.autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalercheckpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- "autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalercheckpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- patch
|
||||
- delete
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- namespaces
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-evictioner
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "apps"
|
||||
- "extensions"
|
||||
resources:
|
||||
- replicasets
|
||||
verbs:
|
||||
- get
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- pods/eviction
|
||||
verbs:
|
||||
- create
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-target-reader
|
||||
rules:
|
||||
- apiGroups:
|
||||
- '*'
|
||||
resources:
|
||||
- '*/scale'
|
||||
verbs:
|
||||
- get
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- replicationcontrollers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- apps
|
||||
resources:
|
||||
- daemonsets
|
||||
- deployments
|
||||
- replicasets
|
||||
- statefulsets
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- batch
|
||||
resources:
|
||||
- jobs
|
||||
- cronjobs
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: vpa-status-reader
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "coordination.k8s.io"
|
||||
resources:
|
||||
- leases
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
{{- end }}
|
||||
@@ -0,0 +1,76 @@
|
||||
{{- if .Values.recommender.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-recommender
|
||||
labels:
|
||||
app.kubernetes.io/component: recommender
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.recommender.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: recommender
|
||||
{{- include "vpa.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.recommender.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- with .Values.recommender.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: recommender
|
||||
{{- include "vpa.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "vpa.serviceAccountName" . }}-recommender
|
||||
securityContext:
|
||||
{{- toYaml .Values.recommender.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.recommender.securityContext | nindent 12 }}
|
||||
image: {{ printf "%s:%s" .Values.recommender.image.repository (.Values.recommender.image.tag | default .Chart.AppVersion) }}
|
||||
imagePullPolicy: {{ .Values.recommender.image.pullPolicy }}
|
||||
{{- if .Values.recommender.extraArgs }}
|
||||
args:
|
||||
{{- range $key, $value := .Values.recommender.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
{{- if .Values.recommender.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.recommender.livenessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.recommender.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml .Values.recommender.readinessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8942
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.recommender.resources | nindent 12 }}
|
||||
{{- with .Values.recommender.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.recommender.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.recommender.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
{{- if and .Values.recommender.podDisruptionBudget (gt (int .Values.recommender.replicaCount) 1) .Values.recommender.enabled }}
|
||||
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "vpa.fullname" . }}-recommender-pdb"
|
||||
spec:
|
||||
{{- toYaml .Values.recommender.podDisruptionBudget | nindent 2 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: recommender
|
||||
app.kubernetes.io/name: {{ template "vpa.fullname" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.recommender.podMonitor }}
|
||||
{{- if and .Values.recommender.enabled .Values.recommender.podMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-recommender
|
||||
{{- with .Values.recommender.podMonitor.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.recommender.podMonitor.labels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
podMetricsEndpoints:
|
||||
- interval: 30s
|
||||
path: /metrics
|
||||
port: metrics
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: recommender
|
||||
{{- include "vpa.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- if and .Values.serviceAccount.create .Values.recommender.enabled -}}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
metadata:
|
||||
name: {{ include "vpa.serviceAccountName" . }}-recommender
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: recommender
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{/*
|
||||
Get kubectl image tag
|
||||
*/}}
|
||||
{{- define "vpa.test.tag" -}}
|
||||
{{- if .Values.tests.image }}
|
||||
{{- default (printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor) .Values.tests.image.tag }}
|
||||
{{- else }}
|
||||
{{- printf "%s.%s" .Capabilities.KubeVersion.Major .Capabilities.KubeVersion.Minor }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Get kubectl image name
|
||||
*/}}
|
||||
{{- define "vpa.test.image" -}}
|
||||
{{- if .Values.tests.image }}
|
||||
{{- printf "%s:%s" (default "bitnami/kubectl" .Values.tests.image.repository) (default (include "vpa.test.tag" . ) .Values.tests.image.tag) }}
|
||||
{{- else }}
|
||||
{{- printf "bitnami/kubectl:%s" (include "vpa.test.tag" . ) }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,30 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test-crds-available
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation"
|
||||
"helm.sh/hook-weight": "10"
|
||||
spec:
|
||||
serviceAccountName: {{ include "vpa.fullname" . }}-test
|
||||
containers:
|
||||
- name: test
|
||||
{{- if .Values.tests.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.tests.securityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
image: {{ include "vpa.test.image" . }}
|
||||
{{- if .Values.tests.image }}
|
||||
imagePullPolicy: {{ .Values.tests.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ['kubectl']
|
||||
args:
|
||||
- get
|
||||
- crd
|
||||
- verticalpodautoscalercheckpoints.autoscaling.k8s.io
|
||||
- verticalpodautoscalers.autoscaling.k8s.io
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,47 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test-create-vpa
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
|
||||
"helm.sh/hook-weight": "20"
|
||||
spec:
|
||||
serviceAccountName: {{ include "vpa.fullname" . }}-test
|
||||
containers:
|
||||
- name: test
|
||||
{{- if .Values.tests.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.tests.securityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
image: {{ include "vpa.test.image" . }}
|
||||
{{- if .Values.tests.image }}
|
||||
imagePullPolicy: {{ .Values.tests.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ['bash']
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
cat <<EOF | kubectl -n {{ .Release.Namespace }} apply -f -
|
||||
apiVersion: autoscaling.k8s.io/v1
|
||||
kind: VerticalPodAutoscaler
|
||||
metadata:
|
||||
name: test-vpa
|
||||
spec:
|
||||
targetRef:
|
||||
apiVersion: "apps/v1"
|
||||
kind: Deployment
|
||||
name: my-app
|
||||
updatePolicy:
|
||||
updateMode: "Off"
|
||||
EOF
|
||||
|
||||
kubectl -n {{ .Release.Namespace }} describe vpa test-vpa
|
||||
kubectl -n {{ .Release.Namespace }} delete vpa test-vpa
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,29 @@
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test-metrics-api-available
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
|
||||
"helm.sh/hook-weight": "40"
|
||||
spec:
|
||||
serviceAccountName: {{ include "vpa.fullname" . }}-test
|
||||
containers:
|
||||
- name: test
|
||||
{{- if .Values.tests.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.tests.securityContext | nindent 8 }}
|
||||
{{- end }}
|
||||
image: {{ include "vpa.test.image" . }}
|
||||
{{- if .Values.tests.image }}
|
||||
imagePullPolicy: {{ .Values.tests.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ['kubectl']
|
||||
args:
|
||||
- get
|
||||
- --raw
|
||||
- "/apis/metrics.k8s.io/v1beta1/nodes"
|
||||
restartPolicy: Never
|
||||
@@ -0,0 +1,122 @@
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
annotations:
|
||||
"helm.sh/hook": "test"
|
||||
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation,hook-failed"
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": "test"
|
||||
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation,hook-failed"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "metrics.k8s.io"
|
||||
resources:
|
||||
- "nodes"
|
||||
verbs:
|
||||
- list
|
||||
- apiGroups:
|
||||
- "apiextensions.k8s.io"
|
||||
resources:
|
||||
- customresourcedefinitions
|
||||
resourceNames:
|
||||
- verticalpodautoscalercheckpoints.autoscaling.k8s.io
|
||||
- verticalpodautoscalers.autoscaling.k8s.io
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- mutatingwebhookconfigurations
|
||||
resourceNames:
|
||||
- {{ include "vpa.fullname" . }}-webhook-config
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": "test"
|
||||
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation,hook-failed"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
namespace: {{ .Release.Namespace }}
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": "test"
|
||||
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation,hook-failed"
|
||||
rules:
|
||||
- apiGroups:
|
||||
- "autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalers
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- create
|
||||
- delete
|
||||
- apiGroups:
|
||||
- "autoscaling.k8s.io"
|
||||
resources:
|
||||
- verticalpodautoscalercheckpoints
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
- services
|
||||
resourceNames:
|
||||
- {{ include "vpa.fullname" . }}-webhook
|
||||
- {{ include "vpa.webhook.secret" . }}
|
||||
verbs:
|
||||
- get
|
||||
- list
|
||||
- watch
|
||||
---
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": "test"
|
||||
"helm.sh/hook-delete-policy": "hook-succeeded,before-hook-creation,hook-failed"
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.fullname" . }}-test
|
||||
namespace: {{ .Release.Namespace }}
|
||||
@@ -0,0 +1,75 @@
|
||||
{{- if .Values.admissionController.enabled }}
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Pod
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-test-webhook-configuration
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
annotations:
|
||||
"helm.sh/hook": test
|
||||
"helm.sh/hook-delete-policy": "before-hook-creation,hook-succeeded"
|
||||
"helm.sh/hook-weight": "30"
|
||||
spec:
|
||||
serviceAccountName: {{ include "vpa.fullname" . }}-test
|
||||
containers:
|
||||
- name: test
|
||||
{{- if .Values.tests.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.tests.securityContext | nindent 10 }}
|
||||
{{- end }}
|
||||
image: {{ include "vpa.test.image" . }}
|
||||
{{- if .Values.tests.image }}
|
||||
imagePullPolicy: {{ .Values.tests.image.pullPolicy }}
|
||||
{{- end }}
|
||||
command: ['bash']
|
||||
args:
|
||||
- -c
|
||||
- |
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
# Get service FQDN
|
||||
SERVICE=$(kubectl \
|
||||
get service \
|
||||
-n {{ .Release.Namespace }} \
|
||||
{{ include "vpa.fullname" . }}-webhook \
|
||||
-o=jsonpath="{.metadata.name}.{.metadata.namespace}.svc:{.spec.ports[0].port}")
|
||||
|
||||
# Get configured FQDN
|
||||
WEBHOOK_SERVICE=$(kubectl \
|
||||
get mutatingwebhookconfigurations.admissionregistration.k8s.io \
|
||||
{{ include "vpa.fullname" . }}-webhook-config \
|
||||
-o=jsonpath="{.webhooks[0].clientConfig.service.name}.{.webhooks[0].clientConfig.service.namespace}.svc:{.webhooks[0].clientConfig.service.port}")
|
||||
|
||||
# Get CA bundle
|
||||
SECRET_CABUNDLE=$(kubectl \
|
||||
get secret \
|
||||
-n {{ .Release.Namespace }} \
|
||||
{{ include "vpa.webhook.secret" . }} \
|
||||
-o=jsonpath="{.data.ca}")
|
||||
|
||||
# Get configured CA bundle
|
||||
WEBHOOK_CABUNDLE=$(kubectl \
|
||||
get mutatingwebhookconfigurations.admissionregistration.k8s.io \
|
||||
{{ include "vpa.fullname" . }}-webhook-config \
|
||||
-o=jsonpath="{.webhooks[0].clientConfig.caBundle}")
|
||||
|
||||
# All corresponding values must match
|
||||
if [ $SERVICE = $WEBHOOK_SERVICE ]
|
||||
then
|
||||
echo "$WEBHOOK_SERVICE matches $SERVICE"
|
||||
if [ $WEBHOOK_CABUNDLE = $SECRET_CABUNDLE ]
|
||||
then
|
||||
echo "Webhook CA bundle matches"
|
||||
exit 0;
|
||||
else
|
||||
echo "CA bundle in mutating webhook {{ include "vpa.fullname" . }}-webhook-config does not match secret {{ .Release.Namespace }}/{{ include "vpa.webhook.secret" . }}"
|
||||
fi
|
||||
else
|
||||
echo "Service configured in mutating webhook {{ include "vpa.fullname" . }}-webhook-config is '$WEBHOOK_SERVICE' not '$SERVICE'"
|
||||
fi
|
||||
exit 1;
|
||||
restartPolicy: Never
|
||||
{{- end }}
|
||||
@@ -0,0 +1,81 @@
|
||||
{{- if .Values.updater.enabled }}
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-updater
|
||||
labels:
|
||||
app.kubernetes.io/component: updater
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
spec:
|
||||
replicas: {{ .Values.updater.replicaCount }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: updater
|
||||
{{- include "vpa.selectorLabels" . | nindent 6 }}
|
||||
template:
|
||||
metadata:
|
||||
{{- with .Values.updater.podAnnotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
labels:
|
||||
{{- with .Values.updater.podLabels }}
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
app.kubernetes.io/component: updater
|
||||
{{- include "vpa.selectorLabels" . | nindent 8 }}
|
||||
spec:
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.priorityClassName }}
|
||||
priorityClassName: {{ . }}
|
||||
{{- end }}
|
||||
serviceAccountName: {{ include "vpa.serviceAccountName" . }}-updater
|
||||
securityContext:
|
||||
{{- toYaml .Values.updater.podSecurityContext | nindent 8 }}
|
||||
containers:
|
||||
- name: {{ .Chart.Name }}
|
||||
securityContext:
|
||||
{{- toYaml .Values.updater.securityContext | nindent 12 }}
|
||||
image: {{ printf "%s:%s" .Values.updater.image.repository (.Values.updater.image.tag | default .Chart.AppVersion) }}
|
||||
imagePullPolicy: {{ .Values.updater.image.pullPolicy }}
|
||||
{{- if .Values.updater.extraArgs }}
|
||||
args:
|
||||
{{- range $key, $value := .Values.updater.extraArgs }}
|
||||
- --{{ $key }}={{ $value }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
env:
|
||||
- name: NAMESPACE
|
||||
valueFrom:
|
||||
fieldRef:
|
||||
fieldPath: metadata.namespace
|
||||
{{- if .Values.updater.livenessProbe }}
|
||||
livenessProbe:
|
||||
{{- toYaml .Values.updater.livenessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
{{- if .Values.updater.readinessProbe }}
|
||||
readinessProbe:
|
||||
{{- toYaml .Values.updater.readinessProbe | nindent 12 }}
|
||||
{{- end }}
|
||||
ports:
|
||||
- name: metrics
|
||||
containerPort: 8943
|
||||
protocol: TCP
|
||||
resources:
|
||||
{{- toYaml .Values.updater.resources | nindent 12 }}
|
||||
{{- with .Values.updater.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.updater.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.updater.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,13 @@
|
||||
---
|
||||
{{- if and .Values.updater.podDisruptionBudget (gt (int .Values.updater.replicaCount) 1) .Values.updater.enabled }}
|
||||
apiVersion: {{ ternary "policy/v1" "policy/v1beta1" (semverCompare ">=1.21.0-0" .Capabilities.KubeVersion.Version) }}
|
||||
kind: PodDisruptionBudget
|
||||
metadata:
|
||||
name: "{{ template "vpa.fullname" . }}-updater-pdb"
|
||||
spec:
|
||||
{{- toYaml .Values.updater.podDisruptionBudget | nindent 2 }}
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: updater
|
||||
app.kubernetes.io/name: {{ template "vpa.fullname" . }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,28 @@
|
||||
{{- if .Values.updater.podMonitor }}
|
||||
{{- if and .Values.updater.enabled .Values.updater.podMonitor.enabled }}
|
||||
apiVersion: monitoring.coreos.com/v1
|
||||
kind: PodMonitor
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-updater
|
||||
{{- with .Values.updater.podMonitor.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- with .Values.updater.podMonitor.labels }}
|
||||
labels:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
spec:
|
||||
namespaceSelector:
|
||||
matchNames:
|
||||
- {{ .Release.Namespace }}
|
||||
podMetricsEndpoints:
|
||||
- interval: 30s
|
||||
path: /metrics
|
||||
port: metrics
|
||||
selector:
|
||||
matchLabels:
|
||||
app.kubernetes.io/component: updater
|
||||
{{- include "vpa.selectorLabels" . | nindent 6 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,14 @@
|
||||
{{- if and .Values.serviceAccount.create .Values.updater.enabled }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
automountServiceAccountToken: {{ .Values.serviceAccount.automountServiceAccountToken }}
|
||||
metadata:
|
||||
name: {{ include "vpa.serviceAccountName" . }}-updater
|
||||
labels:
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
app.kubernetes.io/component: updater
|
||||
{{- with .Values.serviceAccount.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,37 @@
|
||||
{{/*
|
||||
See, if we can upgrade the mutatingWebhookConfiguration
|
||||
*/}}
|
||||
{{- define "vpa.webhook.upgradable" -}}
|
||||
{{/*lookup config*/}}
|
||||
{{- $webhook := (lookup "admissionregistration.k8s.io/v1" "MutatingWebhookConfiguration" "" (printf "%s-%s" (include "vpa.fullname" .) "webhook-config")) }}
|
||||
{{- if $webhook }}
|
||||
{{- /*is it managed by this helm release?*/ -}}
|
||||
{{- if and
|
||||
(hasKey $webhook.metadata "labels")
|
||||
(hasKey $webhook.metadata "annotations")
|
||||
(hasKey $webhook.metadata.labels "app.kubernetes.io/managed-by")
|
||||
(hasKey $webhook.metadata.annotations "meta.helm.sh/release-name")
|
||||
(hasKey $webhook.metadata.annotations "meta.helm.sh/release-namespace")
|
||||
(eq (get $webhook.metadata.labels "app.kubernetes.io/managed-by") "Helm")
|
||||
(eq (get $webhook.metadata.annotations "meta.helm.sh/release-name") .Release.Name)
|
||||
(eq (get $webhook.metadata.annotations "meta.helm.sh/release-namespace") .Release.Namespace)
|
||||
}}
|
||||
{{- "true" | toYaml -}}
|
||||
{{- else }}
|
||||
{{- "" -}}
|
||||
{{- end }}
|
||||
{{- else }}
|
||||
{{- "true" | toYaml -}}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
|
||||
{{/*
|
||||
Return the name for the webhook tls secret
|
||||
*/}}
|
||||
{{- define "vpa.webhook.secret" -}}
|
||||
{{- if .Values.admissionController.secretName }}
|
||||
{{- default (printf "%s-%s" (include "vpa.fullname" .) "tls-certs") (tpl (.Values.admissionController.secretName | toString) .) }}
|
||||
{{- else }}
|
||||
{{- printf "%s-%s" (include "vpa.fullname" .) "tls-certs" }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,21 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRole
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- admissionregistration.k8s.io
|
||||
resources:
|
||||
- validatingwebhookconfigurations
|
||||
- mutatingwebhookconfigurations
|
||||
verbs:
|
||||
- get
|
||||
- update
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: ClusterRoleBinding
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: ClusterRole
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,53 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen-create
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 300
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
labels:
|
||||
app.kubernetes.io/component: cadmission-ertgen
|
||||
{{- include "vpa.labels" . | nindent 8 }}
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: create
|
||||
image: {{ printf "%s:%s" .Values.admissionController.certGen.image.repository .Values.admissionController.certGen.image.tag }}
|
||||
args:
|
||||
- create
|
||||
- --host={{ include "vpa.fullname" . }}-webhook,{{ include "vpa.fullname" . }}-webhook.{{ .Release.Namespace }}.svc
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ include "vpa.webhook.secret" . }}
|
||||
resources:
|
||||
{{- toYaml .Values.admissionController.certGen.resources | nindent 12 }}
|
||||
{{- with .Values.admissionController.certGen.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.certGen.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.certGen.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.certGen.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,55 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: batch/v1
|
||||
kind: Job
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen-patch
|
||||
annotations:
|
||||
"helm.sh/hook": post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
spec:
|
||||
ttlSecondsAfterFinished: 300
|
||||
template:
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen-patch
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 8 }}
|
||||
spec:
|
||||
restartPolicy: OnFailure
|
||||
serviceAccountName: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
{{- with .Values.imagePullSecrets }}
|
||||
imagePullSecrets:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
containers:
|
||||
- name: patch
|
||||
image: {{ printf "%s:%s" .Values.admissionController.certGen.image.repository .Values.admissionController.certGen.image.tag }}
|
||||
args:
|
||||
- patch
|
||||
- --webhook-name={{ include "vpa.fullname" . }}-webhook-config
|
||||
- --namespace={{ .Release.Namespace }}
|
||||
- --secret-name={{ include "vpa.webhook.secret" . }}
|
||||
- --patch-validating=false
|
||||
- --log-level=debug
|
||||
resources:
|
||||
{{- toYaml .Values.admissionController.certGen.resources | nindent 12 }}
|
||||
{{- with .Values.admissionController.certGen.securityContext }}
|
||||
securityContext:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.certGen.nodeSelector }}
|
||||
nodeSelector:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.certGen.affinity }}
|
||||
affinity:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- with .Values.admissionController.certGen.tolerations }}
|
||||
tolerations:
|
||||
{{- toYaml . | nindent 8 }}
|
||||
{{- end }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: Role
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
resources:
|
||||
- secrets
|
||||
verbs:
|
||||
- get
|
||||
- create
|
||||
{{- end }}
|
||||
@@ -0,0 +1,20 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: rbac.authorization.k8s.io/v1
|
||||
kind: RoleBinding
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
roleRef:
|
||||
apiGroup: rbac.authorization.k8s.io
|
||||
kind: Role
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
subjects:
|
||||
- kind: ServiceAccount
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,12 @@
|
||||
{{- if and .Values.admissionController.enabled .Values.admissionController.generateCertificate }}
|
||||
apiVersion: v1
|
||||
kind: ServiceAccount
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-admission-certgen
|
||||
annotations:
|
||||
"helm.sh/hook": pre-install,pre-upgrade,post-install,post-upgrade
|
||||
"helm.sh/hook-delete-policy": before-hook-creation,hook-succeeded
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-certgen
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,49 @@
|
||||
{{- if and .Values.admissionController.enabled (include "vpa.webhook.upgradable" .) }}
|
||||
apiVersion: admissionregistration.k8s.io/v1
|
||||
kind: MutatingWebhookConfiguration
|
||||
metadata:
|
||||
name: {{ include "vpa.fullname" . }}-webhook-config
|
||||
labels:
|
||||
app.kubernetes.io/component: admission-controller
|
||||
{{- include "vpa.labels" . | nindent 4 }}
|
||||
{{- with .Values.admissionController.mutatingWebhookConfiguration.annotations }}
|
||||
annotations:
|
||||
{{- toYaml . | nindent 4 }}
|
||||
{{- end }}
|
||||
webhooks:
|
||||
- admissionReviewVersions:
|
||||
- v1
|
||||
clientConfig:
|
||||
service:
|
||||
name: {{ include "vpa.fullname" . }}-webhook
|
||||
namespace: {{ .Release.Namespace }}
|
||||
port: 443
|
||||
failurePolicy: {{ .Values.admissionController.mutatingWebhookConfiguration.failurePolicy }}
|
||||
matchPolicy: Equivalent
|
||||
name: vpa.k8s.io
|
||||
namespaceSelector: {{ .Values.admissionController.mutatingWebhookConfiguration.namespaceSelector | toYaml }}
|
||||
objectSelector: {{ .Values.admissionController.mutatingWebhookConfiguration.objectSelector | toYaml }}
|
||||
reinvocationPolicy: Never
|
||||
rules:
|
||||
- apiGroups:
|
||||
- ""
|
||||
apiVersions:
|
||||
- v1
|
||||
operations:
|
||||
- CREATE
|
||||
resources:
|
||||
- pods
|
||||
scope: '*'
|
||||
- apiGroups:
|
||||
- autoscaling.k8s.io
|
||||
apiVersions:
|
||||
- '*'
|
||||
operations:
|
||||
- CREATE
|
||||
- UPDATE
|
||||
resources:
|
||||
- verticalpodautoscalers
|
||||
scope: '*'
|
||||
sideEffects: None
|
||||
timeoutSeconds: {{ .Values.admissionController.mutatingWebhookConfiguration.timeoutSeconds }}
|
||||
{{- end }}
|
||||
@@ -0,0 +1,280 @@
|
||||
# Default values for vertical-pod-autoscaler.
|
||||
# This is a YAML-formatted file.
|
||||
# Declare variables to be passed into your templates.
|
||||
|
||||
# imagePullSecrets -- A list of image pull secrets to be used for all pods
|
||||
imagePullSecrets: []
|
||||
# priorityClassName -- To set the priorityclass for all pods
|
||||
priorityClassName: ""
|
||||
# nameOverride -- A template override for the name
|
||||
nameOverride: ""
|
||||
# fullnameOverride -- A template override for the fullname
|
||||
fullnameOverride: ""
|
||||
# podLabels -- Labels to add to all pods
|
||||
podLabels: {}
|
||||
rbac:
|
||||
# rbac.create -- If true, then rbac resources (clusterroles and clusterrolebindings) will be created for the selected components.
|
||||
# Temporary rbac resources will still be created, to ensure a functioning installation process
|
||||
create: true
|
||||
|
||||
serviceAccount:
|
||||
# serviceAccount.create -- Specifies whether a service account should be created for each component
|
||||
create: true
|
||||
# serviceAccount.annotations -- Annotations to add to the service accounts for each component
|
||||
annotations: {}
|
||||
# serviceAccount.name -- The base name of the service account to use (appended with the component). If not set and create is true, a name is generated using the fullname template and appended for each component
|
||||
name: ""
|
||||
# serviceAccount.automountServiceAccountToken -- Automount API credentials for the Service Account
|
||||
automountServiceAccountToken: true
|
||||
|
||||
recommender:
|
||||
# recommender.enabled -- If true, the vpa recommender component will be installed.
|
||||
enabled: true
|
||||
# recommender.extraArgs -- A set of key-value flags to be passed to the recommender
|
||||
extraArgs:
|
||||
v: "4"
|
||||
pod-recommendation-min-cpu-millicores: 15
|
||||
pod-recommendation-min-memory-mb: 100
|
||||
replicaCount: 1
|
||||
# recommender.podDisruptionBudget -- This is the setting for the pod disruption budget
|
||||
podDisruptionBudget: {}
|
||||
# maxUnavailable: 1
|
||||
image:
|
||||
# recommender.image.repository -- The location of the recommender image
|
||||
repository: registry.k8s.io/autoscaling/vpa-recommender
|
||||
# recommender.image.tag -- Overrides the image tag whose default is the chart appVersion
|
||||
tag: ""
|
||||
# recommender.image.pullPolicy -- The pull policy for the recommender image. Recommend not changing this
|
||||
pullPolicy: Always
|
||||
# recommender.podAnnotations -- Annotations to add to the recommender pod
|
||||
podAnnotations: {}
|
||||
# recommender.podLabels -- Labels to add to the recommender pod
|
||||
podLabels: {}
|
||||
# recommender.podSecurityContext -- The security context for the recommender pod
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65534
|
||||
# recommender.securityContext -- The security context for the containers inside the recommender pod
|
||||
securityContext: {}
|
||||
# recommender.livenessProbe -- The liveness probe definition inside the recommender pod
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: metrics
|
||||
scheme: HTTP
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
# recommender.readinessProbe -- The readiness probe definition inside the recommender pod
|
||||
readinessProbe:
|
||||
failureThreshold: 120
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: metrics
|
||||
scheme: HTTP
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
# recommender.resources -- The resources block for the recommender pod
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 1000Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 500Mi
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
# -- Enables a prometheus operator podMonitor for the recommender
|
||||
podMonitor:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
labels: {}
|
||||
|
||||
updater:
|
||||
# updater.enabled -- If true, the updater component will be deployed
|
||||
enabled: true
|
||||
# updater.extraArgs -- A key-value map of flags to pass to the updater
|
||||
extraArgs: {}
|
||||
replicaCount: 1
|
||||
# updater.podDisruptionBudget -- This is the setting for the pod disruption budget
|
||||
podDisruptionBudget: {}
|
||||
# maxUnavailable: 1
|
||||
image:
|
||||
# updater.image.repository -- The location of the updater image
|
||||
repository: registry.k8s.io/autoscaling/vpa-updater
|
||||
# updater.image.tag -- Overrides the image tag whose default is the chart appVersion
|
||||
tag: ""
|
||||
# updater.image.pullPolicy -- The pull policy for the updater image. Recommend not changing this
|
||||
pullPolicy: Always
|
||||
# updater.podAnnotations -- Annotations to add to the updater pod
|
||||
podAnnotations: {}
|
||||
# updater.podLabels -- Labels to add to the updater pod
|
||||
podLabels: {}
|
||||
# updater.podSecurityContext -- The security context for the updater pod
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65534
|
||||
# updater.securityContext -- The security context for the containers inside the updater pod
|
||||
securityContext: {}
|
||||
# updater.livenessProbe -- The liveness probe definition inside the updater pod
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: metrics
|
||||
scheme: HTTP
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
# updater.readinessProbe -- The readiness probe definition inside the updater pod
|
||||
readinessProbe:
|
||||
failureThreshold: 120
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: metrics
|
||||
scheme: HTTP
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
# updater.resources -- The resources block for the updater pod
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 1000Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 500Mi
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
# -- Enables a prometheus operator podMonitor for the updater
|
||||
podMonitor:
|
||||
enabled: false
|
||||
annotations: {}
|
||||
labels: {}
|
||||
|
||||
admissionController:
|
||||
# admissionController.enabled -- If true, will install the admission-controller component of vpa
|
||||
enabled: true
|
||||
# admissionController.extraArgs -- A key-value map of flags to pass to the admissionController
|
||||
extraArgs: {}
|
||||
# admissionController.generateCertificate -- If true and admissionController is enabled, a pre-install hook will run to create the certificate for the webhook
|
||||
generateCertificate: true
|
||||
# admissionController.secretName -- Name for the TLS secret created for the webhook. Default {{ .Release.Name }}-tls-secret
|
||||
secretName: "{{ include \"vpa.fullname\" . }}-tls-secret"
|
||||
certGen:
|
||||
image:
|
||||
# admissionController.certGen.image.repository -- An image that contains certgen for creating certificates. Only used if admissionController.generateCertificate is true
|
||||
repository: registry.k8s.io/ingress-nginx/kube-webhook-certgen
|
||||
# admissionController.certGen.image.tag -- An image tag for the admissionController.certGen.image.repository image. Only used if admissionController.generateCertificate is true
|
||||
tag: v20230312-helm-chart-4.5.2-28-g66a760794
|
||||
# admissionController.certGen.image.pullPolicy -- The pull policy for the certgen image. Recommend not changing this
|
||||
pullPolicy: Always
|
||||
# admissionController.certGen.env -- Additional environment variables to be added to the certgen container. Format is KEY: Value format
|
||||
env: {}
|
||||
# admissionController.certGen.resources -- The resources block for the certgen pod
|
||||
resources: {}
|
||||
# admissionController.certGen.securityContext -- The securityContext block for the certgen pod
|
||||
securityContext: {}
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
mutatingWebhookConfiguration:
|
||||
# admissionController.mutatingWebhookConfiguration.annotations -- Additional annotations for the MutatingWebhookConfiguration. Can be used for integration with cert-manager
|
||||
annotations: {}
|
||||
# admissionController.mutatingWebhookConfiguration.failurePolicy -- The failurePolicy for the mutating webhook. Allowed values are: Ignore, Fail
|
||||
failurePolicy: Ignore
|
||||
# admissionController.mutatingWebhookConfiguration.namespaceSelector -- The namespaceSelector controls, which namespaces are affected by the webhook
|
||||
namespaceSelector: {}
|
||||
# admissionController.mutatingWebhookConfiguration.objectSelector -- The objectSelector can filter object on e.g. labels
|
||||
objectSelector: {}
|
||||
# admissionController.mutatingWebhookConfiguration.timeout -- Sets the amount of time the API server will wait on a response from the webhook service.
|
||||
timeoutSeconds: 30
|
||||
|
||||
replicaCount: 1
|
||||
# admissionController.podDisruptionBudget -- This is the setting for the pod disruption budget
|
||||
podDisruptionBudget: {}
|
||||
# maxUnavailable: 1
|
||||
image:
|
||||
# admissionController.image.repository -- The location of the vpa admission controller image
|
||||
repository: registry.k8s.io/autoscaling/vpa-admission-controller
|
||||
# admissionController.image.tag -- Overrides the image tag whose default is the chart appVersion
|
||||
tag: ""
|
||||
# admissionController.image.pullPolicy -- The pull policy for the admission controller image. Recommend not changing this
|
||||
pullPolicy: Always
|
||||
# admissionController.podAnnotations -- Annotations to add to the admission controller pod
|
||||
podAnnotations: {}
|
||||
# admissionController.podLabels -- Labels to add to the admission controller pod
|
||||
podLabels: {}
|
||||
# admissionController.podSecurityContext -- The security context for the admission controller pod
|
||||
podSecurityContext:
|
||||
runAsNonRoot: true
|
||||
runAsUser: 65534
|
||||
# admissionController.securityContext -- The security context for the containers inside the admission controller pod
|
||||
securityContext: {}
|
||||
# admissionController.livenessProbe -- The liveness probe definition inside the admission controller pod
|
||||
livenessProbe:
|
||||
failureThreshold: 6
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: metrics
|
||||
scheme: HTTP
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
# admissionController.readinessProbe -- The readiness probe definition inside the admission controller pod
|
||||
readinessProbe:
|
||||
failureThreshold: 120
|
||||
httpGet:
|
||||
path: /health-check
|
||||
port: metrics
|
||||
scheme: HTTP
|
||||
periodSeconds: 5
|
||||
successThreshold: 1
|
||||
timeoutSeconds: 3
|
||||
# admissionController.resources -- The resources block for the admission controller pod
|
||||
resources:
|
||||
limits:
|
||||
cpu: 200m
|
||||
memory: 500Mi
|
||||
requests:
|
||||
cpu: 50m
|
||||
memory: 200Mi
|
||||
# admissionController.tlsSecretKeys -- The keys in the vpa-tls-certs secret to map in to the admission controller
|
||||
tlsSecretKeys: []
|
||||
# - key: ca.crt
|
||||
# path: caCert.pem
|
||||
# - key: tls.crt
|
||||
# path: serverCert.pem
|
||||
# - key: tls.key
|
||||
# path: serverKey.pem
|
||||
nodeSelector: {}
|
||||
tolerations: []
|
||||
affinity: {}
|
||||
|
||||
tests:
|
||||
# tests.securityContext -- The security context for the containers run as helm hook tests
|
||||
securityContext:
|
||||
readOnlyRootFilesystem: true
|
||||
allowPrivilegeEscalation: false
|
||||
runAsNonRoot: true
|
||||
runAsUser: 10324
|
||||
capabilities:
|
||||
drop:
|
||||
- ALL
|
||||
image:
|
||||
# tests.image.repository -- An image used for testing containing bash, cat and kubectl
|
||||
repository: bitnami/kubectl
|
||||
# tests.image.tag -- An image tag for the tests image
|
||||
tag: ""
|
||||
# tests.image.pullPolicy -- The pull policy for the tests image.
|
||||
pullPolicy: Always
|
||||
|
||||
# metrics-server -- configuration options for the [metrics server Helm chart](https://github.com/kubernetes-sigs/metrics-server/tree/master/charts/metrics-server). See the projects [README.md](https://github.com/kubernetes-sigs/metrics-server/tree/master/charts/metrics-server#configuration) for all available options
|
||||
metrics-server:
|
||||
# metrics-server.enabled -- Whether or not the metrics server Helm chart should be installed
|
||||
enabled: false
|
||||
Reference in New Issue
Block a user