Skip to content

Commit

Permalink
Ensure journald uses disk instead of memory (#126)
Browse files Browse the repository at this point in the history
  • Loading branch information
hectorhuertas authored May 21, 2020
1 parent 1f40ad9 commit efa287c
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cfssl.tf
Original file line number Diff line number Diff line change
Expand Up @@ -219,4 +219,8 @@ data "ignition_config" "cfssl" {
module.cfssl-restarter.systemd_units,
var.cfssl_additional_systemd_units
)

directories = [
data.ignition_directory.journald.id
]
}
6 changes: 6 additions & 0 deletions common.tf
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,9 @@ data "ignition_file" "kubelet" {
source = "https://storage.googleapis.com/kubernetes-release/release/${var.hyperkube_image_tag}/bin/linux/amd64/kubelet"
}
}

# Dir used by systemd to store logs in disk instead of memory
data "ignition_directory" "journald" {
filesystem = "root"
path = "/var/log/journal"
}
4 changes: 4 additions & 0 deletions etcd.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,4 +160,8 @@ data "ignition_config" "etcd" {
module.etcd-cert-fetcher.systemd_units,
var.etcd_additional_systemd_units
)

directories = [
data.ignition_directory.journald.id
]
}
4 changes: 4 additions & 0 deletions master.tf
Original file line number Diff line number Diff line change
Expand Up @@ -465,4 +465,8 @@ data "ignition_config" "master" {
module.cert-refresh-master.systemd_units,
var.master_additional_systemd_units,
)

directories = [
data.ignition_directory.journald.id
]
}
4 changes: 4 additions & 0 deletions storage-node.tf
Original file line number Diff line number Diff line change
Expand Up @@ -85,4 +85,8 @@ data "ignition_config" "storage-node" {
module.cert-refresh-node.systemd_units,
var.storage_node_additional_systemd_units
)

directories = [
data.ignition_directory.journald.id
]
}
4 changes: 4 additions & 0 deletions worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -67,4 +67,8 @@ data "ignition_config" "worker" {
module.cert-refresh-node.systemd_units,
var.worker_additional_systemd_units
)

directories = [
data.ignition_directory.journald.id
]
}

0 comments on commit efa287c

Please sign in to comment.