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

plugin不生效 #2338

Open
ChenWoChong opened this issue Mar 5, 2024 · 0 comments
Open

plugin不生效 #2338

ChenWoChong opened this issue Mar 5, 2024 · 0 comments
Labels
kind/bug Something isn't working

Comments

@ChenWoChong
Copy link

What happen?

当我使用一下clusterfile去创建集群时,plugin不生效,不知道是哪里写错了

apiVersion: sealer.io/v2
kind: Cluster
metadata:
  name: my-cluster
spec:

  hosts:
    - ips:
        - 10.56.60.165
      roles:
        - master
      ssh: {}
    - ips:
        - 10.56.60.217
      roles:
        - node
      ssh: {}
#  image: docker.io/sealerio/kubernetes:v1-22-15-sealerio-2
  image: localhost/my-cluster:v1.0.2
  registry:
    localRegistry:
      cert: {}
      domain: sea.hub
      ha: true
      insecure: false
      port: 5000

---
apiVersion: sealer.aliyun.com/v1alpha1
kind: Plugin
metadata:
  name: LabelDrsNode
spec:
  type: SHELL
  action: PostInstall # # 指定运行阶段【PreInit | PostInstall | PostClean】
  'on': node-role.kubernetes.io/master=
  data: |
    kubectl label nodes $(kubectl get nodes --selector='node-role.kubernetes.io/node=' -o=jsonpath='{.items[*].metadata.name}') node-role.kubernetes.io/drs= --overwrite
---
apiVersion: sealer.aliyun.com/v1alpha1
kind: Plugin
metadata:
  name: LoadImg
spec:
  type: SHELL
  action: PostInstall # # 指定运行阶段【PreInit | PostInstall | PostClean】
  data: |
    source drs-charts/install.sh img -d

sealer version:
sealer version
{"gitVersion":"v0.9.3","gitCommit":"a51d0ec","buildDate":"2023-03-31 05:58:58","goVersion":"go1.17.13","compiler":"gc","platform":"linux/amd64"}

Relevant log output?

[root@sea drs-charts]# kubectl get nodes --show-labels | grep drs
什么都没有

What you expected to happen?

在后置postinstall里增加了label,worker节点应该会显示的

How to reproduce it (as minimally and precisely as possible)?

No response

Anything else we need to know?

No response

What is the version of Sealer you using?

sealer version {"gitVersion":"v0.9.3","gitCommit":"a51d0ec","buildDate":"2023-03-31 05:58:58","goVersion":"go1.17.13","compiler":"gc","platform":"linux/amd64"}

What is your OS environment?

No response

What is the Kernel version?

CentOS 7.6

Other environment you want to tell us?

  • Cloud provider or hardware configuration:
  • Install tools:
  • Others:
@ChenWoChong ChenWoChong added the kind/bug Something isn't working label Mar 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant