sealerio / sealer

Build, Share and Run Both Your Kubernetes Cluster and Distributed Applications (Project under CNCF)
http://sealer.cool
Apache License 2.0
2.06k stars 360 forks source link

sealer plugins #445

Closed fanux closed 3 years ago

fanux commented 3 years ago

https://github.com/alibaba/sealer/blob/main/docs/design/plugin.md

  1. dump plugin config, call plugins
  2. hostname plugin
  3. shell plugin
  4. label plugin
  5. etcd backup plugin
fanux commented 3 years ago
apiVersion: sealer.aliyun.com/v1alpha1
kind: Plugin
metadata:
  name: ETCD_BACKUP
spec:
  action: Manual
  data: |
     alioss:
        ossendpoint: oss-cn-hangzhou.aliyuncs.com
        accesskeyid: *****
        accesskeysecrets: ****
        bucketname: etcdbackup
        objectpath: /sealos/

The action is Manual, you should trigger the plugin by manually: sealer plugin -f etcd_backup.yaml if not specify the oss config, just save it on local disk.

fanux commented 3 years ago

dump plugin config into $(rootfs)/plugin/ETCD_BACKUP file

ByboyCn commented 3 years ago

将数据转储到 $(rootfs)/plugin/ETCD_BACKUP 文件中

ECTD_BACKUP is file or folder?

ByboyCn commented 3 years ago

dump data into $(rootfs)/plugin/ETCD_BACKUP file

Will the content be copied directly or modified?

ByboyCn commented 3 years ago

dump data into $(rootfs)/plugin/ETCD_BACKUP file

Is the config generated automatically? If so, what are the tools?

ByboyCn commented 3 years ago

dump data into $(rootfs)/plugin/ETCD_BACKUP file

Does everything that needs to callhave an "on" tag?

fanux commented 3 years ago

将数据转储到 $(rootfs)/plugin/ETCD_BACKUP 文件中

ECTD_BACKUP is file or folder?

Is a file. Clusterfile will overwirte this file content. Get the config from Clusterfile.Plugin has default "on" tag.