Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable HPA for xs clusters #40

Merged
merged 4 commits into from
Mar 17, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project's packages adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## Unreleased

### Changed

- Disable HPA and PDB for xs clusters since NGINX Deployment resource requests are not set there. ([#40](https://github.com/giantswarm/nginx-ingress-controller-app/pull/40))

## [v1.6.3] 2020-03-16

### Changed
Expand Down
2 changes: 1 addition & 1 deletion helm/nginx-ingress-controller-app/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Parameter | Description | Default
--- | --- | ---
`baseDomain` | Cluster base domain. Dynamically calculated during cluster creation. Manual change doesn't affect this value | 'uun5a.k8s.ginger.eu-central-1.aws.gigantic.io'
`clusterID` | Cluster ID. Dynamically calculated during cluster creation. Manual change doesn't affect this value | 'uun5a'
`cluster.profile` | Cluster usage profile. Dynamically calculated during cluster creation. Supported values are `1` for extra extra small, `2` for extra small, `3` for small, and currently any value higher than 3 when actual cluster profile is larger than small or unknown. By default HPA and PDB are disabled, and resource requests unset for extra extra small clusters. On extra small clusters there are still no resource requests, HPA and PDB are enabled by default. On small clusters some small resource requests are made, HPA and PDB are enabled by default. On larger than small clusters HPA and PDB are enabled by default, and non-trivial resource requests set for some out-of-the-box guaranteed capacity. | `4`
`cluster.profile` | Cluster usage profile. Dynamically calculated during cluster creation. Supported values are `1` for extra extra small, `2` for extra small, `3` for small, and currently any value higher than 3 when actual cluster profile is larger than small or unknown. By default HPA and PDB are disabled, and resource requests unset for extra extra small clusters and extra small clusters. On small clusters some small resource requests are made, HPA and PDB are enabled by default. On larger than small clusters HPA and PDB are enabled by default, and non-trivial resource requests set for some out-of-the-box guaranteed capacity. | `4`
`configmap` | Sets the nginx configmap configuration overrides. | See official docs for nginx [configmap configuration options](https://github.com/kubernetes/ingress-nginx/blob/master/docs/user-guide/nginx-configuration/configmap.md#configuration-options) and their defaults. Built-in overrides are covered below.
`configmap.annotations-prefix` | This configuration property is deprecated and will be removed in the future, please migrate to `controller.annotationsPrefix`. | not configured by default
`configmap.default-ssl-certificate` | This configuration property is deprecated and will be removed in the future, please migrate to `controller.defaultSSLCertificate`. | not configured by default
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if gt (.Values.cluster.profile | int) 1 }}
{{- if gt (.Values.cluster.profile | int) 2 }}
{{- if index .Values.configmap "hpa-enabled" }}
{{- if eq (index .Values.configmap "hpa-enabled") "true" }}
apiVersion: autoscaling/v2beta1
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{{- if or (and (gt (.Values.cluster.profile | int) 1) (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1))) (gt (.Values.controller.replicaCount | int) 1) }}
{{- if or (and (gt (.Values.cluster.profile | int) 2) (and .Values.controller.autoscaling.enabled (gt (.Values.controller.autoscaling.minReplicas | int) 1))) (gt (.Values.controller.replicaCount | int) 1) }}
apiVersion: policy/v1beta1
kind: PodDisruptionBudget
metadata:
Expand Down
1 change: 1 addition & 0 deletions helm/nginx-ingress-controller-app/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ controller:
profile:
# xxs (1) cluster profile - 1 worker node only - resource requests are not being set
# xs (2) cluster profile - 2-3 worker nodes, max CPU < 4 - resource requests are not being set
# TODO set resource requests same as small once coredns scale and resources are cluster profile adjusted https://github.com/giantswarm/giantswarm/issues/9316
# small (3) cluster profile - > 3 worker nodes, max CPU still < 4
small:
resources:
Expand Down