Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/v1.5.0 beta #26

Merged
merged 3 commits into from
Oct 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -317,9 +317,9 @@ flycheck_*.el

### VisualStudioCode template
.vscode/*
!.vscode/settings.json
!.vscode/tasks.json
!.vscode/launch.json
# !.vscode/settings.json
# !.vscode/tasks.json
# !.vscode/launch.json
!.vscode/extensions.json
*.code-workspace

Expand Down
17 changes: 17 additions & 0 deletions CHANGELOG/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# Changelog

## 2023-10-24

Release v1.5.0-beta

+ Enhancement & New Features
+ Support PolarDB-X Standard(XStore) dashboard
+ Remove *Cluster IP* dependency on the paxos communication improving some performance
+ Support cross-cluster point-in-time recovery(PITR)
+ Support collecting DN logs including sql, error, slow logs
+ Support uploading and downloading backupset by Simple Storage Service (S3)
+ Bug Fix
+ Fix failing to delete the cluster when its gms is not available
+ Fix failing to delele rebuild job when the *fromPod* does not exist
+ Fix disk util alert issue. [#21](https://github.com/polardb/polardbx-operator/issues/21)
+ Fix helm template issue when set tolerations. [#25](https://github.com/polardb/polardbx-operator/issues/25)
+ Fix failing to create backup when *serviceName* of PolarDBXCluster differs from its *name*

## 2023-04-12

Release v1.4.1
Expand Down
9 changes: 9 additions & 0 deletions api/v1/common/version.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
package common

const (
AnnotationOperatorCreateVersion = "polardbx-operator/create-version"
)

func NeedCheckPodClusterIp(version string) bool {
return version == ""
}
11 changes: 9 additions & 2 deletions api/v1/polardbx/backup_storage.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ type BackupStorageProvider struct {
type BackupStorage string

const (
OSS BackupStorage = "oss"
SFTP BackupStorage = "sftp"
OSS BackupStorage = "oss"
SFTP BackupStorage = "sftp"
MINIO BackupStorage = "s3"
)

// BackupStorageFilestreamAction records filestream actions related to specified backup storage
Expand All @@ -60,6 +61,12 @@ func NewBackupStorageFilestreamAction(storage BackupStorage) (*BackupStorageFile
Upload: filestream.UploadSsh,
List: filestream.ListSsh,
}, nil
case MINIO:
return &BackupStorageFilestreamAction{
Download: filestream.DownloadMinio,
Upload: filestream.UploadMinio,
List: filestream.ListMinio,
}, nil
default:
return nil, errors.New("invalid storage: " + string(storage))
}
Expand Down
3 changes: 2 additions & 1 deletion api/v1/polardbx/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ import (
type CNStaticConfig struct {
AttendHtap bool `json:"AttendHtap,omitempty"`
// +kubebuilder:default=true
EnableCoroutine bool `json:"EnableCoroutine,omitempty"`
// +optional
EnableCoroutine bool `json:"EnableCoroutine"`
EnableReplicaRead bool `json:"EnableReplicaRead,omitempty"`
EnableJvmRemoteDebug bool `json:"EnableJvmRemoteDebug,omitempty"`
ServerProperties map[string]intstr.IntOrString `json:"ServerProperties,omitempty"`
Expand Down
2 changes: 2 additions & 0 deletions api/v1/polardbx/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ const (
type ParameterTemplate struct {
// parameter template
// +optional
Namespace string `json:"namespace,omitempty"`
// +optional
Name string `json:"name,omitempty"`
}

Expand Down
21 changes: 18 additions & 3 deletions api/v1/polardbx/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ type NodeSelectorReference struct {

type StatelessTopologyRuleItem struct {
Name string `json:"name,omitempty"`
ExtraName string `json:"extraName,omitempty"`
Replicas *intstr.IntOrString `json:"replicas,omitempty"`
NodeSelector *NodeSelectorReference `json:"selector,omitempty"`
}
Expand Down Expand Up @@ -210,17 +211,31 @@ type TopologyNodeCN struct {

type TopologyNodeCDC struct {
// +kubebuilder:default=2
// +kubebuilder:validation:Minimum=0

Replicas int32 `json:"replicas,omitempty"`
Replicas intstr.IntOrString `json:"replicas,omitempty"`

// +kubebuilder:validation:Minimum=0

XReplicas int32 `json:"xReplicas,omitempty"`
XReplicas int `json:"xReplicas,omitempty"`

// +kubebuilder:default={resources: {limits: {cpu: 4, memory: "8Gi"}}}

Template CDCTemplate `json:"template,omitempty"`

Groups []*CdcGroup `json:"groups,omitempty"`
}

type CdcGroup struct {
Name string `json:"name,omitempty"`

// +kubebuilder:default=2
// +kubebuilder:validation:Minimum=0

Replicas int32 `json:"replicas,omitempty"`

Template *CDCTemplate `json:"template,omitempty"`

Config CDCConfig `json:"config,omitempty"`
}

type TopologyNodeColumnar struct {
Expand Down
33 changes: 33 additions & 0 deletions api/v1/polardbx/zz_generated.deepcopy.go

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

3 changes: 3 additions & 0 deletions api/v1/polardbxcluster_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ type PolarDBXClusterStatus struct {

//PitrStatus represents the status of the pitr restore
PitrStatus *polardbx.PitrStatus `json:"pitrStatus,omitempty"`

//LatestSyncReadonlyTs represents the lastest time sync readonly storage info to metadb
ReadonlyStorageInfoHash string `json:"readonlyStorageInfoHash,omitempty"`
}

// +kubebuilder:object:root=true
Expand Down
2 changes: 2 additions & 0 deletions api/v1/xstore/parameter.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ package xstore
type ParameterTemplate struct {
// Parameter template
// +optional
Namespace string `json:"namespace,omitempty"`
// +optional
Name string `json:"name,omitempty"`
}

Expand Down
2 changes: 1 addition & 1 deletion api/v1/xstore/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ type NodeSpec struct {

// +kubebuilder:default=false

// HostNetwork defines whether the node uses the host network. Default is true.
// HostNetwork defines whether the node uses the host network. Default is false.
HostNetwork *bool `json:"hostNetwork,omitempty"`

// Affinity defines the affinity of the node (pod).
Expand Down
3 changes: 0 additions & 3 deletions api/v1/xstore_follower_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,6 @@ type XStoreFollowerStatus struct {
//CurrentJobTask represents the task name of the current job
CurrentJobTask string `json:"currentJobTask,omitempty"`

//ElectionWeight represents the election weight of target pod
ElectionWeight int `json:"electionWeight,omitempty"`

//TargetPodName represents the target pod name
TargetPodName string `json:"targetPodName,omitempty"`

Expand Down
2 changes: 1 addition & 1 deletion build/images/xstore-tools/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ RUN CGO_ENABLED=0 GOOS=linux GO111MODULE=on go build -tags polardbx -o polardbx-


# Build the image with scripts
FROM polardbx/xstore-tools-base:v1.4.1
FROM polardbx/xstore-tools-base:ts20231018152345

ARG VERSION=test

Expand Down
4 changes: 2 additions & 2 deletions charts/polardbx-logcollector/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: polardbx-logcollector
description: Helm chart of polardbx-operator logcollector plugin
type: application
version: 1.4.1
appVersion: v1.4.1
version: 1.5.0-beta
appVersion: v1.5.0-beta
keywords:
- polardb-x
- operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,14 +50,82 @@ data:
pattern: '^\[[0-9]{4}-[0-9]{2}-[0-9]{2}'
negate: true
match: after
- condition:
and:
- equals:
kubernetes.labels.polardbx/enableAuditLog: "true"
- or:
- equals:
kubernetes.labels.polardbx/role: dn
- equals:
kubernetes.labels.polardbx/role: gms
config:
- type: filestream
id: dn-audit-log-filestream
prospector.scanner.check_interval: 1s
buffer_size: 1048576
# close.reader.after_interval: 50s
fields:
log_type: dn_audit_log
instance_id: ${data.kubernetes.labels.polardbx/name}
dn_instance_id: ${data.kubernetes.labels.xstore/name}
pod_name: ${data.kubernetes.pod.name}
node_name: ${data.kubernetes.node.name}
paths:
#alog must in mysql/*/*.alog
- {{ .Values.filebeat.dnDataHostPathPrefix }}/${data.kubernetes.namespace}/${data.kubernetes.pod.name}/tmp/*.alog
parsers:
- multiline:
type: pattern
pattern: '.*\x01$'
negate: true
match: before
- condition:
or:
- equals:
kubernetes.labels.polardbx/role: dn
- equals:
kubernetes.labels.polardbx/role: gms
config:
- type: filestream
id: dn-slow-log-filestream
prospector.scanner.check_interval: 1s
fields:
log_type: dn_slow_log
instance_id: ${data.kubernetes.labels.polardbx/name}
dn_instance_id: ${data.kubernetes.labels.xstore/name}
pod_name: ${data.kubernetes.pod.name}
node_name: ${data.kubernetes.node.name}
paths:
- {{ .Values.filebeat.dnDataHostPathPrefix }}/${data.kubernetes.namespace}/${data.kubernetes.pod.name}/data/mysql/slow_log_*.CSV
- type: filestream
id: dn-error-log-filestream
prospector.scanner.check_interval: 1s
fields:
log_type: dn_error_log
instance_id: ${data.kubernetes.labels.polardbx/name}
dn_instance_id: ${data.kubernetes.labels.xstore/name}
pod_name: ${data.kubernetes.pod.name}
node_name: ${data.kubernetes.node.name}
paths:
- {{ .Values.filebeat.dnDataHostPathPrefix }}/${data.kubernetes.namespace}/${data.kubernetes.pod.name}/log/alert.log
parsers:
- multiline:
type: pattern
pattern: '^\d{4}-\d{2}-\d{2}|^\[\d{4}-\d{2}-\d{2}'
negate: true
match: after

processors:
- drop_fields:
fields: ["input","log","ecs","container","kubernetes","@metadata","agent"]
ignore_missing: false



# output.file:
# path: "/tmp/filebeat"
# filename: filebeat

#output.console:
# enable: false
# codec.json:
Expand Down
Loading
Loading