/
clickhouse.go
95 lines (72 loc) · 4.89 KB
/
clickhouse.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
// Code generated by user config generator. DO NOT EDIT.
// +kubebuilder:object:generate=true
package clickhouseuserconfig
// CIDR address block, either as a string, or in a dict with an optional description field
type IpFilter struct {
// +kubebuilder:validation:MaxLength=1024
// Description for IP filter list entry
Description *string `groups:"create,update" json:"description,omitempty"`
// +kubebuilder:validation:MaxLength=43
// CIDR address block
Network string `groups:"create,update" json:"network"`
}
// Allow access to selected service ports from private networks
type PrivateAccess struct {
// Allow clients to connect to clickhouse with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations
Clickhouse *bool `groups:"create,update" json:"clickhouse,omitempty"`
// Allow clients to connect to clickhouse_https with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations
ClickhouseHttps *bool `groups:"create,update" json:"clickhouse_https,omitempty"`
// Allow clients to connect to clickhouse_mysql with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations
ClickhouseMysql *bool `groups:"create,update" json:"clickhouse_mysql,omitempty"`
// Allow clients to connect to prometheus with a DNS name that always resolves to the service's private IP addresses. Only available in certain network locations
Prometheus *bool `groups:"create,update" json:"prometheus,omitempty"`
}
// Allow access to selected service components through Privatelink
type PrivatelinkAccess struct {
// Enable clickhouse
Clickhouse *bool `groups:"create,update" json:"clickhouse,omitempty"`
// Enable clickhouse_https
ClickhouseHttps *bool `groups:"create,update" json:"clickhouse_https,omitempty"`
// Enable clickhouse_mysql
ClickhouseMysql *bool `groups:"create,update" json:"clickhouse_mysql,omitempty"`
// Enable prometheus
Prometheus *bool `groups:"create,update" json:"prometheus,omitempty"`
}
// Allow access to selected service ports from the public Internet
type PublicAccess struct {
// Allow clients to connect to clickhouse from the public internet for service nodes that are in a project VPC or another type of private network
Clickhouse *bool `groups:"create,update" json:"clickhouse,omitempty"`
// Allow clients to connect to clickhouse_https from the public internet for service nodes that are in a project VPC or another type of private network
ClickhouseHttps *bool `groups:"create,update" json:"clickhouse_https,omitempty"`
// Allow clients to connect to clickhouse_mysql from the public internet for service nodes that are in a project VPC or another type of private network
ClickhouseMysql *bool `groups:"create,update" json:"clickhouse_mysql,omitempty"`
// Allow clients to connect to prometheus from the public internet for service nodes that are in a project VPC or another type of private network
Prometheus *bool `groups:"create,update" json:"prometheus,omitempty"`
}
type ClickhouseUserConfig struct {
// +kubebuilder:validation:MaxItems=1
// +kubebuilder:deprecatedversion:warning="additional_backup_regions is deprecated"
// Deprecated. Additional Cloud Regions for Backup Replication
AdditionalBackupRegions []string `groups:"create,update" json:"additional_backup_regions,omitempty"`
// +kubebuilder:validation:MaxItems=1024
// Allow incoming connections from CIDR address block, e.g. '10.20.0.0/16'
IpFilter []*IpFilter `groups:"create,update" json:"ip_filter,omitempty"`
// Allow access to selected service ports from private networks
PrivateAccess *PrivateAccess `groups:"create,update" json:"private_access,omitempty"`
// Allow access to selected service components through Privatelink
PrivatelinkAccess *PrivatelinkAccess `groups:"create,update" json:"privatelink_access,omitempty"`
// +kubebuilder:validation:MaxLength=63
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
// Name of another project to fork a service from. This has effect only when a new service is being created.
ProjectToForkFrom *string `groups:"create" json:"project_to_fork_from,omitempty"`
// Allow access to selected service ports from the public Internet
PublicAccess *PublicAccess `groups:"create,update" json:"public_access,omitempty"`
// Store logs for the service so that they are available in the HTTP API and console.
ServiceLog *bool `groups:"create,update" json:"service_log,omitempty"`
// +kubebuilder:validation:MaxLength=64
// +kubebuilder:validation:XValidation:rule="self == oldSelf",message="Value is immutable"
// Name of another service to fork from. This has effect only when a new service is being created.
ServiceToForkFrom *string `groups:"create" json:"service_to_fork_from,omitempty"`
// Use static public IP addresses
StaticIps *bool `groups:"create,update" json:"static_ips,omitempty"`
}