INNER CODE UNIT · Go
run
kubearmor/KubeArmor · deployments/podman/Hook/main.go:147
func run(state specs.State) error {
var container types.Container
operation := types.HookContainerCreate
// we try to connect to runtime here to make sure the socket is correct
// before spawning a detached process
_, err := newPodmanHandler(runtimeSocket)
if err != nil {
return err
}
container.ContainerID = state.ID
if state.Status == specs.StateStopped {
operation = types.HookContainerDelete
return sendContainer(container, operation)
}
var appArmorProfile string
var isKubeArmor bool