diff --git a/lib/aws/bootstrap/helm-cert-manager.j2.tf b/lib/aws/bootstrap/helm-cert-manager.j2.tf index d2aaac09..4e772db5 100644 --- a/lib/aws/bootstrap/helm-cert-manager.j2.tf +++ b/lib/aws/bootstrap/helm-cert-manager.j2.tf @@ -5,6 +5,7 @@ resource "helm_release" "cert_manager" { create_namespace = true atomic = true max_history = 50 + timeout = 480 values = [file("chart_values/cert-manager.yaml")] diff --git a/lib/aws/bootstrap/helm-cluster-autoscaler.tf b/lib/aws/bootstrap/helm-cluster-autoscaler.tf index 9aa575e8..c490c8a9 100644 --- a/lib/aws/bootstrap/helm-cluster-autoscaler.tf +++ b/lib/aws/bootstrap/helm-cluster-autoscaler.tf @@ -56,7 +56,7 @@ resource "helm_release" "cluster_autoscaler" { set { name = "autoDiscovery.clusterName" - value = var.kubernetes_cluster_name + value = aws_eks_cluster.eks_cluster.name } set { diff --git a/lib/aws/bootstrap/helm-prometheus-operator.j2.tf b/lib/aws/bootstrap/helm-prometheus-operator.j2.tf index e5ad2451..954cb51b 100644 --- a/lib/aws/bootstrap/helm-prometheus-operator.j2.tf +++ b/lib/aws/bootstrap/helm-prometheus-operator.j2.tf @@ -14,7 +14,7 @@ resource "helm_release" "prometheus_operator" { namespace = local.prometheus_namespace // high timeout because on bootstrap, it's one of the biggest dependencies and on upgrade, it can takes time // to upgrade because of crd and the number of elements it has to deploy - timeout = 600 + timeout = 480 create_namespace = true atomic = true max_history = 50 diff --git a/lib/common/bootstrap/charts/cluster-autoscaler/Chart.yaml b/lib/common/bootstrap/charts/cluster-autoscaler/Chart.yaml index 7458cef8..cafa7593 100644 --- a/lib/common/bootstrap/charts/cluster-autoscaler/Chart.yaml +++ b/lib/common/bootstrap/charts/cluster-autoscaler/Chart.yaml @@ -16,4 +16,4 @@ name: cluster-autoscaler sources: - https://github.com/kubernetes/autoscaler/tree/master/cluster-autoscaler type: application -version: 9.3.0 +version: 9.4.0 diff --git a/lib/common/bootstrap/charts/cluster-autoscaler/README.md b/lib/common/bootstrap/charts/cluster-autoscaler/README.md index 9a15111f..3060fef4 100644 --- a/lib/common/bootstrap/charts/cluster-autoscaler/README.md +++ b/lib/common/bootstrap/charts/cluster-autoscaler/README.md @@ -351,11 +351,13 @@ Though enough for the majority of installations, the default PodSecurityPolicy _ | envFromConfigMap | string | `""` | ConfigMap name to use as envFrom. | | envFromSecret | string | `""` | Secret name to use as envFrom. | | expanderPriorities | object | `{}` | The expanderPriorities is used if `extraArgs.expander` is set to `priority` and expanderPriorities is also set with the priorities. If `extraArgs.expander` is set to `priority`, then expanderPriorities is used to define cluster-autoscaler-priority-expander priorities. See: https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/expander/priority/readme.md | -| extraArgs | object | `{"logtostderr":true,"stderrthreshold":"info","v":4}` | Additional container arguments. | +| extraArgs | object | `{"logtostderr":true,"stderrthreshold":"info","v":4}` | Additional container arguments. Refer to https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca for the full list of cluster autoscaler parameters and their default values. | | extraEnv | object | `{}` | Additional container environment variables. | | extraEnvConfigMaps | object | `{}` | Additional container environment variables from ConfigMaps. | | extraEnvSecrets | object | `{}` | Additional container environment variables from Secrets. | +| extraVolumeMounts | list | `[]` | Additional volumes to mount. | | extraVolumeSecrets | object | `{}` | Additional volumes to mount from Secrets. | +| extraVolumes | list | `[]` | Additional volumes. | | fullnameOverride | string | `""` | String to fully override `cluster-autoscaler.fullname` template. | | image.pullPolicy | string | `"IfNotPresent"` | Image pull policy | | image.pullSecrets | list | `[]` | Image pull secrets | diff --git a/lib/common/bootstrap/charts/cluster-autoscaler/templates/deployment.yaml b/lib/common/bootstrap/charts/cluster-autoscaler/templates/deployment.yaml index 9d976be2..b7ba4933 100644 --- a/lib/common/bootstrap/charts/cluster-autoscaler/templates/deployment.yaml +++ b/lib/common/bootstrap/charts/cluster-autoscaler/templates/deployment.yaml @@ -27,7 +27,7 @@ spec: labels: {{ include "cluster-autoscaler.instance-name" . | indent 8 }} {{- if .Values.additionalLabels }} -{{ toYaml .values.additionalLabels | indent 8 }} +{{ toYaml .Values.additionalLabels | indent 8 }} {{- end }} {{- if .Values.podLabels }} {{ toYaml .Values.podLabels | indent 8 }} @@ -182,7 +182,7 @@ spec: securityContext: {{ toYaml .Values.containerSecurityContext | nindent 12 | trim }} {{- end }} - {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }} + {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets .Values.extraVolumeMounts }} volumeMounts: {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }} - name: cloudconfig @@ -199,6 +199,9 @@ spec: mountPath: {{ required "Must specify mountPath!" $value.mountPath }} readOnly: true {{- end }} + {{- if .Values.extraVolumeMounts }} + {{ toYaml .Values.extraVolumeMounts | nindent 12 }} + {{- end }} {{- end }} {{- if .Values.affinity }} affinity: @@ -215,7 +218,7 @@ spec: securityContext: {{ toYaml .Values.securityContext | nindent 8 | trim }} {{- end }} - {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets }} + {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") .Values.extraVolumeSecrets .Values.extraVolumes }} volumes: {{- if or (eq .Values.cloudProvider "gce") (eq .Values.cloudProvider "magnum") }} - name: cloudconfig @@ -236,6 +239,9 @@ spec: {{- toYaml $value.items | nindent 14 }} {{- end }} {{- end }} + {{- if .Values.extraVolumes }} + {{- toYaml .Values.extraVolumes | nindent 10 }} + {{- end }} {{- end }} {{- if .Values.image.pullSecrets }} imagePullSecrets: diff --git a/lib/common/bootstrap/charts/cluster-autoscaler/templates/role.yaml b/lib/common/bootstrap/charts/cluster-autoscaler/templates/role.yaml index e6af27d5..97eb32c2 100644 --- a/lib/common/bootstrap/charts/cluster-autoscaler/templates/role.yaml +++ b/lib/common/bootstrap/charts/cluster-autoscaler/templates/role.yaml @@ -12,14 +12,24 @@ rules: - configmaps verbs: - create +{{- if eq (default "" .Values.extraArgs.expander) "priority" }} + - list + - watch +{{- end }} - apiGroups: - "" resources: - configmaps resourceNames: - cluster-autoscaler-status +{{- if eq (default "" .Values.extraArgs.expander) "priority" }} + - cluster-autoscaler-priority-expander +{{- end }} verbs: - delete - get - update +{{- if eq (default "" .Values.extraArgs.expander) "priority" }} + - watch +{{- end }} {{- end -}} diff --git a/lib/common/bootstrap/charts/cluster-autoscaler/values.yaml b/lib/common/bootstrap/charts/cluster-autoscaler/values.yaml index 92fee784..4b971cc1 100644 --- a/lib/common/bootstrap/charts/cluster-autoscaler/values.yaml +++ b/lib/common/bootstrap/charts/cluster-autoscaler/values.yaml @@ -126,19 +126,21 @@ dnsPolicy: ClusterFirst expanderPriorities: {} # extraArgs -- Additional container arguments. +# Refer to https://github.com/kubernetes/autoscaler/blob/master/cluster-autoscaler/FAQ.md#what-are-the-parameters-to-ca for the full list of cluster autoscaler +# parameters and their default values. extraArgs: logtostderr: true stderrthreshold: info v: 4 # write-status-configmap: true # leader-elect: true - # skip-nodes-with-local-storage: false - # expander: least-waste + # skip-nodes-with-local-storage: true + # expander: random # scale-down-enabled: true # balance-similar-node-groups: true - # min-replica-count: 2 + # min-replica-count: 0 # scale-down-utilization-threshold: 0.5 - # scale-down-non-empty-candidates-count: 5 + # scale-down-non-empty-candidates-count: 30 # max-node-provision-time: 15m0s # scan-interval: 10s # scale-down-delay-after-add: 10m @@ -173,6 +175,18 @@ extraVolumeSecrets: {} # - key: subkey # path: mypath +# extraVolumes -- Additional volumes. +extraVolumes: [] + # - name: ssl-certs + # hostPath: + # path: /etc/ssl/certs/ca-bundle.crt + +# extraVolumeMounts -- Additional volumes to mount. +extraVolumeMounts: [] + # - name: ssl-certs + # mountPath: /etc/ssl/certs/ca-certificates.crt + # readonly: true + # fullnameOverride -- String to fully override `cluster-autoscaler.fullname` template. fullnameOverride: "" diff --git a/lib/common/bootstrap/charts/pleco/templates/deployment.yaml b/lib/common/bootstrap/charts/pleco/templates/deployment.yaml index 5edbc8ad..12ed472e 100644 --- a/lib/common/bootstrap/charts/pleco/templates/deployment.yaml +++ b/lib/common/bootstrap/charts/pleco/templates/deployment.yaml @@ -68,7 +68,7 @@ spec: {{ end }} {{ if or (eq .Values.enabledFeatures.ebs true) (eq .Values.enabledFeatures.eks true)}} - --enable-ebs - {{ end }} + {{ end }} env: {{ range $key, $value := .Values.environmentVariables -}} - name: "{{ $key }}" diff --git a/lib/helm-freeze.yaml b/lib/helm-freeze.yaml index ad42b675..0da717bf 100644 --- a/lib/helm-freeze.yaml +++ b/lib/helm-freeze.yaml @@ -29,7 +29,7 @@ charts: version: 0.3.1 - name: cluster-autoscaler repo_name: cluster-autoscaler - version: 9.3.0 + version: 9.4.0 - name: metrics-server repo_name: bitnami version: 4.3.1