Class: Google::Apis::GkehubV2::PolicyControllerHubConfig

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/gkehub_v2/classes.rb,
lib/google/apis/gkehub_v2/representations.rb,
lib/google/apis/gkehub_v2/representations.rb

Overview

Configuration for Policy Controller

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ PolicyControllerHubConfig

Returns a new instance of PolicyControllerHubConfig.



2792
2793
2794
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2792

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#audit_interval_secondsFixnum

Sets the interval for Policy Controller Audit Scans (in seconds). When set to 0, this disables audit functionality altogether. Corresponds to the JSON property auditIntervalSeconds

Returns:

  • (Fixnum)


2733
2734
2735
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2733

def audit_interval_seconds
  @audit_interval_seconds
end

#constraint_violation_limitFixnum

The maximum number of audit violations to be stored in a constraint. If not set, the internal default (currently 20) will be used. Corresponds to the JSON property constraintViolationLimit

Returns:

  • (Fixnum)


2739
2740
2741
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2739

def constraint_violation_limit
  @constraint_violation_limit
end

#deployment_configsHash<String,Google::Apis::GkehubV2::PolicyControllerPolicyControllerDeploymentConfig>

Map of deployment configs to deployments (“admission”, “audit”, “mutation”). Corresponds to the JSON property deploymentConfigs



2744
2745
2746
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2744

def deployment_configs
  @deployment_configs
end

#exemptable_namespacesArray<String>

The set of namespaces that are excluded from Policy Controller checks. Namespaces do not need to currently exist on the cluster. Corresponds to the JSON property exemptableNamespaces

Returns:

  • (Array<String>)


2750
2751
2752
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2750

def exemptable_namespaces
  @exemptable_namespaces
end

#install_specString

The install_spec represents the intended state specified by the latest request that mutated install_spec in the feature spec, not the lifecycle state of the feature observed by the Hub feature controller that is reported in the feature state. Corresponds to the JSON property installSpec

Returns:

  • (String)


2758
2759
2760
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2758

def install_spec
  @install_spec
end

#log_denies_enabledBoolean Also known as: log_denies_enabled?

Logs all denies and dry run failures. Corresponds to the JSON property logDeniesEnabled

Returns:

  • (Boolean)


2763
2764
2765
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2763

def log_denies_enabled
  @log_denies_enabled
end

#monitoringGoogle::Apis::GkehubV2::PolicyControllerMonitoringConfig

MonitoringConfig specifies the backends Policy Controller should export metrics to. For example, to specify metrics should be exported to Cloud Monitoring and Prometheus, specify backends: ["cloudmonitoring", "prometheus"] Corresponds to the JSON property monitoring



2771
2772
2773
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2771

def monitoring
  @monitoring
end

#mutation_enabledBoolean Also known as: mutation_enabled?

Enables the ability to mutate resources using Policy Controller. Corresponds to the JSON property mutationEnabled

Returns:

  • (Boolean)


2776
2777
2778
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2776

def mutation_enabled
  @mutation_enabled
end

#policy_contentGoogle::Apis::GkehubV2::PolicyControllerPolicyContentSpec

PolicyContentSpec defines the user's desired content configuration on the cluster. Corresponds to the JSON property policyContent



2783
2784
2785
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2783

def policy_content
  @policy_content
end

#referential_rules_enabledBoolean Also known as: referential_rules_enabled?

Enables the ability to use Constraint Templates that reference to objects other than the object currently being evaluated. Corresponds to the JSON property referentialRulesEnabled

Returns:

  • (Boolean)


2789
2790
2791
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2789

def referential_rules_enabled
  @referential_rules_enabled
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



2797
2798
2799
2800
2801
2802
2803
2804
2805
2806
2807
2808
# File 'lib/google/apis/gkehub_v2/classes.rb', line 2797

def update!(**args)
  @audit_interval_seconds = args[:audit_interval_seconds] if args.key?(:audit_interval_seconds)
  @constraint_violation_limit = args[:constraint_violation_limit] if args.key?(:constraint_violation_limit)
  @deployment_configs = args[:deployment_configs] if args.key?(:deployment_configs)
  @exemptable_namespaces = args[:exemptable_namespaces] if args.key?(:exemptable_namespaces)
  @install_spec = args[:install_spec] if args.key?(:install_spec)
  @log_denies_enabled = args[:log_denies_enabled] if args.key?(:log_denies_enabled)
  @monitoring = args[:monitoring] if args.key?(:monitoring)
  @mutation_enabled = args[:mutation_enabled] if args.key?(:mutation_enabled)
  @policy_content = args[:policy_content] if args.key?(:policy_content)
  @referential_rules_enabled = args[:referential_rules_enabled] if args.key?(:referential_rules_enabled)
end