Skip to content

Commit

Permalink
Moved copying kubectl image from here to tfmod-eks to be used by othe…
Browse files Browse the repository at this point in the history
…r modules.
  • Loading branch information
zawac002 committed Sep 20, 2023
1 parent 84f9938 commit e93cd75
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 19 deletions.
10 changes: 0 additions & 10 deletions copy_images.tf
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
locals {
loki_key = format("%v#%v", "grafana/loki", var.loki_tag)
kubectl_key = format("%v#%v", "grafana/kubectl", var.kubectl_image_tag)
provisioner_key = format("%v#%v", "grafana/enterprise-logs-provisioner", var.enterprise_logs_provisioner_tag)
gateway_key = format("%v#%v", "grafana/nginx-unprivileged", var.gateway_tag)

Expand All @@ -14,15 +13,6 @@ locals {
source_tag = var.loki_tag
tag = var.loki_tag
},
{
enabled = true
dest_path = null
name = "grafana/kubectl"
source_image = "bitnami/kubectl"
source_registry = "docker.io"
source_tag = var.kubectl_image_tag
tag = var.kubectl_image_tag
},
{
enabled = true
dest_path = null
Expand Down
6 changes: 3 additions & 3 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -70,15 +70,15 @@ resource "helm_release" "loki" {

set {
name = "kubectlImage.registry"
value = module.images.images[local.kubectl_key].dest_registry
value = var.kubectl_image_registry
}
set {
name = "kubectlImage.repository"
value = module.images.images[local.kubectl_key].dest_repository
value = var.kubectl_image_repository
}
set {
name = "kubectlImage.tag"
value = module.images.images[local.kubectl_key].tag
value = var.kubectl_image_tag
}

set {
Expand Down
22 changes: 16 additions & 6 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ variable "table_manager_retention_period" {
default = "2160h"
}

variable "kubectl_image_registry" {
description = "The registry holding the kubectl docker image"
type = string
}

variable "kubectl_image_repository" {
description = "The image repository holding the kubectl docker image"
type = string
}

variable "kubectl_image_tag" {
description = "The image tag to use to access the kubectl docker image"
type = string
}


# helm add repo grafana "https://grafana.github.io/helm-charts"
# helm search repo grafana/loki
variable "loki_chart_version" {
Expand All @@ -76,12 +92,6 @@ variable "loki_tag" {
default = "2.8.4"
}

variable "kubectl_image_tag" {
description = "The version of bitnami/kubectl image to use."
type = string
default = "1.27.1"
}

variable "enterprise_logs_provisioner_tag" {
description = "The version of the grafana/enterprise-logs-provisioner image to use."
type = string
Expand Down

0 comments on commit e93cd75

Please sign in to comment.