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

feat: support using os repository to install packages. #1510

Merged
merged 1 commit into from Sep 16, 2022

Conversation

24sama
Copy link
Collaborator

@24sama 24sama commented Sep 16, 2022

What type of PR is this?

/kind feature

What this PR does / why we need it:

Support using os repository to install packages. It needs user to set up the KKMachine or KKMachineTemplate, For example:

  1. If we do not configure any fields related to the repository, then capkk will not do anything with the os repository.
apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: KKMachineTemplate
metadata:
  name: 'kk-md-0'
spec:
  template:
    spec:
      roles:
        - control-plane
        - worker
  1. Use the os original repository. Update the repository cache first, then install the default necessary packages.
spec:
  template:
    spec:
      roles:
        - control-plane
        - worker
      repository:
        iso: none
        update: true
  1. CAPKK detects the os-release info and generates the iso name automatically, downloads the ISO file (from the release page by default), mounts it on /mnt/kubekey/iso/, then uses it as a local repository to install packages.
spec:
  template:
    spec:
      roles:
        - control-plane
        - worker
      repository:
        iso: auto
        update: true
  1. Offline environment using custom iso files, 192.168.100.1 is a FTP server.
# KKCluster
spec:
  component:
    host: 192.168.100.1
    overrides:
      - id: rhel
        version: "7"
        arch: arm64
        path: /myiso/rhel7-rpms-arm64.iso
        checksum: xxxxxxxx
---
## KKMachineTemplate
spec:
  template:
    spec:
      roles:
        - control-plane
        - worker
      repository:
        iso: rhel7-rpms-arm64.iso
        update: true

Which issue(s) this PR fixes:

Fixes #

Special notes for reviewers:

Does this PR introduced a user-facing change?


Additional documentation, usage docs, etc.:


@ks-ci-bot ks-ci-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 16, 2022
@ks-ci-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: 24sama

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:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@ks-ci-bot ks-ci-bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 16, 2022
Signed-off-by: 24sama <jacksama@foxmail.com>
@24sama
Copy link
Collaborator Author

24sama commented Sep 16, 2022

/cc @kubesphere/sig-installation

@ks-ci-bot ks-ci-bot requested a review from a team September 16, 2022 02:48
@pixiake
Copy link
Collaborator

pixiake commented Sep 16, 2022

/lgtm

@ks-ci-bot ks-ci-bot added the lgtm Indicates that a PR is ready to be merged. label Sep 16, 2022
@ks-ci-bot
Copy link
Collaborator

LGTM label has been added.

Git tree hash: 43475167febe96566a0a67fe6bf2798035d1c0a1

@ks-ci-bot ks-ci-bot merged commit b731d2f into kubesphere:master Sep 16, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. kind/feature Categorizes issue or PR as related to a new feature. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants