mirror of
https://github.com/TeaOSLab/EdgeCommon.git
synced 2025-11-12 11:20:26 +08:00
尝试自动在firewalld中开放端口
This commit is contained in:
@@ -50,6 +50,7 @@ type NodeConfig struct {
|
||||
SystemServices map[string]maps.Map `yaml:"systemServices" json:"systemServices"` // 系统服务配置 type => params
|
||||
FirewallActions []*firewallconfigs.FirewallActionConfig `yaml:"firewallActions" json:"firewallActions"`
|
||||
TimeZone string `yaml:"timeZone" json:"timeZone"`
|
||||
AutoOpenPorts bool `yaml:"autoOpenPorts" json:"autoOpenPorts"`
|
||||
|
||||
MetricItems []*serverconfigs.MetricItemConfig `yaml:"metricItems" json:"metricItems"`
|
||||
|
||||
|
||||
@@ -45,6 +45,7 @@ type NodeCluster struct {
|
||||
TimeZone string `protobuf:"bytes,13,opt,name=timeZone,proto3" json:"timeZone,omitempty"`
|
||||
NodeMaxThreads int32 `protobuf:"varint,14,opt,name=nodeMaxThreads,proto3" json:"nodeMaxThreads,omitempty"`
|
||||
NodeTCPMaxConnections int32 `protobuf:"varint,15,opt,name=nodeTCPMaxConnections,proto3" json:"nodeTCPMaxConnections,omitempty"`
|
||||
AutoOpenPorts bool `protobuf:"varint,16,opt,name=autoOpenPorts,proto3" json:"autoOpenPorts,omitempty"`
|
||||
}
|
||||
|
||||
func (x *NodeCluster) Reset() {
|
||||
@@ -184,12 +185,19 @@ func (x *NodeCluster) GetNodeTCPMaxConnections() int32 {
|
||||
return 0
|
||||
}
|
||||
|
||||
func (x *NodeCluster) GetAutoOpenPorts() bool {
|
||||
if x != nil {
|
||||
return x.AutoOpenPorts
|
||||
}
|
||||
return false
|
||||
}
|
||||
|
||||
var File_models_model_node_cluster_proto protoreflect.FileDescriptor
|
||||
|
||||
var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x0a, 0x1f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x73, 0x2f, 0x6d, 0x6f, 0x64, 0x65, 0x6c, 0x5f, 0x6e,
|
||||
0x6f, 0x64, 0x65, 0x5f, 0x63, 0x6c, 0x75, 0x73, 0x74, 0x65, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0xf1, 0x03, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x6f, 0x12, 0x02, 0x70, 0x62, 0x22, 0x97, 0x04, 0x0a, 0x0b, 0x4e, 0x6f, 0x64, 0x65, 0x43, 0x6c,
|
||||
0x75, 0x73, 0x74, 0x65, 0x72, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
|
||||
0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20,
|
||||
0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x63, 0x72, 0x65,
|
||||
@@ -220,8 +228,10 @@ var file_models_model_node_cluster_proto_rawDesc = []byte{
|
||||
0x61, 0x64, 0x73, 0x12, 0x34, 0x0a, 0x15, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x43, 0x50, 0x4d, 0x61,
|
||||
0x78, 0x43, 0x6f, 0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0f, 0x20, 0x01,
|
||||
0x28, 0x05, 0x52, 0x15, 0x6e, 0x6f, 0x64, 0x65, 0x54, 0x43, 0x50, 0x4d, 0x61, 0x78, 0x43, 0x6f,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x42, 0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70,
|
||||
0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
0x6e, 0x6e, 0x65, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x24, 0x0a, 0x0d, 0x61, 0x75, 0x74,
|
||||
0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x10, 0x20, 0x01, 0x28, 0x08,
|
||||
0x52, 0x0d, 0x61, 0x75, 0x74, 0x6f, 0x4f, 0x70, 0x65, 0x6e, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x42,
|
||||
0x06, 0x5a, 0x04, 0x2e, 0x2f, 0x70, 0x62, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
|
||||
}
|
||||
|
||||
var (
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -19,4 +19,5 @@ message NodeCluster {
|
||||
string timeZone = 13;
|
||||
int32 nodeMaxThreads = 14;
|
||||
int32 nodeTCPMaxConnections = 15;
|
||||
bool autoOpenPorts = 16;
|
||||
}
|
||||
@@ -148,6 +148,7 @@ message UpdateNodeClusterRequest {
|
||||
string timeZone = 5;
|
||||
int32 nodeMaxThreads = 6;
|
||||
int32 nodeTCPMaxConnections = 7;
|
||||
bool autoOpenPorts = 8;
|
||||
}
|
||||
|
||||
// 删除集群
|
||||
|
||||
Reference in New Issue
Block a user