Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix ConfigManagement hierarchyController definition #861

Conversation

unlimitedbits
Copy link
Contributor

Hi,

currently the spec.hierarchyController definition is not working for the ConfigManagement template in the acm and config-sync modules.

The PR fixes the following things:

  • hierarchy_controller is renamed to hierarchyController in the resource definition
  • quotation marks added by the yamlencode function are removed
  • correct indentation with more than one entry in the hiearchy_controller variable

Example

With the hierarchy_controller variable defined as:

hierarchy_controller = {
    enabled                         = true
    enablePodTreeLabels             = true
    enableHierarchicalResourceQuota = true
  }

the output with v14.0.1 is as follows:

apiVersion: configmanagement.gke.io/v1
kind: ConfigManagement
metadata:
  name: config-management
spec:
  # clusterName is required and must be unique among all managed clusters
  clusterName: test
  policyController:
    # policyController definitions
  git:
    # git definitions

  hierarchy_controller:
    "enableHierarchicalResourceQuota": true
"enablePodTreeLabels": true
"enabled": true

output with this fix:

apiVersion: configmanagement.gke.io/v1
kind: ConfigManagement
metadata:
  name: config-management
spec:
  # clusterName is required and must be unique among all managed clusters
  clusterName: test
  policyController:
    # policyController definitions
  git:
    # git definitions

  hierarchyController:
    enableHierarchicalResourceQuota: true
    enablePodTreeLabels: true
    enabled: true

@morgante morgante merged commit 062bd5e into terraform-google-modules:master Apr 8, 2021
@unlimitedbits unlimitedbits deleted the acm_hierarchy_controller branch April 8, 2021 16:08
CPL-markus pushed a commit to WALTER-GROUP/terraform-google-kubernetes-engine that referenced this pull request Jul 15, 2024
…rm-google-modules#861)

Co-authored-by: Gabriel Kanatschnig <gabriel.kanatschnig@twinformatics.at>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants