Skip to content
This repository has been archived by the owner on Oct 10, 2023. It is now read-only.

Extend AntreaConfig to Support Antrea-NSX Registration Workflow #3816

Closed
wants to merge 2 commits into from

Conversation

liu4480
Copy link
Contributor

@liu4480 liu4480 commented Nov 2, 2022

What this PR does / why we need it

This patch extends antreaConfig to support antreaNsx, once antreaNsx is enabled in antreaConfig, addon controller will

  1. create nsxServiceAccount
  2. create providerServiceAccount
  3. update values.yaml in xxxx-antrea-package secret with antreaNsx enabled

upon the workload cluster is deleted, addon controller will

  1. delete nsxServiceAccount
  2. delete providerServiceAccount
  3. delete xxxx-antrea-package secret

Which issue(s) this PR fixes

Fixes #

Describe testing done for PR

  1. create a cluster in namespace antrea-test
  2. edit antreaConfig in antrea-test, add
  antreaNsx:
    enable: true
  1. check if nsxServiceAccount and providerServiceAccount are created in antrea-test
  2. check if there is antreaNsx enabled in secret whose name contains antrea-package in its data, use based64 -d to decode the content
  3. delete the cluster, check if nsxServiceAccount and providerServiceAccount are deleted
  4. check if secret in step 4 is deleted
  antreaNsx:
    enable: true

Release note


Additional information

Special notes for your reviewer

@liu4480
Copy link
Contributor Author

liu4480 commented Nov 3, 2022

/test install-vc7

@alfredthenarwhal
Copy link
Collaborator

@liu4480: /test install-vc7

Tests can be triggered only by the trusted reviewers (users mentioned in CODEOWNERS file).

@codecov
Copy link

codecov bot commented Nov 3, 2022

Codecov Report

Merging #3816 (4713aed) into main (6dabd94) will decrease coverage by 0.78%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #3816      +/-   ##
==========================================
- Coverage   48.53%   47.75%   -0.79%     
==========================================
  Files         446      469      +23     
  Lines       44195    45659    +1464     
==========================================
+ Hits        21449    21803     +354     
- Misses      20696    21790    +1094     
- Partials     2050     2066      +16     
Impacted Files Coverage Δ
cmd/cli/plugin/cluster/get_machinehealthcheck.go 11.42% <0.00%> (ø)
cmd/cli/plugin/cluster/scale.go 17.85% <0.00%> (ø)
.../cli/plugin/cluster/set_machinehealthcheck_node.go 23.33% <0.00%> (ø)
cmd/cli/plugin/cluster/set_node_pool.go 14.63% <0.00%> (ø)
cmd/cli/plugin/cluster/set_machinehealthcheck.go 23.33% <0.00%> (ø)
cmd/cli/plugin/cluster/get.go 6.27% <0.00%> (ø)
...in/cluster/set_machinehealthcheck_control_plane.go 21.21% <0.00%> (ø)
cmd/cli/plugin/cluster/kubeconfig_get.go 8.82% <0.00%> (ø)
cmd/cli/plugin/cluster/upgrade.go 58.94% <0.00%> (ø)
cmd/cli/plugin/cluster/get_node_pools.go 10.52% <0.00%> (ø)
... and 15 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@navidshaikh
Copy link
Contributor

/test install-vc7

@alfredthenarwhal
Copy link
Collaborator

Build failed! Build no: 3117

@liu4480
Copy link
Contributor Author

liu4480 commented Nov 7, 2022

/test install-vc7

@alfredthenarwhal
Copy link
Collaborator

@liu4480: /test install-vc7

Tests can be triggered only by the trusted reviewers (users mentioned in CODEOWNERS file).

@navidshaikh
Copy link
Contributor

/test install-vc7

@alfredthenarwhal
Copy link
Collaborator

Tests failed! Build no: 3126

@liu4480 liu4480 force-pushed the extend-antreaConfig branch 7 times, most recently from 8469a45 to f5601d4 Compare November 14, 2022 06:37
@liu4480
Copy link
Contributor Author

liu4480 commented Nov 14, 2022

/test install-vc7

@liu4480 liu4480 force-pushed the extend-antreaConfig branch 2 times, most recently from e0d0b03 to 57c9914 Compare November 15, 2022 09:58
@liu4480 liu4480 changed the title WIP: Extend antrea config Extend antrea config Nov 15, 2022
@liu4480
Copy link
Contributor Author

liu4480 commented Nov 15, 2022

/test install-vc7

@alfredthenarwhal
Copy link
Collaborator

@liu4480: /test install-vc7
Commit: 4ce571a

Build failed! Build no: 3206

@liu4480
Copy link
Contributor Author

liu4480 commented Nov 16, 2022

/test install-vc7

@liu4480 liu4480 force-pushed the extend-antreaConfig branch 6 times, most recently from d7c47aa to 1614dc0 Compare December 2, 2022 01:55
@liu4480 liu4480 force-pushed the extend-antreaConfig branch 5 times, most recently from aee41f0 to 9571095 Compare December 6, 2022 08:42
@liu4480 liu4480 force-pushed the extend-antreaConfig branch 2 times, most recently from 9d8bd69 to 6e56b4a Compare December 7, 2022 03:31
This patch extends antreaConfig to support antreaNsx, once antreaNsx is enabled in antreaConfig, addon controller will
1. create nsxServiceAccount
2. create providerServiceAccount
3. update values.yaml in xxxx-antrea-package secret with antreaNsx enabled

upon the workload cluster is deleted, addon controller will
1. delete nsxServiceAccount
2. delete providerServiceAccount
3. delete xxxx-antrea-package secret

Signed-off-by: Bin Liu <[email protected]>
}

type antrea struct {
AntreaConfigDataValue antreaConfigDataValue `yaml:"config,omitempty"`
}

type antreaNsx struct {
Copy link
Contributor

Choose a reason for hiding this comment

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

should antrea_configs_exist in clusterbootstrap.yaml be updated to include these ?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, it should be in another pull request #4098

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry that I misunderstood your comments. because this is not default setting for clusterbootstrap, when user wants to use this feature, they can edit antreaConfig manually. @jeffwubj

@liu4480
Copy link
Contributor Author

liu4480 commented Jan 3, 2023

close this pr as it is based on a forked repo. #4219 is already proposed

@liu4480 liu4480 closed this Jan 3, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants