apecloud / kubeblocks

KubeBlocks is an open-source control plane software that runs and manages databases, message queues and other stateful applications on K8s.
https://kubeblocks.io
GNU Affero General Public License v3.0
2.1k stars 170 forks source link

[Improvement] Specify backup/restore PORT by name #7229

Open shanshanying opened 5 months ago

shanshanying commented 5 months ago

Descriptions

When a backup job is created, some built-in ENVs will be injected into the backup JOB to perform a BACKUP task. Such envs are not not limited to:

- name: DP_DB_HOST
  value: mycluster-mysql-comp-0.mycluster-mysql-comp-headless
- name: DP_DB_PORT
  value: "3306"

The full list of ENVs can be found in : https://github.com/apecloud/kubeblocks/blob/6ef3c133d86dd40f5aa108415a4594378f96d27a/pkg/dataprotection/types/constant.go#L82

These ENVs are inferred from target cluster (say on which cluster to do backup). e.g.

Since release 0.9, ConnectionCredential is deprecated. we'd better as as useer to

  1. explicitly specifiy the PROT
  2. specify by either port number of port name (there are cases PORT Nubmer is not fixed, e.g. svc.spec.ports[].targePort is of type 'intorstring')
YTGhost commented 5 months ago

Hi, I'm interested in this issue. Please assign it to me. Thanks.

YTGhost commented 5 months ago

@shanshanying Hi, I am trying to solve this issue, but I still have some unclear points about it, such as where should the user specify the PORT?

github-actions[bot] commented 4 months ago

This issue has been marked as stale because it has been open for 30 days with no activity