Skip to content

Commit

Permalink
Release PolarDB-X Operator v1.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
dingfeng committed Nov 17, 2022
1 parent 51b7f9b commit 32e2f74
Show file tree
Hide file tree
Showing 71 changed files with 3,463 additions and 365 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,6 @@ flycheck_*.el
.idea/**/usage.statistics.xml
.idea/**/dictionaries
.idea/**/shelf
.idea

# Generated files
.idea/**/contentModel.xml
Expand Down
25 changes: 25 additions & 0 deletions CHANGELOG/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,30 @@
# Changelog

## 2022-11-17

Release v1.3.0

+ Enhancement & New Features
+ Support backup and restore.
+ Support multiple architecture: linux/amd64, linux/arm64.
+ Support log(audit, error) collection.
+ Support read only cluster.
+ Support parameter template and configuration.
+ Support XStore node rebuild.
+ Support splitting dn data and log into different directories.
+ Support archiving cold data into OSS and NFS.
+ Bug Fix
+ Fix `mycnfOverwrite` not working issue.
+ Fix issue of cn topology rules not working in host network mode.
+ Fix XStore node not ready when ip changed in container network mode.
+ Fix logstash oom
+ Fix rebuild job does continue, when the instance is upgrading
+ Fix failing to create readonly pxc when dnReplicas is less than 2
+ Fix xstore topology of restored instance not in sync with original instance
+ Fix binlog purge lock not working during backup
+ Fix change leader command issue for xsl.
+ Fix backup progress hang in binlogbackuping phase.

## 2022-10-26

Release v1.3.0-alpha.1
Expand Down
11 changes: 10 additions & 1 deletion api/v1/polardbx/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,9 @@ limitations under the License.
package polardbx

type RestoreSpec struct {
//BackupSet defines the source of backup set
// BackupSet defines the source of backup set
BackupSet string `json:"backupset,omitempty"`

// From defines the source information, either backup sets, snapshot or an running cluster.
From PolarDBXRestoreFrom `json:"from,omitempty"`

Expand All @@ -28,6 +29,14 @@ type RestoreSpec struct {
// TimeZone defines the specified time zone of the restore time. Default is the location of current cluster.
// +optional
TimeZone string `json:"timezone,omitempty"`

// +kubebuilder:default=false

// SyncSpecWithOriginalCluster identifies whether restored cluster should use the same spec as the original cluster.
// If the field is set to true, spec of original cluster is used; otherwise users have to declare spec manually or
// use default spec, but replicas of dn will be forced to sync with original cluster now. Default is false
// +optional
SyncSpecWithOriginalCluster bool `json:"syncSpecWithOriginalCluster,omitempty"`
}

// PolarDBXRestoreFrom defines the source information of the restored cluster.
Expand Down
2 changes: 1 addition & 1 deletion api/v1/polardbx/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,6 @@ type ParameterPhase string
const (
ParameterStatusNew ParameterPhase = ""
ParameterStatusCreating ParameterPhase = "Creating"
ParameterStatusRunning ParameterPhase = "Running"
ParameterStatusFinished ParameterPhase = "Finished"
ParameterStatusModifying ParameterPhase = "Modifying"
)
1 change: 0 additions & 1 deletion api/v1/polardbx/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,6 @@ type TopologyNodes struct {
CN TopologyNodeCN `json:"cn,omitempty"`

// +kubebuilder:default={replicas:2,template:{hostNetwork:true,resources:{limits:{cpu:4,memory:"8Gi"}}}}

DN TopologyNodeDN `json:"dn,omitempty"`

CDC *TopologyNodeCDC `json:"cdc,omitempty"`
Expand Down
1 change: 1 addition & 0 deletions api/v1/polardbxbackup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ type PolarDBXBackupStatus struct {
// XStores represents the backup xstore name.
// +optional
XStores []string `json:"xstores,omitempty"`

// ClusterSpecSnapshot records the snapshot of polardbx cluster spec
// +optional
ClusterSpecSnapshot *PolarDBXClusterSpec `json:"clusterSpecSnapshot,omitempty"`
Expand Down
6 changes: 6 additions & 0 deletions api/v1/polardbxparameter_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ type PolarDBXParameterStatus struct {
// Phase is the current phase of the cluster.
Phase polardbxv1polardbx.ParameterPhase `json:"phase,omitempty"`

// ModifiedTimestamp is timestamp of the last modified
ModifiedTimestamp string `json:"modifiedTimestamp,omitempty"`

// PrevParameterSpecSnapshot represents the previous version snapshot of the parameter.
PrevParameterSpecSnapshot *PolarDBXParameterSpec `json:"prevParameterSpecSnapshot,omitempty"`

Expand All @@ -69,7 +72,10 @@ type PolarDBXParameterStatus struct {
// +kubebuilder:object:root=true
// +kubebuilder:resource:shortName=pxp;polardbxp;polardbxparameter
// +kubebuilder:subresource:status
// +kubebuilder:printcolumn:name="CLUSTER NAME",type=string,JSONPath=`.spec.clusterName`
// +kubebuilder:printcolumn:name="LAST MODIFIED",type=string,JSONPath=`.status.modifiedTimestamp`
// +kubebuilder:printcolumn:name="PHASE",type=string,JSONPath=`.status.phase`
// +kubebuilder:printcolumn:name="AGE",type=date,JSONPath=`.metadata.creationTimestamp`

type PolarDBXParameter struct {
metav1.TypeMeta `json:",inline"`
Expand Down
10 changes: 5 additions & 5 deletions api/v1/xstorebackup_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ type XStoreBackupSpec struct {

// Engine is the engine used by xstore. Default is "galaxy".
// +optional
Engine string `json:"engine,omitempty"`

XStore XStoreReference `json:"xstore,omitempty"`
Timezone string `json:"timezone,omitempty"`
Engine string `json:"engine,omitempty"`
XStore XStoreReference `json:"xstore,omitempty"`
Timezone string `json:"timezone,omitempty"`
// RetentionTime defines how long will this backup set be kept
RetentionTime metav1.Duration `json:"retentionTime,omitempty"`
// file storage
// StorageProvider defines backup storage configuration
StorageProvider BackupStorageProvider `json:"storageProvider,omitempty"`
}

Expand Down
4 changes: 3 additions & 1 deletion build/root/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,8 @@ ifneq (, $(TARGET))
BUILD_IMAGE_ARGS:=${BUILD_IMAGE_ARGS} $(TARGET)
endif

E2E_PARALLELISM=3

define BUILD_IMAGES_HELP_INFO
# Build images.
#
Expand Down Expand Up @@ -165,7 +167,7 @@ e2e-test:
else
# @go test ./test/e2e -v -args timeout 6000 -ginkgo.progress -ginkgo.v
e2e-test:
@ginkgo -v -progress -p ./test/e2e
@ginkgo -nodes=${E2E_PARALLELISM} -v -progress -p ./test/e2e
endif

.PHONY: manifests
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.3.0-alpha.1
appVersion: v1.3.0-alpha.1
version: 1.3.0
appVersion: v1.3.0
keywords:
- polardb-x
- operator
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
apiVersion: v1
data:
filebeat.yml: |-
queue:
mem:
events: 4096
flush.min_events: 2048
flush.timeout: 5s
filebeat.autodiscover:
providers:
- type: kubernetes
Expand All @@ -15,6 +20,8 @@ data:
config:
- type: log
scan_frequency: 0.3s
harvester_buffer_size: 10485760
fields:
log_type: cn_sql_log
instance_id: ${data.kubernetes.labels.polardbx/name}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ data:
# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
-Xms1g
-Xmx1g
-Xms800m
-Xmx800m
################################################################
## Expert settings
Expand Down
8 changes: 4 additions & 4 deletions charts/polardbx-logcollector/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@ logstash:
#image repo of logstash
repo: polardbx
#image name of logstash
name: logstash
name: polardbx-logstash
#image tag of logstash
version: 8.1.2-polardbx-20220624153221
version: v1.3.0
#the name of the logstash deployment
name: logstash
#the exported port the logstash. filebeat will access this port.
Expand All @@ -18,10 +18,10 @@ logstash:
#the resource configuration of one logstash replica
resources:
limits:
cpu: "2"
cpu: "1"
memory: "1200Mi"
requests:
cpu: "2"
cpu: "1"
memory: "1200Mi"
elastic:
#the name of elastic cert secret, which will be need when logtash upload data to an elastic search cluster.
Expand Down
4 changes: 2 additions & 2 deletions charts/polardbx-monitor/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: polardbx-monitor
description: Helm chart of polardbx-operator monitor plugin
type: application
version: 1.3.0-alpha.1
appVersion: v1.3.0-alpha.1
version: 1.3.0
appVersion: v1.3.0
keywords:
- polardb-x
- operator
Expand Down
4 changes: 2 additions & 2 deletions charts/polardbx-monitor/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -58,9 +58,9 @@ monitors:
# kube-state-metrics (KSM) is a simple service that listens to the Kubernetes API server and generates metrics
# about the state of the objects.
kubeStateMetrics:
repo: quay.io/coreos
repo: kubesphere
image: kube-state-metrics
version: v1.9.7
version: v2.3.0
replicas: 1

# The node selector labels, KubeStateMetrics pod will deploy only on the nodes with such labels
Expand Down
4 changes: 2 additions & 2 deletions charts/polardbx-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: v2
name: polardbx-operator
description: Helm chart of polardbx-operator
type: application
version: 1.3.0-alpha.1
appVersion: v1.3.0-alpha.1
version: 1.3.0
appVersion: v1.3.0
keywords:
- polardb-x
- operator
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,15 @@ spec:
that this polardbx is restored from. Optional.
type: string
type: object
syncSpecWithOriginalCluster:
default: false
description: SyncSpecWithOriginalCluster identifies whether
restored cluster should use the same spec as the original
cluster. If the field is set to true, spec of original cluster
is used; otherwise users have to declare spec manually or
use default spec, but replicas of dn will be forced to sync
with original cluster now. Default is false
type: boolean
time:
description: Time defines the specified time of the restored
data, in the format of 'yyyy-MM-dd HH:mm:ss'. Required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,15 @@ spec:
this polardbx is restored from. Optional.
type: string
type: object
syncSpecWithOriginalCluster:
default: false
description: SyncSpecWithOriginalCluster identifies whether restored
cluster should use the same spec as the original cluster. If
the field is set to true, spec of original cluster is used;
otherwise users have to declare spec manually or use default
spec, but replicas of dn will be forced to sync with original
cluster now. Default is false
type: boolean
time:
description: Time defines the specified time of the restored data,
in the format of 'yyyy-MM-dd HH:mm:ss'. Required.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,18 @@ spec:
scope: Namespaced
versions:
- additionalPrinterColumns:
- jsonPath: .spec.clusterName
name: CLUSTER NAME
type: string
- jsonPath: .status.modifiedTimestamp
name: LAST MODIFIED
type: string
- jsonPath: .status.phase
name: PHASE
type: string
- jsonPath: .metadata.creationTimestamp
name: AGE
type: date
name: v1
schema:
openAPIV3Schema:
Expand Down Expand Up @@ -108,6 +117,9 @@ spec:
type: object
status:
properties:
modifiedTimestamp:
description: ModifiedTimestamp is timestamp of the last modified
type: string
parameterSpecSnapshot:
description: ParameterSpecSnapshot represents the snapshot of the
parameter.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,9 +64,11 @@ spec:
description: Engine is the engine used by xstore. Default is "galaxy".
type: string
retentionTime:
description: RetentionTime defines how long will this backup set be
kept
type: string
storageProvider:
description: file storage
description: StorageProvider defines backup storage configuration
properties:
sink:
description: Sink defines the storage configuration choose to
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ data:
enable_aliyun_ack_resource_controller: {{ .Values.controllerManager.config.scheduler.enableAliyunAckResourceController }}
enable_debug_mode_for_compute_nodes: false
enable_privileged_container: {{ .Values.controllerManager.config.container.privileged }}
force_cgroup: {{ .Values.controllerManager.config.container.forceCGroup }}
store:
enable_privileged_container: {{ .Values.controllerManager.config.container.privileged }}
host_paths:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ spec:
- name: cgroups-blkio
hostPath:
path: /sys/fs/cgroup/blkio
type: Directory
- name: tmpfs
emptyDir: {}
- name: config
Expand Down
Loading

0 comments on commit 32e2f74

Please sign in to comment.