| // 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 |
| // |
| // http://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. |
| |
| // Protobuf definitions for the instance configuration sent by an update manager |
| // to COS Policy Manager. It will translate the instance configuration to device |
| // policy that can help us to determine the state of other services. |
| syntax = "proto2"; |
| |
| package protos; |
| // option go_package = "policy_manager/protos"; |
| |
| // HealthMonitorConfig contains all the necessary fields for policy manager to store any |
| // information related to the configuration of HealthMonitor logging/monitoring. |
| message HealthMonitorConfig { |
| // enforced is set to true if policy manager should enforce the HealthMonitoring logging and |
| // monitoring to the instance. |
| optional bool enforced = 1; |
| |
| // logging_enabled is set to true if the instance should report logs |
| // to google cloud logging backend. |
| optional bool logging_enabled = 2; |
| |
| // monitoring_enabled is set to true if the instance should report |
| // monitoring statistics to google cloud monitoring backend. |
| optional bool monitoring_enabled = 3; |
| } |
| |
| // InstanceConfig contains the details necessary for configuring the instance. |
| // This proto is used in following places: |
| // (1) In user specified GCE Metadata - User can specify JSON formatted |
| // InstanceConfig in GCE metadata which is fetched and parsed by COS Policy |
| // Manager. |
| // (2) From Policy Manager to API Server - Policy Manager sends this InstanceConfig |
| // as 'user_config' argument to the GetInstanceConfig() call. |
| // (3) From API Server to COS Policy Manager client - in response to GetInstanceConfig() |
| // call, the server sends the actual InstanceConfig to be applied on the |
| // COS instance. |
| message InstanceConfig { |
| // update_strategy specified configuration about update engine selected. The values can be |
| // "update_disabled" or ""(default; will enable the update engine to run). |
| optional string update_strategy = 1; |
| |
| // metrics_enabled specified configuration about metrics component used in crash reporter |
| // service. |
| optional bool metrics_enabled = 2; |
| |
| // health_monitor_config specifies configuration about health logging/monitoring. |
| optional HealthMonitorConfig health_monitor_config = 3; |
| |
| // Next number: 4 |
| } |