Add example to FAST GKE stage, streamline GKE Hub module variables and usage (#1977)
* implement optionals in gke-hub module * simplify gke hub module call in mc mesh blueprint * simplify gke hub module call and variables in multitenant blueprint * gke hub inventory * provide cluster and fleet examples in stage
This commit is contained in:
committed by
GitHub
parent
d62012cebc
commit
11d7edac64
@@ -75,29 +75,17 @@ module "hub" {
|
||||
cluster-1 = module.cluster_1.id
|
||||
}
|
||||
features = {
|
||||
appdevexperience = false
|
||||
configmanagement = true
|
||||
identityservice = false
|
||||
multiclusteringress = null
|
||||
servicemesh = false
|
||||
multiclusterservicediscovery = false
|
||||
configmanagement = true
|
||||
}
|
||||
configmanagement_templates = {
|
||||
default = {
|
||||
binauthz = false
|
||||
config_sync = {
|
||||
git = {
|
||||
gcp_service_account_email = null
|
||||
https_proxy = null
|
||||
policy_dir = "configsync"
|
||||
secret_type = "none"
|
||||
source_format = "hierarchy"
|
||||
sync_branch = "main"
|
||||
sync_repo = "https://github.com/danielmarzini/configsync-platform-example"
|
||||
sync_rev = null
|
||||
sync_wait_secs = null
|
||||
policy_dir = "configsync"
|
||||
source_format = "hierarchy"
|
||||
sync_branch = "main"
|
||||
sync_repo = "https://github.com/danielmarzini/configsync-platform-example"
|
||||
}
|
||||
prevent_drift = false
|
||||
source_format = "hierarchy"
|
||||
}
|
||||
hierarchy_controller = {
|
||||
@@ -106,7 +94,6 @@ module "hub" {
|
||||
}
|
||||
policy_controller = {
|
||||
audit_interval_seconds = 120
|
||||
exemptable_namespaces = []
|
||||
log_denies_enabled = true
|
||||
referential_rules_enabled = true
|
||||
template_library_installed = true
|
||||
@@ -317,22 +304,20 @@ module "hub" {
|
||||
# tftest modules=8 resources=34
|
||||
```
|
||||
<!-- BEGIN TFDOC -->
|
||||
|
||||
## Variables
|
||||
|
||||
| name | description | type | required | default |
|
||||
|---|---|:---:|:---:|:---:|
|
||||
| [project_id](variables.tf#L87) | GKE hub project ID. | <code>string</code> | ✓ | |
|
||||
| [project_id](variables.tf#L80) | GKE hub project ID. | <code>string</code> | ✓ | |
|
||||
| [clusters](variables.tf#L17) | Clusters members of this GKE Hub in name => id format. | <code>map(string)</code> | | <code>{}</code> |
|
||||
| [configmanagement_clusters](variables.tf#L24) | Config management features enabled on specific sets of member clusters, in config name => [cluster name] format. | <code>map(list(string))</code> | | <code>{}</code> |
|
||||
| [configmanagement_templates](variables.tf#L31) | Sets of config management configurations that can be applied to member clusters, in config name => {options} format. | <code title="map(object({ binauthz = bool config_sync = object({ git = object({ gcp_service_account_email = string https_proxy = string policy_dir = string secret_type = string sync_branch = string sync_repo = string sync_rev = string sync_wait_secs = number }) prevent_drift = string source_format = string }) hierarchy_controller = object({ enable_hierarchical_resource_quota = bool enable_pod_tree_labels = bool }) policy_controller = object({ audit_interval_seconds = number exemptable_namespaces = list(string) log_denies_enabled = bool referential_rules_enabled = bool template_library_installed = bool }) version = string }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [features](variables.tf#L66) | Enable and configure fleet features. | <code title="object({ appdevexperience = optional(bool, false) configmanagement = optional(bool, false) identityservice = optional(bool, false) multiclusteringress = optional(string, null) multiclusterservicediscovery = optional(bool, false) servicemesh = optional(bool, false) })">object({…})</code> | | <code title="{ appdevexperience = false configmanagement = false identityservice = false multiclusteringress = null servicemesh = false multiclusterservicediscovery = false }">{…}</code> |
|
||||
| [workload_identity_clusters](variables.tf#L92) | Clusters that will use Fleet Workload Identity. | <code>list(string)</code> | | <code>[]</code> |
|
||||
| [configmanagement_templates](variables.tf#L31) | Sets of config management configurations that can be applied to member clusters, in config name => {options} format. | <code title="map(object({ binauthz = optional(bool) version = optional(string) config_sync = object({ git = optional(object({ sync_repo = string policy_dir = string gcp_service_account_email = optional(string) https_proxy = optional(string) secret_type = optional(string, "none") sync_branch = optional(string) sync_rev = optional(string) sync_wait_secs = optional(number) })) prevent_drift = optional(bool) source_format = optional(string, "hierarchy") }) hierarchy_controller = optional(object({ enable_hierarchical_resource_quota = optional(bool) enable_pod_tree_labels = optional(bool) })) policy_controller = object({ audit_interval_seconds = optional(number) exemptable_namespaces = optional(list(string)) log_denies_enabled = optional(bool) referential_rules_enabled = optional(bool) template_library_installed = optional(bool) }) }))">map(object({…}))</code> | | <code>{}</code> |
|
||||
| [features](variables.tf#L66) | Enable and configure fleet features. | <code title="object({ appdevexperience = optional(bool, false) configmanagement = optional(bool, false) identityservice = optional(bool, false) multiclusteringress = optional(string, null) multiclusterservicediscovery = optional(bool, false) servicemesh = optional(bool, false) })">object({…})</code> | | <code>{}</code> |
|
||||
| [workload_identity_clusters](variables.tf#L85) | Clusters that will use Fleet Workload Identity. | <code>list(string)</code> | | <code>[]</code> |
|
||||
|
||||
## Outputs
|
||||
|
||||
| name | description | sensitive |
|
||||
|---|---|:---:|
|
||||
| [cluster_ids](outputs.tf#L17) | Fully qualified ids of all clusters. | |
|
||||
|
||||
<!-- END TFDOC -->
|
||||
|
||||
@@ -31,33 +31,33 @@ variable "configmanagement_clusters" {
|
||||
variable "configmanagement_templates" {
|
||||
description = "Sets of config management configurations that can be applied to member clusters, in config name => {options} format."
|
||||
type = map(object({
|
||||
binauthz = bool
|
||||
binauthz = optional(bool)
|
||||
version = optional(string)
|
||||
config_sync = object({
|
||||
git = object({
|
||||
gcp_service_account_email = string
|
||||
https_proxy = string
|
||||
policy_dir = string
|
||||
secret_type = string
|
||||
sync_branch = string
|
||||
git = optional(object({
|
||||
sync_repo = string
|
||||
sync_rev = string
|
||||
sync_wait_secs = number
|
||||
})
|
||||
prevent_drift = string
|
||||
source_format = string
|
||||
})
|
||||
hierarchy_controller = object({
|
||||
enable_hierarchical_resource_quota = bool
|
||||
enable_pod_tree_labels = bool
|
||||
policy_dir = string
|
||||
gcp_service_account_email = optional(string)
|
||||
https_proxy = optional(string)
|
||||
secret_type = optional(string, "none")
|
||||
sync_branch = optional(string)
|
||||
sync_rev = optional(string)
|
||||
sync_wait_secs = optional(number)
|
||||
}))
|
||||
prevent_drift = optional(bool)
|
||||
source_format = optional(string, "hierarchy")
|
||||
})
|
||||
hierarchy_controller = optional(object({
|
||||
enable_hierarchical_resource_quota = optional(bool)
|
||||
enable_pod_tree_labels = optional(bool)
|
||||
}))
|
||||
policy_controller = object({
|
||||
audit_interval_seconds = number
|
||||
exemptable_namespaces = list(string)
|
||||
log_denies_enabled = bool
|
||||
referential_rules_enabled = bool
|
||||
template_library_installed = bool
|
||||
audit_interval_seconds = optional(number)
|
||||
exemptable_namespaces = optional(list(string))
|
||||
log_denies_enabled = optional(bool)
|
||||
referential_rules_enabled = optional(bool)
|
||||
template_library_installed = optional(bool)
|
||||
})
|
||||
version = string
|
||||
}))
|
||||
default = {}
|
||||
nullable = false
|
||||
@@ -73,14 +73,7 @@ variable "features" {
|
||||
multiclusterservicediscovery = optional(bool, false)
|
||||
servicemesh = optional(bool, false)
|
||||
})
|
||||
default = {
|
||||
appdevexperience = false
|
||||
configmanagement = false
|
||||
identityservice = false
|
||||
multiclusteringress = null
|
||||
servicemesh = false
|
||||
multiclusterservicediscovery = false
|
||||
}
|
||||
default = {}
|
||||
nullable = false
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user