Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added docker containers log limit #2

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions cloud-init/config-docker-daemon-json.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
---
# Create the file (/etc/docker/daemon.json) used to configure Docker daemon.
# For details, see https://docs.docker.com/config/daemon/systemd/
write_files:
- path: "/etc/docker/daemon.json"
permissions: "0644"
owner: root:root
content: |
{
"log-driver": "json-file",
"log-opts": {"max-size": "5000m", "max-file": "2"}
}
1 change: 1 addition & 0 deletions cluster.tf
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ resource "rancher2_node_template" "hetzner" {
server_type = each.value.server_type
networks = var.management_network_id
use_private_network = each.value.use_private_network
userdata = "${path.module}/cloud-init/config-docker-daemon-json.yaml"
}
labels = merge({
"cluster-name" = var.cluster_name
Expand Down
Loading