# frozen_string_literal: true # Copyright 2021 Google LLC # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # https://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. # Auto-generated by gapic-generator-ruby. DO NOT EDIT! module Google module Cloud module GkeHub module ConfigManagement module V1 # **Anthos Config Management**: State for a single cluster. # @!attribute [rw] cluster_name # @return [::String] # The user-defined name for the cluster used by ClusterSelectors to group # clusters together. This should match Membership's membership_name, # unless the user installed ACM on the cluster manually prior to enabling # the ACM hub feature. # Unique within a Anthos Config Management installation. # @!attribute [rw] membership_spec # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::MembershipSpec] # Membership configuration in the cluster. This represents the actual state # in the cluster, while the MembershipSpec in the FeatureSpec represents # the intended state # @!attribute [rw] operator_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::OperatorState] # Current install status of ACM's Operator # @!attribute [rw] config_sync_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncState] # Current sync status # @!attribute [rw] policy_controller_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyControllerState] # PolicyController status # @!attribute [rw] hierarchy_controller_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerState] # Hierarchy Controller status class MembershipState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # **Anthos Config Management**: Configuration for a single cluster. # Intended to parallel the ConfigManagement CR. # @!attribute [rw] config_sync # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSync] # Config Sync configuration for the cluster. # @!attribute [rw] policy_controller # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyController] # Policy Controller configuration for the cluster. # @!attribute [rw] hierarchy_controller # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerConfig] # Hierarchy Controller configuration for the cluster. # @!attribute [rw] version # @return [::String] # Version of ACM installed. class MembershipSpec include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for Config Sync # @!attribute [rw] git # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GitConfig] # Git repo configuration for the cluster. # @!attribute [rw] source_format # @return [::String] # Specifies whether the Config Sync Repo is # in “hierarchical” or “unstructured” mode. class ConfigSync include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Git repo configuration for a single cluster. # @!attribute [rw] sync_repo # @return [::String] # The URL of the Git repository to use as the source of truth. # @!attribute [rw] sync_branch # @return [::String] # The branch of the repository to sync from. Default: master. # @!attribute [rw] policy_dir # @return [::String] # The path within the Git repository that represents the top level of the # repo to sync. Default: the root directory of the repository. # @!attribute [rw] sync_wait_secs # @return [::Integer] # Period in seconds between consecutive syncs. Default: 15. # @!attribute [rw] sync_rev # @return [::String] # Git revision (tag or hash) to check out. Default HEAD. # @!attribute [rw] secret_type # @return [::String] # Type of secret configured for access to the Git repo. # @!attribute [rw] https_proxy # @return [::String] # URL for the HTTPS proxy to be used when communicating with the Git repo. # @!attribute [rw] gcp_service_account_email # @return [::String] # The GCP Service Account Email used for auth when secret_type is # gcpServiceAccount. class GitConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for Policy Controller # @!attribute [rw] enabled # @return [::Boolean] # Enables the installation of Policy Controller. # If false, the rest of PolicyController fields take no # effect. # @!attribute [rw] template_library_installed # @return [::Boolean] # Installs the default template library along with Policy Controller. # @!attribute [rw] audit_interval_seconds # @return [::Integer] # Sets the interval for Policy Controller Audit Scans (in seconds). # When set to 0, this disables audit functionality altogether. # @!attribute [rw] exemptable_namespaces # @return [::Array<::String>] # The set of namespaces that are excluded from Policy Controller checks. # Namespaces do not need to currently exist on the cluster. # @!attribute [rw] referential_rules_enabled # @return [::Boolean] # Enables the ability to use Constraint Templates that reference to objects # other than the object currently being evaluated. # @!attribute [rw] log_denies_enabled # @return [::Boolean] # Logs all denies and dry run failures. class PolicyController include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Configuration for Hierarchy Controller # @!attribute [rw] enabled # @return [::Boolean] # Whether Hierarchy Controller is enabled in this cluster. # @!attribute [rw] enable_pod_tree_labels # @return [::Boolean] # Whether pod tree labels are enabled in this cluster. # @!attribute [rw] enable_hierarchical_resource_quota # @return [::Boolean] # Whether hierarchical resource quota is enabled in this cluster. class HierarchyControllerConfig include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Deployment state for Hierarchy Controller # @!attribute [rw] hnc # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # The deployment state for open source HNC (e.g. v0.7.0-hc.0) # @!attribute [rw] extension # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # The deployment state for Hierarchy Controller extension (e.g. v0.7.0-hc.1) class HierarchyControllerDeploymentState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Version for Hierarchy Controller # @!attribute [rw] hnc # @return [::String] # Version for open source HNC # @!attribute [rw] extension # @return [::String] # Version for Hierarchy Controller extension class HierarchyControllerVersion include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State for Hierarchy Controller # @!attribute [rw] version # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerVersion] # The version for Hierarchy Controller # @!attribute [rw] state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::HierarchyControllerDeploymentState] # The deployment state for Hierarchy Controller class HierarchyControllerState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State information for an ACM's Operator # @!attribute [rw] version # @return [::String] # The semenatic version number of the operator # @!attribute [rw] deployment_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # The state of the Operator's deployment # @!attribute [rw] errors # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::InstallError>] # Install errors. class OperatorState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Errors pertaining to the installation of ACM # @!attribute [rw] error_message # @return [::String] # A string representing the user facing error message class InstallError include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State information for ConfigSync # @!attribute [rw] version # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncVersion] # The version of ConfigSync deployed # @!attribute [rw] deployment_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::ConfigSyncDeploymentState] # Information about the deployment of ConfigSync, including the version # of the various Pods deployed # @!attribute [rw] sync_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::SyncState] # The state of ConfigSync's process to sync configs to a cluster class ConfigSyncState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Specific versioning information pertaining to ConfigSync's Pods # @!attribute [rw] importer # @return [::String] # Version of the deployed importer pod # @!attribute [rw] syncer # @return [::String] # Version of the deployed syncer pod # @!attribute [rw] git_sync # @return [::String] # Version of the deployed git-sync pod # @!attribute [rw] monitor # @return [::String] # Version of the deployed monitor pod # @!attribute [rw] reconciler_manager # @return [::String] # Version of the deployed reconciler-manager pod # @!attribute [rw] root_reconciler # @return [::String] # Version of the deployed reconciler container in root-reconciler pod class ConfigSyncVersion include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The state of ConfigSync's deployment on a cluster # @!attribute [rw] importer # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Deployment state of the importer pod # @!attribute [rw] syncer # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Deployment state of the syncer pod # @!attribute [rw] git_sync # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Deployment state of the git-sync pod # @!attribute [rw] monitor # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Deployment state of the monitor pod # @!attribute [rw] reconciler_manager # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Deployment state of reconciler-manager pod # @!attribute [rw] root_reconciler # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Deployment state of root-reconciler class ConfigSyncDeploymentState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State indicating an ACM's progress syncing configurations to a cluster # @!attribute [rw] source_token # @return [::String] # Token indicating the state of the repo. # @!attribute [rw] import_token # @return [::String] # Token indicating the state of the importer. # @!attribute [rw] sync_token # @return [::String] # Token indicating the state of the syncer. # @!attribute [rw] last_sync # @return [::String] # Deprecated: use last_sync_time instead. # Timestamp of when ACM last successfully synced the repo # The time format is specified in https://golang.org/pkg/time/#Time.String # @!attribute [rw] last_sync_time # @return [::Google::Protobuf::Timestamp] # Timestamp type of when ACM last successfully synced the repo # @!attribute [rw] code # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::SyncState::SyncCode] # Sync status code # @!attribute [rw] errors # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::SyncError>] # A list of errors resulting from problematic configs. # This list will be truncated after 100 errors, although it is # unlikely for that many errors to simultaneously exist. class SyncState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods # An enum representing an ACM's status syncing configs to a cluster module SyncCode # ACM cannot determine a sync code SYNC_CODE_UNSPECIFIED = 0 # ACM successfully synced the git Repo with the cluster SYNCED = 1 # ACM is in the progress of syncing a new change PENDING = 2 # Indicates an error configuring ACM, and user action is required ERROR = 3 # ACM has been installed (operator manifest deployed), # but not configured. NOT_CONFIGURED = 4 # ACM has not been installed (no operator pod found) NOT_INSTALLED = 5 # Error authorizing with the cluster UNAUTHORIZED = 6 # Cluster could not be reached UNREACHABLE = 7 end end # An ACM created error representing a problem syncing configurations # @!attribute [rw] code # @return [::String] # An ACM defined error code # @!attribute [rw] error_message # @return [::String] # A description of the error # @!attribute [rw] error_resources # @return [::Array<::Google::Cloud::GkeHub::ConfigManagement::V1::ErrorResource>] # A list of config(s) associated with the error, if any class SyncError include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Model for a config file in the git repo with an associated Sync error # @!attribute [rw] source_path # @return [::String] # Path in the git repo of the erroneous config # @!attribute [rw] resource_name # @return [::String] # Metadata name of the resource that is causing an error # @!attribute [rw] resource_namespace # @return [::String] # Namespace of the resource that is causing an error # @!attribute [rw] resource_gvk # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GroupVersionKind] # Group/version/kind of the resource that is causing an error class ErrorResource include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # A Kubernetes object's GVK # @!attribute [rw] group # @return [::String] # Kubernetes Group # @!attribute [rw] version # @return [::String] # Kubernetes Version # @!attribute [rw] kind # @return [::String] # Kubernetes Kind class GroupVersionKind include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State for PolicyControllerState. # @!attribute [rw] version # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::PolicyControllerVersion] # The version of Gatekeeper Policy Controller deployed. # @!attribute [rw] deployment_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::GatekeeperDeploymentState] # The state about the policy controller installation. class PolicyControllerState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # The build version of Gatekeeper Policy Controller is using. # @!attribute [rw] version # @return [::String] # The gatekeeper image tag that is composed of ACM version, git tag, build # number. class PolicyControllerVersion include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # State of Policy Controller installation. # @!attribute [rw] gatekeeper_controller_manager_state # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Status of gatekeeper-controller-manager pod. # @!attribute [rw] gatekeeper_audit # @return [::Google::Cloud::GkeHub::ConfigManagement::V1::DeploymentState] # Status of gatekeeper-audit deployment. class GatekeeperDeploymentState include ::Google::Protobuf::MessageExts extend ::Google::Protobuf::MessageExts::ClassMethods end # Enum representing the state of an ACM's deployment on a cluster module DeploymentState # Deployment's state cannot be determined DEPLOYMENT_STATE_UNSPECIFIED = 0 # Deployment is not installed NOT_INSTALLED = 1 # Deployment is installed INSTALLED = 2 # Deployment was attempted to be installed, but has errors ERROR = 3 end end end end end end