Skip to content

Commit

Permalink
release v1.4.0-beta
Browse files Browse the repository at this point in the history
  • Loading branch information
dingfeng committed Mar 20, 2023
1 parent 0c9db54 commit e11ca8b
Show file tree
Hide file tree
Showing 220 changed files with 15,589 additions and 3,844 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/images-ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: CI for build images

on:
pull_request:
branches:
- main

# Environment variables available to all jobs and steps in this workflow.
env:
REGISTRY: registry.cn-zhangjiakou.aliyuncs.com
NAMESPACE: polardbx-ci
TAG: ${{ github.sha }}

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

# 1 Setup go environment
- name: Setup go environment
uses: actions/setup-go@v3
with:
go-version: '1.18'

# 2 Build images
- name: Build images
run: |-
make build REPO=$REGISTRY/$NAMESPACE TAG=$TAG
# 3 Generate helm chart
- name: Generate helm chart
run: |-
make helm-package
6 changes: 5 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -554,4 +554,8 @@ vendor
!LICENSES/vendor
!test/testcases/inner
!pkg/debug
tools/xstore/venv
tools/xstore/venv

docs/**
/hack/make-rules/venv/
/hack/make-rules/.idea/
50 changes: 40 additions & 10 deletions CHANGELOG/README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Changelog

## 2023-03-17

Release v1.4.0-beta

+ Enhancement & New Features
+ Support consensus log backup
+ Support point-in-time recovery(PITR)
+ Support backup schedule
+ Support restore without backup object
+ Support rebuild dn follower automatically when `Slave_SQL_Running` becomes `No` due to `Last_SQL_Error`
+ Support debug runmode of PolarDB-X cluster
+ Support default PrometheusRule for polardbx cluster
+ Use *Cluster IP* as the default communication address among dn pods
+ Use container network as the default network type
+ Bug Fix
+ Fix backup failure on follower when using non-host network
+ Fix grafana cpu and mem usage issue for kube-state-metrics 2.3.0
+ Fix restore issue when binlog checksum is none
+ Fix cdc crash during backup caused by sending heartbeat using XA transaction

## 2022-11-17

Release v1.3.0
Expand Down Expand Up @@ -61,6 +81,7 @@ Fix overriding my.cnf passing to the script without section.
Release v1.2.1.

This is a bugfix release.

+ Fix the CDC problem by setting the 'consensuslog_revise' variable of galaxyengine to ON.
+ Update docker registry mirror used in China mainland from ustc to sjtug.
+ Fix the scale in/out progress: use "schedule rebalance" command.
Expand All @@ -70,11 +91,19 @@ This is a bugfix release.
Release v1.2.0.

+ Enhancement & New Features
+ Provide a new CR `PolarDBXMonitor` for declaring the monitoring of some `PolarDBXCluster`. The controller will create `ServiceMonitors` to make prometheus scraping the metrics.
+ Provide a new chart `polardbx-monitor` which packages a customized [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) release with predefined dashboards for monitoring PolarDB-X clusters.
+ Provide support for xpaxos version of [galaxyengine](https://github.com/ApsaraDB/galaxyengine). Now the `PolarDBXCluster` controller will create a typical paxos cluster (leader + follower + logger) for each GMS and DN by default.
+ **Note** this is a breaking change. After the upgrade, the old `XStores` will be in an unmaintainable state. Update of the GMS/DN is not possible due to incompatible data/log formats. You may have to delete all the `PolarDBXCluster` in your Kubernetes before/after the upgrade.
+ If you want to keep the compatibility, you can disable this feature by declaring feature gate with negative symbol `EnableGalaxyCluster-`. After that, no multi-node `XStore` with galaxy engine can be created.
+ Provide a new CR `PolarDBXMonitor` for declaring the monitoring of some `PolarDBXCluster`. The controller will
create `ServiceMonitors` to make prometheus scraping the metrics.
+ Provide a new chart `polardbx-monitor` which packages a
customized [kube-prometheus](https://github.com/prometheus-operator/kube-prometheus) release with predefined
dashboards for monitoring PolarDB-X clusters.
+ Provide support for xpaxos version of [galaxyengine](https://github.com/ApsaraDB/galaxyengine). Now
the `PolarDBXCluster` controller will create a typical paxos cluster (leader + follower + logger) for each GMS and
DN by default.
+ **Note** this is a breaking change. After the upgrade, the old `XStores` will be in an unmaintainable state.
Update of the GMS/DN is not possible due to incompatible data/log formats. You may have to delete all
the `PolarDBXCluster` in your Kubernetes before/after the upgrade.
+ If you want to keep the compatibility, you can disable this feature by declaring feature gate with negative
symbol `EnableGalaxyCluster-`. After that, no multi-node `XStore` with galaxy engine can be created.
+ Support scaling up/down and self-healing of the `XStores`.

+ Bug Fix
Expand All @@ -85,7 +114,7 @@ Release v1.2.0.
Release v1.1.0.

+ Enhancement & New Features
+ Support scaling in/out the PolarDBXCluster.
+ Support scaling in/out the PolarDBXCluster.
+ Support configure SSL on PolarDBXCluster.
+ Add a new CRD PolarDBXCluster for setting and reviewing the configs of PolarDB-X cluster.
+ `config.dynamic.CN` is not going to sync with cluster while phase is running.
Expand All @@ -94,21 +123,22 @@ Release v1.1.0.
+ Add label "polardbx/name" to Services、Secrets and ConfigMaps owned by PolarDBXCluster.
+ Support webhooks for PolarDBXCluster and PolarDBXClusterKnobs.
+ Support the complete spec of node selectors in `spec.topology.rules` of PolarDBXCluster.
+ Create headless services for pods of xstore. Record DNS domains instead of raw IP for records of DN in GMS and among galaxyengine xstores.
+ Create headless services for pods of xstore. Record DNS domains instead of raw IP for records of DN in GMS and
among galaxyengine xstores.
+ Support overwrite image tag in values.yaml (helm).
+ Support collect metrics for hotspot JVM 11.
+ Add e2e test tests.

+ Bug Fix
+ Fix the wrong call stack when logging with `flow.Error` in some cases.
+ Fix the wrong call stack when logging with `flow.Error` in some cases.
+ Fix the wrong timeout in polardbx-init.
+ Fix configuring host path of data volumes in values.yaml (helm).
+ Fix removing ini keys in galaxyengine's config.
+ Fix a `removeNull` in hsperfdata.

## 2021-10-15
## 2021-10-15

Release v1.0.0.
Release v1.0.0.

+ Provide v1 APIs:
+ PolarDBXCluster
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Follow the [快速开始](https://doc.polardbx.com/quickstart/topics/quickstart-

## Documentation

Please refer to the [CHANGELOG](./CHANGELOG.md) for the notable changes for each version.**
Please refer to the [CHANGELOG](./CHANGELOG/README.md) for the notable changes for each version.**

Refer to the documentations for more details, such as CRD definitions and operation guides.

Expand Down
2 changes: 1 addition & 1 deletion api/v1/common/zz_generated.deepcopy.go

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

Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

package v1
package polardbx

import (
"errors"
"github.com/alibaba/polardbx-operator/pkg/hpfs/filestream"
)

// BackupStorageProvider defines the configuration of storage for storing backup files.
type BackupStorageProvider struct {
Expand All @@ -33,3 +38,29 @@ const (
OSS BackupStorage = "oss"
SFTP BackupStorage = "sftp"
)

// BackupStorageFilestreamAction records filestream actions related to specified backup storage
type BackupStorageFilestreamAction struct {
Download filestream.Action
Upload filestream.Action
List filestream.Action
}

func NewBackupStorageFilestreamAction(storage BackupStorage) (*BackupStorageFilestreamAction, error) {
switch storage {
case OSS:
return &BackupStorageFilestreamAction{
Download: filestream.DownloadOss,
Upload: filestream.UploadOss,
List: filestream.ListOss,
}, nil
case SFTP:
return &BackupStorageFilestreamAction{
Download: filestream.DownloadSsh,
Upload: filestream.UploadSsh,
List: filestream.ListSsh,
}, nil
default:
return nil, errors.New("invalid storage: " + string(storage))
}
}
16 changes: 12 additions & 4 deletions api/v1/polardbx/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,15 @@ type CNConfig struct {
}

type DNConfig struct {
MycnfOverwrite string `json:"mycnfOverwrite,omitempty"`
LogPurgeInterval metav1.Duration `json:"logPurgeInterval,omitempty"`
EnableAuditLog bool `json:"enableAuditLog,omitempty"`
LogDataSeparation bool `json:"logDataSeparation,omitempty"`
MycnfOverwrite string `json:"mycnfOverwrite,omitempty"`
LogPurgeInterval metav1.Duration `json:"logPurgeInterval,omitempty"`
EnableAuditLog bool `json:"enableAuditLog,omitempty"`
LogDataSeparation bool `json:"logDataSeparation,omitempty"`
Envs map[string]intstr.IntOrString `json:"envs,omitempty"`
}

type CDCConfig struct {
Envs map[string]intstr.IntOrString `json:"envs,omitempty"`
}

type Config struct {
Expand All @@ -59,4 +64,7 @@ type Config struct {

// DN config.
DN DNConfig `json:"dn,omitempty"`

// CDC config
CDC CDCConfig `json:"cdc,omitempty"`
}
33 changes: 29 additions & 4 deletions api/v1/polardbx/restore.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ limitations under the License.
package polardbx

type RestoreSpec struct {
// BackupSet defines the source of backup set
// BackupSet defines the source of backup set.
// It works only when PolarDBXBackup object of this BackupSet still exists.
BackupSet string `json:"backupset,omitempty"`

// From defines the source information, either backup sets, snapshot or an running cluster.
// StorageProvider defines storage used to perform backup
// +optional
StorageProvider *BackupStorageProvider `json:"storageProvider,omitempty"`

// From defines the source information, either a running cluster, backup set path or backup selector.
//
// If PolarDBXRestoreFrom.BackupSetPath provided, restore will be performed using metadata backup in remote storage.
// It works only when BackupSet is empty and StorageProvider is provided.
From PolarDBXRestoreFrom `json:"from,omitempty"`

// Time defines the specified time of the restored data, in the format of 'yyyy-MM-dd HH:mm:ss'. Required.
// Time defines the specified time of the restored data, in the format of 'yyyy-MM-ddTHH:mm:ssZ'. Required.
Time string `json:"time,omitempty"`

// TimeZone defines the specified time zone of the restore time. Default is the location of current cluster.
Expand All @@ -37,15 +45,32 @@ type RestoreSpec struct {
// 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"`

// BinlogSource defines the binlog datasource
// +optional
BinlogSource *RestoreBinlogSource `json:"binlogSource,omitempty"`
}

// PolarDBXRestoreFrom defines the source information of the restored cluster.
type PolarDBXRestoreFrom struct {
// PolarBDXName defines the the polardbx name that this polardbx is restored from. Optional.
// PolarBDXName defines the polardbx name that this polardbx is restored from. Optional.
// +optional
PolarBDXName string `json:"clusterName,omitempty"`

// BackupSetPath defines the location of backup set in remote storage
BackupSetPath string `json:"backupSetPath,omitempty"`

// BackupSelector defines the selector for the backups to be selected. Optional.
// +optional
BackupSelector map[string]string `json:"backupSelector,omitempty"`
}

// RestoreBinlogSource defines the binlog datasource
type RestoreBinlogSource struct {
//Namespace defines the source binlog namespace
Namespace string `json:"namespace,omitempty"`
//Checksum defines the binlog file checksum.
Checksum string `json:"checksum,omitempty"`
//StorageProvider defines the source binlog sink
StorageProvider *BackupStorageProvider `json:"storageProvider,omitempty"`
}
7 changes: 6 additions & 1 deletion api/v1/polardbx/status.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ package polardbx

import (
"fmt"

corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down Expand Up @@ -154,6 +153,12 @@ type ClusterReplicasStatus struct {
CDC *ReplicasStatus `json:"cdc,omitempty"`
}

// PitrStatus represents the status ot pitr restore
type PitrStatus struct {
PrepareJobEndpoint string `json:"preapreJobEndpoint,omitempty"`
Job string `json:"job,omitempty"`
}

type MonitorStatus string

const (
Expand Down
2 changes: 1 addition & 1 deletion api/v1/polardbx/topology.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ type XStoreTemplate struct {
// +optional
ServiceType corev1.ServiceType `json:"serviceType,omitempty"`

// +kubebuilder:default=true
// +kubebuilder:default=false

// HostNetwork mode.
// +optional
Expand Down
Loading

0 comments on commit e11ca8b

Please sign in to comment.