Skip to content

Commit

Permalink
feat: add Pulsar stream (#4228)
Browse files Browse the repository at this point in the history
Co-authored-by: Y-Rookie <yong.huang@apecloud.com>
Co-authored-by: wangyelei <yelei.wang@apecloud.com>
Co-authored-by: sophon <sophon@apecloud.com>
Co-authored-by: zhangtao <111836083+sophon-zt@users.noreply.github.com>
Co-authored-by: runsun <wuxia.sr@apecloud.com>
  • Loading branch information
6 people authored Jul 17, 2023
1 parent 1695f23 commit 4f5de57
Show file tree
Hide file tree
Showing 72 changed files with 6,240 additions and 107 deletions.
6 changes: 0 additions & 6 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -86,12 +86,6 @@ define BUILDX_ERROR
buildx not enabled, refusing to run this recipe
endef

ifeq ($(TAG_LATEST), true)
IMAGE_TAGS ?= $(IMG):$(VERSION) $(IMG):latest
else
IMAGE_TAGS ?= $(IMG):$(VERSION)
endif

DOCKER_BUILD_ARGS =
DOCKER_NO_BUILD_CACHE ?= false

Expand Down
5 changes: 5 additions & 0 deletions apis/apps/v1alpha1/configconstraint_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,10 @@ type ShellTrigger struct {
// command used to execute for reload.
// +kubebuilder:validation:Required
Command []string `json:"command"`

// Specify synchronize updates parameters to the config manager.
// +optional
Sync *bool `json:"sync,omitempty"`
}

type TPLScriptTrigger struct {
Expand Down Expand Up @@ -243,6 +247,7 @@ type FormatterConfig struct {
// dotenv: this was a plain text file with simple key–value pairs, reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS
// properties: a file extension mainly used in Java, reference wiki: https://en.wikipedia.org/wiki/.properties
// toml: reference wiki: https://en.wikipedia.org/wiki/TOML
// props-plus: a file extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp)
// +kubebuilder:validation:Required
Format CfgFileFormat `json:"format"`
}
Expand Down
21 changes: 11 additions & 10 deletions apis/apps/v1alpha1/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -427,19 +427,20 @@ type webhookManager struct {

// CfgFileFormat defines formatter of configuration files.
// +enum
// +kubebuilder:validation:Enum={xml,ini,yaml,json,hcl,dotenv,toml,properties,redis}
// +kubebuilder:validation:Enum={xml,ini,yaml,json,hcl,dotenv,toml,properties,redis,props-plus}
type CfgFileFormat string

const (
Ini CfgFileFormat = "ini"
YAML CfgFileFormat = "yaml"
JSON CfgFileFormat = "json"
XML CfgFileFormat = "xml"
HCL CfgFileFormat = "hcl"
Dotenv CfgFileFormat = "dotenv"
TOML CfgFileFormat = "toml"
Properties CfgFileFormat = "properties"
RedisCfg CfgFileFormat = "redis"
Ini CfgFileFormat = "ini"
YAML CfgFileFormat = "yaml"
JSON CfgFileFormat = "json"
XML CfgFileFormat = "xml"
HCL CfgFileFormat = "hcl"
Dotenv CfgFileFormat = "dotenv"
TOML CfgFileFormat = "toml"
Properties CfgFileFormat = "properties"
RedisCfg CfgFileFormat = "redis"
PropertiesPlus CfgFileFormat = "props-plus"
)

// UpgradePolicy defines the policy of reconfiguring.
Expand Down
5 changes: 5 additions & 0 deletions apis/apps/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 7 additions & 1 deletion config/crd/bases/apps.kubeblocks.io_configconstraints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ spec:
reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS
properties: a file extension mainly used in Java, reference
wiki: https://en.wikipedia.org/wiki/.properties toml: reference
wiki: https://en.wikipedia.org/wiki/TOML"
wiki: https://en.wikipedia.org/wiki/TOML props-plus: a file
extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp)"
enum:
- xml
- ini
Expand All @@ -191,6 +192,7 @@ spec:
- toml
- properties
- redis
- props-plus
type: string
iniConfig:
description: iniConfig represents the ini options.
Expand Down Expand Up @@ -224,6 +226,10 @@ spec:
items:
type: string
type: array
sync:
description: Specify synchronize updates parameters to the
config manager.
type: boolean
required:
- command
type: object
Expand Down
12 changes: 9 additions & 3 deletions controllers/apps/configuration/reconfigure_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -231,12 +231,18 @@ func enableSyncReload(policyType appsv1alpha1.UpgradePolicy, options *appsv1alph
}

func enableSyncTrigger(options *appsv1alpha1.ReloadOptions) bool {
if options == nil || options.TPLScriptTrigger == nil {
if options == nil {
return false
}

trigger := options.TPLScriptTrigger
return trigger.Sync != nil && *trigger.Sync
if options.TPLScriptTrigger != nil {
return !cfgcore.IsWatchModuleForTplTrigger(options.TPLScriptTrigger)
}

if options.ShellTrigger != nil {
return !cfgcore.IsWatchModuleForShellTrigger(options.ShellTrigger)
}
return false
}

func withSucceed(succeedCount int32) func(status *ReturnedStatus) {
Expand Down
4 changes: 3 additions & 1 deletion deploy/clickhouse/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,4 +41,6 @@ zookeeper:
## log-level=info
## ...
##
configuration: ""
configuration: ""

clusterDomain: ".cluster.local"
4 changes: 2 additions & 2 deletions deploy/etcd/templates/clusterdefinition.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ spec:
echo "start etcd..."
PEERS=""
# TODO: clusterDomain 'cluster.local' requires configurable
DOMAIN=$KB_NAMESPACE".svc.cluster.local"
DOMAIN=$KB_NAMESPACE".svc{{ .Values.clusterDomain }}"
i=0
while [ $i -lt $KB_REPLICA_COUNT ]; do
if [ $i -ne 0 ]; then
Expand All @@ -59,7 +59,7 @@ spec:
i=$(( i + 1))
done
# TODO: clusterDomain 'cluster.local' requires configurable
MY_PEER=$KB_POD_FQDN.cluster.local
MY_PEER=$KB_POD_FQDN{{ .Values.clusterDomain }}
exec etcd --name ${HOSTNAME} \
--listen-peer-urls http://0.0.0.0:2380 \
--listen-client-urls http://0.0.0.0:2379 \
Expand Down
2 changes: 2 additions & 0 deletions deploy/etcd/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@ roleProbe:
failureThreshold: 2
periodSeconds: 1
timeoutSeconds: 1

clusterDomain: ".cluster.local"
25 changes: 3 additions & 22 deletions deploy/helm/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,45 +1,26 @@
apiVersion: v2
name: kubeblocks
description: KubeBlocks Core Controller Operator.

# A chart can be either an 'application' or a 'library' chart.
#
# Application charts are a collection of templates that can be packaged into versioned archives
# to be deployed.
#
# Library charts provide useful utilities or functions for the chart developer. They're included as
# a dependency of application charts to inject those utilities and functions into the rendering
# pipeline. Library charts do not define any templates and therefore cannot be deployed.
type: application

# This is the chart version. This version number should be incremented each time you make changes
# to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 0.6.0-alpha.36

# This is the version number of the application being deployed. This version number should be
# incremented each time you make changes to the application. Versions are not expected to
# follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes.
appVersion: 0.6.0-alpha.36


kubeVersion: '>=1.22.0-0'


home: https://www.kubeblocks.io/
icon: https://github.com/apecloud/kubeblocks/raw/main/img/logo.png
keywords:
- kubernetes
- database
- streaming
- messsage queue
- paas

- platform

maintainers:
- name: ApeCloud
url: https://github.com/apecloud/kubeblocks/


sources:
- https://github.com/apecloud/kubeblocks/

Expand Down
8 changes: 7 additions & 1 deletion deploy/helm/crds/apps.kubeblocks.io_configconstraints.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,8 @@ spec:
reference wiki: https://en.wikipedia.org/wiki/Configuration_file#MS-DOS
properties: a file extension mainly used in Java, reference
wiki: https://en.wikipedia.org/wiki/.properties toml: reference
wiki: https://en.wikipedia.org/wiki/TOML"
wiki: https://en.wikipedia.org/wiki/TOML props-plus: a file
extension mainly used in Java, support CamelCase(e.g: brokerMaxConnectionsPerIp)"
enum:
- xml
- ini
Expand All @@ -191,6 +192,7 @@ spec:
- toml
- properties
- redis
- props-plus
type: string
iniConfig:
description: iniConfig represents the ini options.
Expand Down Expand Up @@ -224,6 +226,10 @@ spec:
items:
type: string
type: array
sync:
description: Specify synchronize updates parameters to the
config manager.
type: boolean
required:
- command
type: object
Expand Down
Loading

0 comments on commit 4f5de57

Please sign in to comment.