-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure templates ready for running containers as non-root
- Loading branch information
Meluleki Dube
committed
Sep 19, 2023
1 parent
3fc1a47
commit 0b7a913
Showing
8 changed files
with
144 additions
and
20 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
Empty file.
Empty file.
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,62 @@ | ||
# | ||
# Copyright (c) Meta Platforms, Inc. and affiliates. | ||
|
||
# This source code is licensed under the MIT license found in the | ||
# LICENSE file in the root directory of this source tree. | ||
# | ||
|
||
# WhatsApp Business API GCP Template Version 1.0.0 | ||
|
||
# General Configuration | ||
|
||
resource "kubernetes_pod_security_policy_v1beta1" "common_security_policy" { | ||
metadata { | ||
name = "common-security-policy" | ||
} | ||
|
||
spec { | ||
privileged = false | ||
allow_privilege_escalation = false | ||
|
||
volumes = [ | ||
"*" | ||
] | ||
|
||
run_as_user { | ||
rule = "MustRunAs" | ||
range { | ||
min = var.user_id | ||
max = var.user_id | ||
} | ||
} | ||
|
||
se_linux { | ||
rule = "RunAsAny" | ||
} | ||
|
||
run_as_group { | ||
rule = "MustRunAs" | ||
range { | ||
min = var.group_id | ||
max = var.group_id | ||
} | ||
} | ||
|
||
supplemental_groups { | ||
rule = "MustRunAs" | ||
range { | ||
min = var.supp_group_min | ||
max = var.supp_group_max | ||
} | ||
} | ||
|
||
fs_group { | ||
rule = "MustRunAs" | ||
range { | ||
min = var.user_id | ||
max = var.user_id | ||
} | ||
} | ||
read_only_root_filesystem = true | ||
} | ||
} |
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
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