Skip to content

Commit

Permalink
terraform: updartes for autoscaler
Browse files Browse the repository at this point in the history
Signed-off-by: junior <[email protected]>
  • Loading branch information
junior committed Jul 21, 2022
1 parent 2d020d1 commit fecf64e
Show file tree
Hide file tree
Showing 8 changed files with 18 additions and 12 deletions.
8 changes: 4 additions & 4 deletions deploy/complete/helm-chart/setup/requirements.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@
dependencies:
# Prometheus
- name: prometheus
version: 15.4.0
version: 15.8.4
condition: prometheus.enabled
repository: https://prometheus-community.github.io/helm-charts
# Grafana
- name: grafana
version: 6.22.0
version: 6.26.3
condition: grafana.enabled
repository: https://grafana.github.io/helm-charts
# HPA Metrics
Expand All @@ -20,7 +20,7 @@ dependencies:
repository: https://kubernetes-sigs.github.io/metrics-server
# Ingress Controller
- name: ingress-nginx
version: 4.0.17
version: 4.0.19
condition: ingress-nginx.enabled
repository: https://kubernetes.github.io/ingress-nginx
# Service Catalog
Expand All @@ -30,7 +30,7 @@ dependencies:
repository: https://kubernetes-sigs.github.io/service-catalog
# cert-manager
- name: cert-manager
version: 1.7.1
version: 1.8.0
condition: cert-manager.enabled
repository: https://charts.jetstack.io
# jenkins
Expand Down
8 changes: 4 additions & 4 deletions deploy/complete/terraform/mushop-utilities.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ resource "helm_release" "prometheus" {
name = "prometheus"
repository = local.helm_repository.prometheus
chart = "prometheus"
version = "15.4.0"
version = "15.8.4"
namespace = kubernetes_namespace.cluster_utilities_namespace.id
wait = false

Expand All @@ -37,7 +37,7 @@ resource "helm_release" "grafana" {
name = "mushop-utils-grafana" # mushop-utils included to be backwards compatible to the docs and setup chart install
repository = local.helm_repository.grafana
chart = "grafana"
version = "6.22.0"
version = "6.26.3"
namespace = kubernetes_namespace.cluster_utilities_namespace.id
wait = false

Expand Down Expand Up @@ -116,7 +116,7 @@ resource "helm_release" "ingress_nginx" {
name = "mushop-utils-ingress-nginx" # mushop-utils included to be backwards compatible to the docs and setup chart install
repository = local.helm_repository.ingress_nginx
chart = "ingress-nginx"
version = "4.0.17"
version = "4.0.19"
namespace = kubernetes_namespace.cluster_utilities_namespace.id
wait = true

Expand Down Expand Up @@ -167,7 +167,7 @@ resource "helm_release" "cert_manager" {
name = "cert-manager"
repository = local.helm_repository.jetstack
chart = "cert-manager"
version = "1.7.1"
version = "1.8.0"
namespace = kubernetes_namespace.cluster_utilities_namespace.id
wait = true # wait to allow the webhook be properly configured

Expand Down
2 changes: 1 addition & 1 deletion deploy/complete/terraform/oke-autoscaler.tf
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
#

locals {
cluster_autoscaler_supported_k8s_versions = { "1.18" = "1.18.3-4", "1.19" = "1.19.1-4", "1.20" = "1.20.0-4", "1.21" = "1.21.1-1" } # There's no API to get that list. Need to be updated manually
cluster_autoscaler_supported_k8s_versions = { "1.18" = "1.18.3-4", "1.19" = "1.19.1-8", "1.20" = "1.20.0-6", "1.21" = "1.21.1-3", "1.22" = "1.22.2-4" } # There's no API to get that list. Need to be updated manually
cluster_autoscaler_image_version = lookup(local.cluster_autoscaler_supported_k8s_versions, local.k8s_major_minor_version, reverse(values(local.cluster_autoscaler_supported_k8s_versions))[0])
cluster_autoscaler_image = "iad.ocir.io/oracle/oci-cluster-autoscaler:${local.cluster_autoscaler_image_version}"
cluster_autoscaler_log_level_verbosity = 4
Expand Down
3 changes: 3 additions & 0 deletions deploy/complete/terraform/oke-datasources.tf
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ data "oci_containerengine_cluster_option" "oke" {
data "oci_containerengine_node_pool_option" "oke" {
node_pool_option_id = "all"
}
data "oci_containerengine_clusters" "oke" {
compartment_id = local.oke_compartment_ocid
}

# Gets a list of Availability Domains
data "oci_identity_availability_domains" "ADs" {
Expand Down
2 changes: 1 addition & 1 deletion deploy/complete/terraform/oke-outputs.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ output "comments" {
}

output "deployed_oke_kubernetes_version" {
value = (var.k8s_version == "Latest") ? local.cluster_k8s_latest_version : var.k8s_version
value = local.deployed_k8s_version
}
output "kubeconfig_for_kubectl" {
value = "export KUBECONFIG=./generated/kubeconfig"
Expand Down
2 changes: 2 additions & 0 deletions deploy/complete/terraform/oke.tf
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,8 @@ resource "tls_private_key" "oke_worker_node_ssh_key" {
locals {
cluster_k8s_latest_version = reverse(sort(data.oci_containerengine_cluster_option.oke.kubernetes_versions))[0]
node_pool_k8s_latest_version = reverse(sort(data.oci_containerengine_node_pool_option.oke.kubernetes_versions))[0]
deployed_k8s_version = var.create_new_oke_cluster ? (var.k8s_version == "Latest") ? local.cluster_k8s_latest_version : var.k8s_version :[
for x in data.oci_containerengine_clusters.oke.clusters : x.kubernetes_version if x.id == var.existent_oke_cluster_id][0]
}

# Checks if is using Flexible Compute Shapes
Expand Down
4 changes: 2 additions & 2 deletions deploy/complete/terraform/providers.tf
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ terraform {
required_providers {
oci = {
source = "hashicorp/oci"
version = ">= 4.65.0"
# https://registry.terraform.io/providers/hashicorp/oci/4.65.0
version = ">= 4.68.0"
# https://registry.terraform.io/providers/hashicorp/oci/4.68.0
}
kubernetes = {
source = "hashicorp/kubernetes"
Expand Down
1 change: 1 addition & 0 deletions deploy/complete/terraform/schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -228,6 +228,7 @@ variables:
type: enum
enum: # Necessary hardcoded supported versions, as ORM does not retrieve the versions from OKE.
- "Latest"
- "v1.22.5"
- "v1.21.5"
- "v1.20.11"
- "v1.19.15"
Expand Down

0 comments on commit fecf64e

Please sign in to comment.