This repository has been archived by the owner on Dec 15, 2023. It is now read-only.
generated from falcosecurity/template-repository
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow setting pidMode=task in the output task definition
- Loading branch information
Showing
8 changed files
with
175 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
package hocon | ||
|
||
import ( | ||
"github.com/falcosecurity/kilt/pkg/kilt" | ||
"github.com/go-akka/configuration" | ||
) | ||
|
||
func extractTask(config *configuration.Config) (*kilt.Task, error) { | ||
var task = new(kilt.Task) | ||
|
||
if config.HasPath("task.pid_mode") { | ||
task.PidMode = config.GetString("task.pid_mode") | ||
} | ||
|
||
return task, nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
29 changes: 29 additions & 0 deletions
29
runtimes/cloudformation/cfnpatcher/fixtures/task_pid_mode/command.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
{ | ||
"Resources": { | ||
"taskdef": { | ||
"Type": "AWS::ECS::TaskDefinition", | ||
"Properties": { | ||
"RequiresCompatibilities": [ | ||
"FARGATE" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "antani", | ||
"Value": "sbiribuda" | ||
}, | ||
{ | ||
"Key": "kiltinclude", | ||
"Value": "itisignored" | ||
} | ||
], | ||
"ContainerDefinitions": [ | ||
{ | ||
"Name": "app", | ||
"Image": "busybox", | ||
"Command": ["/bin/sh"] | ||
} | ||
] | ||
} | ||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
runtimes/cloudformation/cfnpatcher/fixtures/task_pid_mode/command.patched.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,57 @@ | ||
{ | ||
"Resources": { | ||
"taskdef": { | ||
"Properties": { | ||
"ContainerDefinitions": [ | ||
{ | ||
"Command": [ | ||
"/bin/sh" | ||
], | ||
"EntryPoint": [ | ||
"/kilt/run", | ||
"--", | ||
"" | ||
], | ||
"Image": "busybox", | ||
"LinuxParameters": { | ||
"Capabilities": { | ||
"Add": [ | ||
"SYS_PTRACE" | ||
] | ||
} | ||
}, | ||
"Name": "app", | ||
"VolumesFrom": [ | ||
{ | ||
"ReadOnly": true, | ||
"SourceContainer": "KiltImage" | ||
} | ||
] | ||
}, | ||
{ | ||
"EntryPoint": [ | ||
"/kilt/wait" | ||
], | ||
"Image": "KILT:latest", | ||
"Name": "KiltImage" | ||
} | ||
], | ||
"RequiresCompatibilities": [ | ||
"FARGATE" | ||
], | ||
"Tags": [ | ||
{ | ||
"Key": "antani", | ||
"Value": "sbiribuda" | ||
}, | ||
{ | ||
"Key": "kiltinclude", | ||
"Value": "itisignored" | ||
} | ||
], | ||
"PidMode": "task" | ||
}, | ||
"Type": "AWS::ECS::TaskDefinition" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters