kubesphere / kubekey

Install Kubernetes/K3s only, both Kubernetes/K3s and KubeSphere, and related cloud-native add-ons, it supports all-in-one, multi-node, and HA 🔥 ⎈ 🐳
https://kubesphere.io
Apache License 2.0
2.18k stars 518 forks source link

feat: add phase PostClusterInstall #2256

Closed will4j closed 1 month ago

will4j commented 1 month ago

What type of PR is this?

/kind feature

What this PR does / why we need it:

Support run scripts after k8s cluster installed and before AddonsModule

Below example change node taints so addons can be scheduled to control plane:

spec:
  system:
    postClusterInstall:
      - name: change taints config of control planes
        role: controller
        bash: |
          /bin/bash -x taint_control_plane.sh
        materials:
          - ./scripts/taint_control_plane.sh

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?

Support postClusterInstall custom scripts after cluster installation and before AddonsModule run.

Additional documentation, usage docs, etc.:

sonarcloud[bot] commented 1 month ago

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

will4j commented 1 month ago

/assign @pixiake

pixiake commented 1 month ago

@will4j Thanks for this contributions ! /lgtm /approve

ks-ci-bot commented 1 month ago

LGTM label has been added.

Git tree hash: f6741f394360857b3e7379af1b6f42060b674e76

ks-ci-bot commented 1 month ago

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: pixiake, will4j

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files: - ~~[OWNERS](https://github.com/kubesphere/kubekey/blob/master/OWNERS)~~ [pixiake] Approvers can indicate their approval by writing `/approve` in a comment Approvers can cancel approval by writing `/approve cancel` in a comment