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

enable LoadBalancer type karmada-apiserver service in operator #5773

Merged
merged 1 commit into from
Nov 4, 2024

Conversation

chaosi-zju
Copy link
Member

What type of PR is this?

/kind feature

What this PR does / why we need it:

enable LoadBalancer type karmada-apiserver service in operator

Which issue(s) this PR fixes:

Fixes part of #5767

Special notes for your reviewer:

Does this PR introduce a user-facing change?:

`karmada-operator`:  enable LoadBalancer type karmada-apiserver service

@karmada-bot karmada-bot added the kind/feature Categorizes issue or PR as related to a new feature. label Nov 2, 2024
@karmada-bot karmada-bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Nov 2, 2024
@codecov-commenter
Copy link

codecov-commenter commented Nov 2, 2024

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

Attention: Patch coverage is 0% with 23 lines in your changes missing coverage. Please review.

Project coverage is 42.29%. Comparing base (057cf86) to head (7aae08f).

Files with missing lines Patch % Lines
operator/pkg/tasks/init/upload.go 0.00% 23 Missing ⚠️

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5773      +/-   ##
==========================================
- Coverage   42.31%   42.29%   -0.02%     
==========================================
  Files         655      655              
  Lines       55756    55779      +23     
==========================================
+ Hits        23591    23593       +2     
- Misses      30651    30673      +22     
+ Partials     1514     1513       -1     
Flag Coverage Δ
unittests 42.29% <0.00%> (-0.02%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@chaosi-zju
Copy link
Member Author

Test report:

  1. karmada-apiserver field configured as follows:
    karmadaAPIServer:
      imageRepository: registry.k8s.io/kube-apiserver
      imageTag: v1.30.4
      replicas: 1
      serviceType: LoadBalancer
      certSANs:
        - 172.18.255.200
      serviceSubnet: 10.96.0.0/12
  1. karmada installed success:
➜  lb kubectl get pods -o wide -n karmada-system 
NAME                                               READY   STATUS    RESTARTS   AGE     IP             NODE                                  NOMINATED NODE   READINESS GATES
karmada-aggregated-apiserver-7d86f7c5fd-f2r85      1/1     Running   0          4m4s    10.157.0.128   karmada-operator-host-control-plane   <none>           <none>
karmada-apiserver-ff9cf89f9-w2c7w                  1/1     Running   0          4m14s   10.157.0.127   karmada-operator-host-control-plane   <none>           <none>
karmada-controller-manager-68556b6b44-kjg62        1/1     Running   0          3m20s   10.157.0.130   karmada-operator-host-control-plane   <none>           <none>
karmada-descheduler-6cb7f6c5f7-s5cww               1/1     Running   0          3m20s   10.157.0.133   karmada-operator-host-control-plane   <none>           <none>
karmada-etcd-0                                     1/1     Running   0          4m16s   10.157.0.126   karmada-operator-host-control-plane   <none>           <none>
karmada-kube-controller-manager-766cb67f88-8sfcc   1/1     Running   0          3m20s   10.157.0.129   karmada-operator-host-control-plane   <none>           <none>
karmada-metrics-adapter-bc6775967-mh5jt            1/1     Running   0          3m20s   10.157.0.134   karmada-operator-host-control-plane   <none>           <none>
karmada-operator-78bc458f5-wxrfr                   1/1     Running   0          12m     10.157.0.114   karmada-operator-host-control-plane   <none>           <none>
karmada-scheduler-77f6f95d4d-vtwjz                 1/1     Running   0          3m20s   10.157.0.131   karmada-operator-host-control-plane   <none>           <none>
karmada-search-7cc95ddb7c-f7kwj                    1/1     Running   0          3m11s   10.157.0.135   karmada-operator-host-control-plane   <none>           <none>
karmada-webhook-b49bdf9df-lb94n                    1/1     Running   0          3m20s   10.157.0.132   karmada-operator-host-control-plane   <none>           <none>
  1. loadbalacner type karmada-apiserver service works:
$ kubectl get svc karmada-apiserver -n karmada-system
NAME                TYPE           CLUSTER-IP       EXTERNAL-IP      PORT(S)          AGE
karmada-apiserver   LoadBalancer   100.157.157.50   172.18.255.200   5443:31490/TCP   4m6s

$ curl --cert /tmp/cert/client.crt --key /tmp/cert/client.key -k https://172.18.255.200:5443/api
{
  "kind": "APIVersions",
  "versions": [
    "v1"
  ],
  "serverAddressByClientCIDRs": [
    {
      "clientCIDR": "0.0.0.0/0",
      "serverAddress": "10.157.0.127:5443"
    }
  ]
}#                                                                                                                                                                                                                    

operator/pkg/tasks/init/upload.go Outdated Show resolved Hide resolved
operator/pkg/tasks/init/upload.go Show resolved Hide resolved
Signed-off-by: chaosi-zju <chaosi@zju.edu.cn>
Copy link
Member

@RainbowMango RainbowMango left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@karmada-bot karmada-bot added the lgtm Indicates that a PR is ready to be merged. label Nov 4, 2024
@karmada-bot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: RainbowMango

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

@karmada-bot karmada-bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 4, 2024
@karmada-bot karmada-bot merged commit 3ccd0fe into karmada-io:master Nov 4, 2024
18 checks passed
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/S Denotes a PR that changes 10-29 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants