forked from GoogleCloudPlatform/magic-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add policycontroller fields to fleet default configs for GKE Hub Feat…
…ure resource (GoogleCloudPlatform#9426)
- Loading branch information
1 parent
6b79d3c
commit a0b6673
Showing
5 changed files
with
438 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
23 changes: 23 additions & 0 deletions
23
mmv1/templates/terraform/examples/enable_fleet_default_member_config_policycontroller.tf.erb
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,23 @@ | ||
resource "google_gke_hub_feature" "feature" { | ||
name = "policycontroller" | ||
location = "global" | ||
fleet_default_member_config { | ||
policycontroller { | ||
policy_controller_hub_config { | ||
install_spec = "INSTALL_SPEC_ENABLED" | ||
exemptable_namespaces = ["foo"] | ||
policy_content { | ||
bundles { | ||
bundle = "policy-essentials-v2022" | ||
exempted_namespaces = ["foo", "bar"] | ||
} | ||
template_library { | ||
installation = "ALL" | ||
} | ||
} | ||
audit_interval_seconds = 30 | ||
referential_rules_enabled = true | ||
} | ||
} | ||
} | ||
} |
20 changes: 20 additions & 0 deletions
20
...s/terraform/examples/enable_fleet_default_member_config_policycontroller_set_empty.tf.erb
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,20 @@ | ||
resource "google_gke_hub_feature" "feature" { | ||
name = "policycontroller" | ||
location = "global" | ||
fleet_default_member_config { | ||
policycontroller { | ||
policy_controller_hub_config { | ||
install_spec = "INSTALL_SPEC_ENABLED" | ||
policy_content {} | ||
constraint_violation_limit = 50 | ||
referential_rules_enabled = true | ||
log_denies_enabled = true | ||
mutation_enabled = true | ||
deployment_configs { | ||
component = "admission" | ||
} | ||
monitoring {} | ||
} | ||
} | ||
} | ||
} |
57 changes: 57 additions & 0 deletions
57
...ates/terraform/examples/enable_fleet_default_member_config_policycontroller_update.tf.erb
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 @@ | ||
resource "google_gke_hub_feature" "feature" { | ||
name = "policycontroller" | ||
location = "global" | ||
fleet_default_member_config { | ||
policycontroller { | ||
policy_controller_hub_config { | ||
install_spec = "INSTALL_SPEC_SUSPENDED" | ||
policy_content { | ||
bundles { | ||
bundle = "pci-dss-v3.2.1" | ||
exempted_namespaces = ["baz", "bar"] | ||
} | ||
bundles { | ||
bundle = "nist-sp-800-190" | ||
exempted_namespaces = [] | ||
} | ||
template_library { | ||
installation = "ALL" | ||
} | ||
} | ||
constraint_violation_limit = 50 | ||
referential_rules_enabled = true | ||
log_denies_enabled = true | ||
mutation_enabled = true | ||
deployment_configs { | ||
component = "admission" | ||
replica_count = 2 | ||
pod_affinity = "ANTI_AFFINITY" | ||
} | ||
deployment_configs { | ||
component = "audit" | ||
container_resources { | ||
limits { | ||
memory = "1Gi" | ||
cpu = "1.5" | ||
} | ||
requests { | ||
memory = "500Mi" | ||
cpu = "150m" | ||
} | ||
} | ||
pod_toleration { | ||
key = "key1" | ||
operator = "Equal" | ||
value = "value1" | ||
effect = "NoSchedule" | ||
} | ||
} | ||
monitoring { | ||
backends = [ | ||
"PROMETHEUS" | ||
] | ||
} | ||
} | ||
} | ||
} | ||
} |
Oops, something went wrong.