Class HubConfig (1.54.0)

public final class HubConfig extends GeneratedMessageV3 implements HubConfigOrBuilder

Configuration for Policy Controller

Protobuf type google.cloud.gkehub.policycontroller.v1beta.HubConfig

Implements

HubConfigOrBuilder

Static Fields

AUDIT_INTERVAL_SECONDS_FIELD_NUMBER

public static final int AUDIT_INTERVAL_SECONDS_FIELD_NUMBER
Field Value
Type Description
int

CONSTRAINT_VIOLATION_LIMIT_FIELD_NUMBER

public static final int CONSTRAINT_VIOLATION_LIMIT_FIELD_NUMBER
Field Value
Type Description
int

DEPLOYMENT_CONFIGS_FIELD_NUMBER

public static final int DEPLOYMENT_CONFIGS_FIELD_NUMBER
Field Value
Type Description
int

EXEMPTABLE_NAMESPACES_FIELD_NUMBER

public static final int EXEMPTABLE_NAMESPACES_FIELD_NUMBER
Field Value
Type Description
int

INSTALL_SPEC_FIELD_NUMBER

public static final int INSTALL_SPEC_FIELD_NUMBER
Field Value
Type Description
int

LOG_DENIES_ENABLED_FIELD_NUMBER

public static final int LOG_DENIES_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

MONITORING_FIELD_NUMBER

public static final int MONITORING_FIELD_NUMBER
Field Value
Type Description
int

MUTATION_ENABLED_FIELD_NUMBER

public static final int MUTATION_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

POLICY_CONTENT_FIELD_NUMBER

public static final int POLICY_CONTENT_FIELD_NUMBER
Field Value
Type Description
int

REFERENTIAL_RULES_ENABLED_FIELD_NUMBER

public static final int REFERENTIAL_RULES_ENABLED_FIELD_NUMBER
Field Value
Type Description
int

Static Methods

getDefaultInstance()

public static HubConfig getDefaultInstance()
Returns
Type Description
HubConfig

getDescriptor()

public static final Descriptors.Descriptor getDescriptor()
Returns
Type Description
Descriptor

newBuilder()

public static HubConfig.Builder newBuilder()
Returns
Type Description
HubConfig.Builder

newBuilder(HubConfig prototype)

public static HubConfig.Builder newBuilder(HubConfig prototype)
Parameter
Name Description
prototype HubConfig
Returns
Type Description
HubConfig.Builder

parseDelimitedFrom(InputStream input)

public static HubConfig parseDelimitedFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HubConfig
Exceptions
Type Description
IOException

parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HubConfig parseDelimitedFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HubConfig
Exceptions
Type Description
IOException

parseFrom(byte[] data)

public static HubConfig parseFrom(byte[] data)
Parameter
Name Description
data byte[]
Returns
Type Description
HubConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)

public static HubConfig parseFrom(byte[] data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data byte[]
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HubConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data)

public static HubConfig parseFrom(ByteString data)
Parameter
Name Description
data ByteString
Returns
Type Description
HubConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)

public static HubConfig parseFrom(ByteString data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteString
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HubConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(CodedInputStream input)

public static HubConfig parseFrom(CodedInputStream input)
Parameter
Name Description
input CodedInputStream
Returns
Type Description
HubConfig
Exceptions
Type Description
IOException

parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)

public static HubConfig parseFrom(CodedInputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input CodedInputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HubConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input)

public static HubConfig parseFrom(InputStream input)
Parameter
Name Description
input InputStream
Returns
Type Description
HubConfig
Exceptions
Type Description
IOException

parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)

public static HubConfig parseFrom(InputStream input, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
input InputStream
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HubConfig
Exceptions
Type Description
IOException

parseFrom(ByteBuffer data)

public static HubConfig parseFrom(ByteBuffer data)
Parameter
Name Description
data ByteBuffer
Returns
Type Description
HubConfig
Exceptions
Type Description
InvalidProtocolBufferException

parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)

public static HubConfig parseFrom(ByteBuffer data, ExtensionRegistryLite extensionRegistry)
Parameters
Name Description
data ByteBuffer
extensionRegistry ExtensionRegistryLite
Returns
Type Description
HubConfig
Exceptions
Type Description
InvalidProtocolBufferException

parser()

public static Parser<HubConfig> parser()
Returns
Type Description
Parser<HubConfig>

Methods

containsDeploymentConfigs(String key)

public boolean containsDeploymentConfigs(String key)

Map of deployment configs to deployments ("admission", "audit", "mutation').

map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;

Parameter
Name Description
key String
Returns
Type Description
boolean

equals(Object obj)

public boolean equals(Object obj)
Parameter
Name Description
obj Object
Returns
Type Description
boolean
Overrides

getAuditIntervalSeconds()

public long getAuditIntervalSeconds()

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

optional int64 audit_interval_seconds = 2;

Returns
Type Description
long

The auditIntervalSeconds.

getConstraintViolationLimit()

public long getConstraintViolationLimit()

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

optional int64 constraint_violation_limit = 10;

Returns
Type Description
long

The constraintViolationLimit.

getDefaultInstanceForType()

public HubConfig getDefaultInstanceForType()
Returns
Type Description
HubConfig

getDeploymentConfigs() (deprecated)

public Map<String,PolicyControllerDeploymentConfig> getDeploymentConfigs()
Returns
Type Description
Map<String,PolicyControllerDeploymentConfig>

getDeploymentConfigsCount()

public int getDeploymentConfigsCount()

Map of deployment configs to deployments ("admission", "audit", "mutation').

map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;

Returns
Type Description
int

getDeploymentConfigsMap()

public Map<String,PolicyControllerDeploymentConfig> getDeploymentConfigsMap()

Map of deployment configs to deployments ("admission", "audit", "mutation').

map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;

Returns
Type Description
Map<String,PolicyControllerDeploymentConfig>

getDeploymentConfigsOrDefault(String key, PolicyControllerDeploymentConfig defaultValue)

public PolicyControllerDeploymentConfig getDeploymentConfigsOrDefault(String key, PolicyControllerDeploymentConfig defaultValue)

Map of deployment configs to deployments ("admission", "audit", "mutation').

map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;

Parameters
Name Description
key String
defaultValue PolicyControllerDeploymentConfig
Returns
Type Description
PolicyControllerDeploymentConfig

getDeploymentConfigsOrThrow(String key)

public PolicyControllerDeploymentConfig getDeploymentConfigsOrThrow(String key)

Map of deployment configs to deployments ("admission", "audit", "mutation').

map<string, .google.cloud.gkehub.policycontroller.v1beta.PolicyControllerDeploymentConfig> deployment_configs = 11;

Parameter
Name Description
key String
Returns
Type Description
PolicyControllerDeploymentConfig

getExemptableNamespaces(int index)

public String getExemptableNamespaces(int index)

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

repeated string exemptable_namespaces = 3;

Parameter
Name Description
index int

The index of the element to return.

Returns
Type Description
String

The exemptableNamespaces at the given index.

getExemptableNamespacesBytes(int index)

public ByteString getExemptableNamespacesBytes(int index)

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

repeated string exemptable_namespaces = 3;

Parameter
Name Description
index int

The index of the value to return.

Returns
Type Description
ByteString

The bytes of the exemptableNamespaces at the given index.

getExemptableNamespacesCount()

public int getExemptableNamespacesCount()

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

repeated string exemptable_namespaces = 3;

Returns
Type Description
int

The count of exemptableNamespaces.

getExemptableNamespacesList()

public ProtocolStringList getExemptableNamespacesList()

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

repeated string exemptable_namespaces = 3;

Returns
Type Description
ProtocolStringList

A list containing the exemptableNamespaces.

getInstallSpec()

public HubConfig.InstallSpec getInstallSpec()

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.

.google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;

Returns
Type Description
HubConfig.InstallSpec

The installSpec.

getInstallSpecValue()

public int getInstallSpecValue()

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.

.google.cloud.gkehub.policycontroller.v1beta.HubConfig.InstallSpec install_spec = 1;

Returns
Type Description
int

The enum numeric value on the wire for installSpec.

getLogDeniesEnabled()

public boolean getLogDeniesEnabled()

Logs all denies and dry run failures.

bool log_denies_enabled = 5;

Returns
Type Description
boolean

The logDeniesEnabled.

getMonitoring()

public MonitoringConfig getMonitoring()

Monitoring specifies the configuration of monitoring.

optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;

Returns
Type Description
MonitoringConfig

The monitoring.

getMonitoringOrBuilder()

public MonitoringConfigOrBuilder getMonitoringOrBuilder()

Monitoring specifies the configuration of monitoring.

optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;

Returns
Type Description
MonitoringConfigOrBuilder

getMutationEnabled()

public boolean getMutationEnabled()

Enables the ability to mutate resources using Policy Controller.

bool mutation_enabled = 6;

Returns
Type Description
boolean

The mutationEnabled.

getParserForType()

public Parser<HubConfig> getParserForType()
Returns
Type Description
Parser<HubConfig>
Overrides

getPolicyContent()

public PolicyContentSpec getPolicyContent()

Specifies the desired policy content on the cluster

optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;

Returns
Type Description
PolicyContentSpec

The policyContent.

getPolicyContentOrBuilder()

public PolicyContentSpecOrBuilder getPolicyContentOrBuilder()

Specifies the desired policy content on the cluster

optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;

Returns
Type Description
PolicyContentSpecOrBuilder

getReferentialRulesEnabled()

public boolean getReferentialRulesEnabled()

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

bool referential_rules_enabled = 4;

Returns
Type Description
boolean

The referentialRulesEnabled.

getSerializedSize()

public int getSerializedSize()
Returns
Type Description
int
Overrides

hasAuditIntervalSeconds()

public boolean hasAuditIntervalSeconds()

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

optional int64 audit_interval_seconds = 2;

Returns
Type Description
boolean

Whether the auditIntervalSeconds field is set.

hasConstraintViolationLimit()

public boolean hasConstraintViolationLimit()

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

optional int64 constraint_violation_limit = 10;

Returns
Type Description
boolean

Whether the constraintViolationLimit field is set.

hasMonitoring()

public boolean hasMonitoring()

Monitoring specifies the configuration of monitoring.

optional .google.cloud.gkehub.policycontroller.v1beta.MonitoringConfig monitoring = 8;

Returns
Type Description
boolean

Whether the monitoring field is set.

hasPolicyContent()

public boolean hasPolicyContent()

Specifies the desired policy content on the cluster

optional .google.cloud.gkehub.policycontroller.v1beta.PolicyContentSpec policy_content = 9;

Returns
Type Description
boolean

Whether the policyContent field is set.

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides

internalGetFieldAccessorTable()

protected GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Returns
Type Description
FieldAccessorTable
Overrides

internalGetMapFieldReflection(int number)

protected MapFieldReflectionAccessor internalGetMapFieldReflection(int number)
Parameter
Name Description
number int
Returns
Type Description
com.google.protobuf.MapFieldReflectionAccessor
Overrides
com.google.protobuf.GeneratedMessageV3.internalGetMapFieldReflection(int)

isInitialized()

public final boolean isInitialized()
Returns
Type Description
boolean
Overrides

newBuilderForType()

public HubConfig.Builder newBuilderForType()
Returns
Type Description
HubConfig.Builder

newBuilderForType(GeneratedMessageV3.BuilderParent parent)

protected HubConfig.Builder newBuilderForType(GeneratedMessageV3.BuilderParent parent)
Parameter
Name Description
parent BuilderParent
Returns
Type Description
HubConfig.Builder
Overrides

newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)

protected Object newInstance(GeneratedMessageV3.UnusedPrivateParameter unused)
Parameter
Name Description
unused UnusedPrivateParameter
Returns
Type Description
Object
Overrides

toBuilder()

public HubConfig.Builder toBuilder()
Returns
Type Description
HubConfig.Builder

writeTo(CodedOutputStream output)

public void writeTo(CodedOutputStream output)
Parameter
Name Description
output CodedOutputStream
Overrides
Exceptions
Type Description
IOException