Skip to content

Commit

Permalink
Remove folders from logrotate which are handled by shipper (#2379)
Browse files Browse the repository at this point in the history
  • Loading branch information
ramanan-ravi authored Dec 2, 2024
1 parent 73999a6 commit 4ee9f8f
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 77 deletions.
64 changes: 0 additions & 64 deletions deepfence_agent/etc/fenced_logrotate.conf
Original file line number Diff line number Diff line change
@@ -1,21 +1,5 @@
su root root

$DF_INSTALL_DIR/var/log/fenced/*.log {
missingok
notifempty
compress
size 4M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/*.logfile {
missingok
notifempty
compress
size 1M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/supervisor/*.log {
missingok
notifempty
Expand All @@ -24,54 +8,6 @@ $DF_INSTALL_DIR/var/log/supervisor/*.log {
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/secret-scan/*.log {
missingok
notifempty
compress
size 20M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/secret-scan-log/*.log {
missingok
notifempty
compress
size 20M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/malware-scan/*.log {
missingok
notifempty
compress
size 20M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/malware-scan-log/*.log {
missingok
notifempty
compress
size 20M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/compliance/*.log {
missingok
notifempty
compress
size 20M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/fenced/compliance-scan-logs/*.log {
missingok
notifempty
compress
size 20M
copytruncate
rotate 1
}
$DF_INSTALL_DIR/var/log/deepfenced/*.log {
missingok
notifempty
Expand Down
1 change: 1 addition & 0 deletions deepfence_agent/start_agent.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ configure_cron() {
#doesnt work smoothly inside docker!
service cron start
chmod 600 /etc/logrotate.d/fenced_logrotate.conf
sed -i "s/\$DF_INSTALL_DIR/$DF_INSTALL_DIR/g" /etc/logrotate.d/fenced_logrotate.conf
MARK="/etc/logrotate.d/fenced_logrotate.conf"
crontab_output=$(crontab -l)
if [ $(echo "$crontab_output" | grep -ic "$MARK") -eq 0 ]
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/cloudscanner/aws.md
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ provider "aws" {

module "deepfence-cloud-scanner_example_single-account" {
source = "deepfence/cloud-scanner/aws//examples/single-account-ecs"
version = "0.9.0"
version = "0.9.1"
name = "deepfence-cloud-scanner"
# mgmt-console-url: deepfence.customer.com or 22.33.44.55
mgmt-console-url = "<Console URL>"
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/cloudscanner/azure.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ provider "azurerm" {
module "cloud-scanner_example_single-subscription" {
source = "deepfence/cloud-scanner/azure//examples/single-subscription"
version = "0.9.0"
version = "0.9.1"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "443"
deepfence-key = "<Deepfence-key> eg. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
Expand Down Expand Up @@ -59,7 +59,7 @@ provider "azurerm" {
module "cloud-scanner_example_tenant-subscriptions" {
source = "deepfence/cloud-scanner/azure//examples/tenant-subscriptions"
version = "0.9.0"
version = "0.9.1"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
mgmt-console-port = "<Console port> eg. 443"
deepfence-key = "<Deepfence-key> eg. XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
Expand Down Expand Up @@ -123,7 +123,7 @@ data "azurerm_kubernetes_cluster" "default" {
module "cloud-scanner" {
source = "deepfence/cloud-scanner/azure//examples/aks"
version = "0.9.0"
version = "0.9.1"
name = "<name of the app>"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
deepfence-key = "<DEEPFENCE API KEY>"
Expand Down Expand Up @@ -158,7 +158,7 @@ data "azurerm_kubernetes_cluster" "default" {
module "test" {
source = "deepfence/cloud-scanner/azure//examples/aks"
version = "0.9.0"
version = "0.9.1"
name = "<name of the app>"
mgmt-console-url = "<Console URL> eg. XXX.XXX.XX.XXX"
deepfence-key = "<DEEPFENCE API KEY>"
Expand Down Expand Up @@ -204,7 +204,7 @@ module "test" {
module "infrastructure_cloud-scanner-app" {
source = "deepfence/cloud-scanner/azure//modules/infrastructure/cloud-scanner-app"
version = "0.9.0"
version = "0.9.1"
name = "deepfence-cloud-scanner"
subscription_ids_access = [data.azurerm_subscription.current.subscription_id]
}
Expand Down Expand Up @@ -235,7 +235,7 @@ module "test" {
module "infrastructure_cloud-scanner-app" {
source = "deepfence/cloud-scanner/azure//modules/infrastructure/cloud-scanner-app"
version = "0.9.0"
version = "0.9.1"
name = "deepfence-cloud-scanner"
subscription_ids_access = [list of tenant subscriptions ids]
}
Expand Down
12 changes: 6 additions & 6 deletions docs/docs/cloudscanner/gcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Copy and paste the following (single project or multiple projects) into a new fi
```terraform
module "cloud-scanner_example_single-project" {
source = "deepfence/cloud-scanner/gcp//examples/single-project"
version = "0.9.0"
version = "0.9.1"
name = "deepfence-cloud-scanner"
# mgmt-console-url: deepfence.customer.com or 22.33.44.55
mgmt-console-url = "<Console URL>"
Expand Down Expand Up @@ -53,7 +53,7 @@ module "cloud-scanner_example_single-project" {
```terraform
module "cloud-scanner_example_multiple-projects" {
source = "deepfence/cloud-scanner/gcp//examples/multi-project"
version = "0.9.0"
version = "0.9.1"
name = "deepfence-cloud-scanner"
# org_domain: root project name
org_domain = ""
Expand Down Expand Up @@ -128,7 +128,7 @@ data "google_container_cluster" "target_cluster" {
module "cloud_scanner_example_single_project" {
source = "deepfence/cloud-scanner/gcp//examples/gke"
version = "0.9.0"
version = "0.9.1"
gke_host = "https://${data.google_container_cluster.target_cluster.endpoint}"
gke_token = data.google_client_config.current.access_token
gke_cluster_ca_certificate = base64decode(data.google_container_cluster.target_cluster.master_auth[0].cluster_ca_certificate,)
Expand Down Expand Up @@ -164,7 +164,7 @@ data "google_container_cluster" "target_cluster" {
module "cloud_scanner_example_multiple_project" {
source = "deepfence/cloud-scanner/gcp//examples/gke"
version = "0.9.0"
version = "0.9.1"
name = "deepfence-cloud-scanner"
gke_host = "https://${data.google_container_cluster.target_cluster.endpoint}"
gke_token = data.google_client_config.current.access_token
Expand Down Expand Up @@ -214,7 +214,7 @@ module "cloud_scanner_example_multiple_project" {
module "cloud_scanner_example_single_project" {
source = "deepfence/cloud-scanner/gcp//examples/gce-vm"
version = "0.9.0"
version = "0.9.1"
# gcp service account name
name = "deepfence-cloud-scanner"
# project_id example: dev1-123456
Expand All @@ -233,7 +233,7 @@ module "cloud_scanner_example_multiple_project" {
module "cloud_scanner_example_multiple_project" {
source = "deepfence/cloud-scanner/gcp//examples/gce-vm"
version = "0.9.0"
version = "0.9.1"
# gcp service account name
name = "deepfence-cloud-scanner"
# project_id example: dev1-123456
Expand Down

0 comments on commit 4ee9f8f

Please sign in to comment.