Skip to content

Commit

Permalink
Merge pull request #363 from Altinity/0.9.8
Browse files Browse the repository at this point in the history
0.9.8
  • Loading branch information
alex-zaitsev committed Apr 27, 2020
2 parents 13c343e + a7b7735 commit 69f093f
Show file tree
Hide file tree
Showing 31 changed files with 439 additions and 165 deletions.
12 changes: 1 addition & 11 deletions cmd/operator/app/clickhouse_operator.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,6 @@ const (
defaultInformerFactoryResyncDebugPeriod = 60 * time.Second
)

const (
// TODO probably this should be added as a CLI/Config param
// Default number of controller threads running concurrently (used in case no other specified in config)
defaultControllerThreadsNum = 1
)

// CLI parameter variables
var (
// versionRequest defines request for clickhouse-operator version report. Operator should exit after version printed
Expand All @@ -76,10 +70,6 @@ var (
chopInformerFactoryResyncPeriod = defaultInformerFactoryResyncPeriod
)

var (
controllerThreadsNum = defaultControllerThreadsNum
)

func init() {
flag.BoolVar(&versionRequest, "version", false, "Display clickhouse-operator version and exit")
flag.BoolVar(&debugRequest, "debug", false, "Debug run")
Expand Down Expand Up @@ -160,7 +150,7 @@ func Run() {
wg.Add(1)
go func() {
defer wg.Done()
chiController.Run(ctx, controllerThreadsNum)
chiController.Run(ctx)
}()
<-ctx.Done()
wg.Wait()
Expand Down
9 changes: 9 additions & 0 deletions config/config-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,12 @@ v: "100"
stderrthreshold: ""
vmodule: ""
log_backtrace_at: ""

################################################
##
## Runtime parameters
##
################################################

# Max number of concurrent reconciles in progress
reconcileThreadsNumber: 5
1 change: 1 addition & 0 deletions config/config.d/03-clickhouse-querylog.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@
<partition_by>toMonday(event_date)</partition_by>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log>
<query_thread_log remove="1"/>
</yandex>
11 changes: 10 additions & 1 deletion config/config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ ChConfigNetworksHostRegexpTemplate: "(chi-{chi}-[^.]+\\d+-\\d+|clickhouse\\-{chi

################################################
##
## Operator's access to ClickHouse instances
## Access to ClickHouse instances
##
################################################

Expand All @@ -108,3 +108,12 @@ v: "1"
stderrthreshold: ""
vmodule: ""
log_backtrace_at: ""

################################################
##
## Runtime parameters
##
################################################

# Max number of concurrent reconciles in progress
reconcileThreadsNumber: 10
38 changes: 28 additions & 10 deletions deploy/dev/clickhouse-operator-install-dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1336,6 +1336,10 @@ spec:
type: string
log_backtrace_at:
type: string
reconcileThreadsNumber:
type: integer
minimum: 1
maximum: 65535
---
# Possible Template Parameters:
#
Expand Down Expand Up @@ -1367,7 +1371,7 @@ subjects:
# Possible Template Parameters:
#
# dev
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-files
#
apiVersion: v1
Expand Down Expand Up @@ -1463,7 +1467,7 @@ data:
################################################
##
## Operator's access to ClickHouse instances
## Access to ClickHouse instances
##
################################################
Expand All @@ -1489,12 +1493,21 @@ data:
stderrthreshold: ""
vmodule: ""
log_backtrace_at: ""
################################################
##
## Runtime parameters
##
################################################
# Max number of concurrent reconciles in progress
reconcileThreadsNumber: 10
---
# Possible Template Parameters:
#
# dev
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-confd-files
#
apiVersion: v1
Expand All @@ -1509,7 +1522,7 @@ data:
# Possible Template Parameters:
#
# dev
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-configd-files
#
apiVersion: v1
Expand Down Expand Up @@ -1550,12 +1563,14 @@ data:
<partition_by>toMonday(event_date)</partition_by>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log>
<query_thread_log remove="1"/>
</yandex>
---
# Possible Template Parameters:
#
# dev
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-templatesd-files
#
apiVersion: v1
Expand Down Expand Up @@ -1632,6 +1647,7 @@ data:
podTemplates:
- name: default-oneperhost-pod-template
distribution: "OnePerHost"
default-storage-template.yaml.example: |
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallationTemplate"
Expand All @@ -1650,11 +1666,12 @@ data:
readme: |
Templates in this folder are packaged with an operator and available via 'useTemplate'
---
# Possible Template Parameters:
#
# dev
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-usersd-files
#
apiVersion: v1
Expand Down Expand Up @@ -1699,12 +1716,13 @@ data:
</default>
</profiles>
</yandex>
---
# Possible Template Parameters:
#
# dev
# altinity/clickhouse-operator:0.9.7
# altinity/metrics-exporter:0.9.7
# altinity/clickhouse-operator:0.9.8
# altinity/metrics-exporter:0.9.8
#
# Setup Deployment for clickhouse-operator
# Deployment would be created in kubectl-specified namespace
Expand Down Expand Up @@ -1747,7 +1765,7 @@ spec:
name: etc-clickhouse-operator-usersd-files
containers:
- name: clickhouse-operator
image: altinity/clickhouse-operator:0.9.7
image: altinity/clickhouse-operator:0.9.8
imagePullPolicy: Always
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down Expand Up @@ -1812,7 +1830,7 @@ spec:
resource: limits.memory

- name: metrics-exporter
image: altinity/metrics-exporter:0.9.7
image: altinity/metrics-exporter:0.9.8
imagePullPolicy: Always
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,3 +78,7 @@ spec:
type: string
log_backtrace_at:
type: string
reconcileThreadsNumber:
type: integer
minimum: 1
maximum: 65535
4 changes: 4 additions & 0 deletions deploy/operator/clickhouse-operator-install-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1336,3 +1336,7 @@ spec:
type: string
log_backtrace_at:
type: string
reconcileThreadsNumber:
type: integer
minimum: 1
maximum: 65535
34 changes: 24 additions & 10 deletions deploy/operator/clickhouse-operator-install-deployment.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Possible Template Parameters:
#
# -
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-files
#
apiVersion: v1
Expand Down Expand Up @@ -96,7 +96,7 @@ data:
################################################
##
## Operator's access to ClickHouse instances
## Access to ClickHouse instances
##
################################################
Expand All @@ -122,12 +122,21 @@ data:
stderrthreshold: ""
vmodule: ""
log_backtrace_at: ""
################################################
##
## Runtime parameters
##
################################################
# Max number of concurrent reconciles in progress
reconcileThreadsNumber: 10
---
# Possible Template Parameters:
#
# -
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-confd-files
#
apiVersion: v1
Expand All @@ -141,7 +150,7 @@ data:
# Possible Template Parameters:
#
# -
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-configd-files
#
apiVersion: v1
Expand Down Expand Up @@ -181,12 +190,14 @@ data:
<partition_by>toMonday(event_date)</partition_by>
<flush_interval_milliseconds>7500</flush_interval_milliseconds>
</query_log>
<query_thread_log remove="1"/>
</yandex>
---
# Possible Template Parameters:
#
# -
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-templatesd-files
#
apiVersion: v1
Expand Down Expand Up @@ -262,6 +273,7 @@ data:
podTemplates:
- name: default-oneperhost-pod-template
distribution: "OnePerHost"
default-storage-template.yaml.example: |
apiVersion: "clickhouse.altinity.com/v1"
kind: "ClickHouseInstallationTemplate"
Expand All @@ -280,11 +292,12 @@ data:
readme: |
Templates in this folder are packaged with an operator and available via 'useTemplate'
---
# Possible Template Parameters:
#
# -
# altinity/clickhouse-operator:0.9.7
# altinity/clickhouse-operator:0.9.8
# etc-clickhouse-operator-usersd-files
#
apiVersion: v1
Expand Down Expand Up @@ -328,12 +341,13 @@ data:
</default>
</profiles>
</yandex>
---
# Possible Template Parameters:
#
# -
# altinity/clickhouse-operator:0.9.7
# altinity/metrics-exporter:0.9.7
# altinity/clickhouse-operator:0.9.8
# altinity/metrics-exporter:0.9.8
#
# Setup Deployment for clickhouse-operator
# Deployment would be created in kubectl-specified namespace
Expand Down Expand Up @@ -375,7 +389,7 @@ spec:
name: etc-clickhouse-operator-usersd-files
containers:
- name: clickhouse-operator
image: altinity/clickhouse-operator:0.9.7
image: altinity/clickhouse-operator:0.9.8
imagePullPolicy: Always
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down Expand Up @@ -440,7 +454,7 @@ spec:
resource: limits.memory

- name: metrics-exporter
image: altinity/metrics-exporter:0.9.7
image: altinity/metrics-exporter:0.9.8
imagePullPolicy: Always
volumeMounts:
- name: etc-clickhouse-operator-folder
Expand Down
4 changes: 4 additions & 0 deletions deploy/operator/clickhouse-operator-install-template-crd.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1336,3 +1336,7 @@ spec:
type: string
log_backtrace_at:
type: string
reconcileThreadsNumber:
type: integer
minimum: 1
maximum: 65535

0 comments on commit 69f093f

Please sign in to comment.