Skip to content

Commit

Permalink
ajust dependancies
Browse files Browse the repository at this point in the history
  • Loading branch information
jdongo-aneo committed Feb 14, 2024
1 parent 814380c commit 7b332d9
Show file tree
Hide file tree
Showing 7 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion armonik/compute-plane.tf
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ resource "kubernetes_deployment" "compute_plane" {
for_each = local.object_storage_adapter == "ArmoniK.Adapters.LocalStorage.ObjectStorage" ? [1] : []
content {
name = "nfs"
mount_path = local.secrets.nfs.path_pod
mount_path = local.local_storage_mount_path
}
}
dynamic "volume_mount" {
Expand Down
2 changes: 1 addition & 1 deletion armonik/control-plane.tf
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ resource "kubernetes_deployment" "control_plane" {
for_each = local.object_storage_adapter == "ArmoniK.Adapters.LocalStorage.ObjectStorage" ? [1] : []
content {
name = "nfs"
mount_path = local.secrets.nfs.path_pod
mount_path = local.local_storage_mount_path
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion armonik/core-configmap.tf
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,6 @@ resource "kubernetes_config_map" "core_config" {
Amqp__Scheme = "AMQPS"
Authenticator__RequireAuthentication = local.authentication_require_authentication
Authenticator__RequireAuthorization = local.authentication_require_authorization
LocalStorage__Path = local.secrets.nfs.path_pod
LocalStorage__Path = local.local_storage_mount_path
}, var.extra_conf.core)
}
6 changes: 3 additions & 3 deletions armonik/locals.tf
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,6 @@ locals {
name = "redis"
ca_filename = "/redis/chain.pem"
}
nfs = {
path_pod = var.mount_pod
}
s3 = var.s3_secret_name
shared_storage = var.shared_storage_secret_name
metrics_exporter = var.metrics_exporter_secret_name
Expand Down Expand Up @@ -269,6 +266,9 @@ locals {
}
}

#nfs
local_storage_mount_path = "/local_storage"

# Configmaps for polling agent
polling_agent_configmaps = {
log = kubernetes_config_map.log_config.metadata[0].name
Expand Down
9 changes: 1 addition & 8 deletions armonik/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -403,15 +403,8 @@ variable "environment_description" {
}

# nfs_parameters

variable "mount_pod" {
description = "Path to which the NFS will be mounted in the pods"
type = string
default = "/local_storage"
}

variable "pvc_name" {
description = "Name for the pvc to be created and used"
description = "Name for the pvc to be used"
type = string
default = "nfsvolume"
}
10 changes: 5 additions & 5 deletions storage/onpremise/nfs/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ resource "kubernetes_storage_class" "nfs_client" {
name = "nfs-client"
}

storage_provisioner = "nfs-provisioner"
storage_provisioner = kubernetes_deployment.nfs_provisioner.metadata[0].name
reclaim_policy = "Delete"
volume_binding_mode = "Immediate"
allow_volume_expansion = true
Expand Down Expand Up @@ -164,7 +164,7 @@ resource "kubernetes_deployment" "nfs_provisioner" {
name = var.image_pull_secrets
}
}
service_account_name = "nfs-client-provisioner"
service_account_name = kubernetes_service_account.nfs_client_provisioner.metadata[0].name
container {
name = "nfs-provisioner"
image = "${var.image}:${var.tag}"
Expand Down Expand Up @@ -252,7 +252,7 @@ resource "kubernetes_deployment" "nfs_provisioner" {
}
}
}

depends_on = [ kubernetes_role_binding.leader_locking_nfs_client_provisioner, kubernetes_cluster_role_binding.run_nfs_client_provisioner ]
}

# Persistent volume claim
Expand All @@ -265,9 +265,9 @@ resource "kubernetes_persistent_volume_claim" "nfs_claim" {
access_modes = ["ReadWriteMany"]
resources {
requests = {
storage = "5Gi"
storage = var.size
}
}
storage_class_name = "nfs-client"
storage_class_name = kubernetes_storage_class.nfs_client.metadata[0].name
}
}
6 changes: 6 additions & 0 deletions storage/onpremise/nfs/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ variable "path" {
description = "path on server"
}

variable "size" {
type = string
description = "storage request size"
default = "5Gi"
}

# Parameters for NFS
variable "image" {
description = "image for the external client provisioner"
Expand Down

0 comments on commit 7b332d9

Please sign in to comment.