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

SKS-1825: Support setting IPPools for network devices #165

Merged
merged 2 commits into from
Dec 20, 2023

Conversation

haijianyang
Copy link
Contributor

@haijianyang haijianyang commented Dec 15, 2023

Issue

支持为网卡配置 IPPool

Change

CAPE IPAM 技术文档
相关的PR:smartxworks/cluster-api-provider-elf-static-ip#34

Test

ElfMachine 配置 IPPool,分配到了 IP。

apiVersion: infrastructure.cluster.x-k8s.io/v1beta1
kind: ElfMachine
metadata:
  name: haijian-test1-controlplane-wgcpp
  namespace: default
  ownerReferences:
  - apiVersion: cluster.x-k8s.io/v1beta1
    blockOwnerDeletion: true
    controller: true
    kind: Machine
    name: haijian-test1-controlplane-5kggm
    uid: 41ddac80-9cee-4fd7-a572-34d915d711e5
spec:
  network:
    devices:
    - addressesFromPools:
      - apiGroup: ipam.metal3.io
        kind: IPPool
        name: ip-pool-test
      ipAddrs:
      - 1.1.1.20
      netmask: 255.255.0.0
      networkType: IPV4
      routes:
      - gateway: 1.1.0.1
      vlan: dd1f408f-7715-48c1-a817-13c3568f1d93_4cd00407-63ca-440b-80b7-ceacfccb8d08

IPPool 分配了 IP。

apiVersion: ipam.metal3.io/v1alpha1
kind: IPPool
metadata:
  finalizers:
  - ippool.ipam.metal3.io
  name: ip-pool-test
  namespace: default
spec:
  namePrefix: ip-pool-test
  pools:
  - dnsServers:
    - 114.114.114.114
    end: 1.1.1.30
    gateway: 1.1.0.1
    prefix: 16
    start: 1.1.1.20
status:
  indexes:
    default-haijian-test1-controlplane-wgcpp-0: 1.1.1.20
    default-haijian-test1-workergroup1-jhvrj-0: 1.1.1.21
  lastUpdated: "2023-12-15T07:18:59Z"

@haijianyang haijianyang requested a review from jessehu December 15, 2023 07:55
Copy link

codecov bot commented Dec 15, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (5e75d87) 59.72% compared to head (ff61414) 59.72%.

Additional details and impacted files
@@             Coverage Diff              @@
##           release-1.4     #165   +/-   ##
============================================
  Coverage        59.72%   59.72%           
============================================
  Files               20       20           
  Lines             3615     3615           
============================================
  Hits              2159     2159           
  Misses            1308     1308           
  Partials           148      148           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

metadata.yaml Outdated
@@ -6,6 +6,9 @@
apiVersion: clusterctl.cluster.x-k8s.io/v1alpha3
kind: Metadata
releaseSeries:
- major: 1
minor: 4
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CAPE先不用发1.4.0,继续使用1.3.x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

如何区分 1.3 和 1.4 的代码。

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

SKS 1.2.0 使用 CAPE 1.3.0
SKS 1.3.0 继续使用 CAPE 1.3.x 暂时不需要用1.4.0

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

用 release-1.3.x 分支?

@haijianyang haijianyang changed the base branch from release-1.4 to release-1.3 December 18, 2023 10:29
@haijianyang haijianyang merged commit bdebdaa into smartxworks:release-1.3 Dec 20, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants