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

proxy subcommand doesn't work for the latest cluster-proxy #347

Closed
yana1205 opened this issue Jun 12, 2023 · 3 comments · Fixed by #348
Closed

proxy subcommand doesn't work for the latest cluster-proxy #347

yana1205 opened this issue Jun 12, 2023 · 3 comments · Fixed by #348
Assignees

Comments

@yana1205
Copy link

yana1205 commented Jun 12, 2023

Hi, I am going through https://open-cluster-management.io/getting-started/integration/cluster-proxy/ and facing the following error at the step of "Command-line tools" in "Usage" section.

$ clusteradm proxy health
Error: failed getting managedproxyconfiguration for cluster-proxy: resource name may not be empty

Probably this issue is relating with this comment (https://github.com/open-cluster-management-io/clusteradm/blob/main/pkg/cmd/proxy/health/exec.go#L106) so will be fixed sooner or later but let me open it.

Now I am using cluster-proxy v0.3.0 and it seems that cluster-proxy doesn't return any value in AddOnConfiguration.CRName for clustermanagementaddons because probably addOnConfiguration is deprecated.

$ kubectl get clustermanagementaddons
NAME            DISPLAY NAME    CRD NAME
cluster-proxy   cluster-proxy  

If I switch to use supportedConfigs[0].defaultConfig.name field (the value is actually cluster-proxy) at https://github.com/open-cluster-management-io/clusteradm/blob/main/pkg/cmd/proxy/health/exec.go#L109 as the comment indicates, it turns into working.

$ go run ./cmd/clusteradm/clusteradm.go proxy health                                            
CLUSTER NAME    INSTALLED    AVAILABLE    PROBED HEALTH    LATENCY
cluster1        True         True         True             16.01925ms

Environment

clusteradm

$ clusteradm version
client          version :v0.6.0
server release  version :v1.26.0
default bundle  version :0.11.0

cluster-proxy addon: v0.3.0
managed-serviceaccount addon: v0.3.0

$ helm -n open-cluster-management-addon ls
NAME                    NAMESPACE                       REVISION        UPDATED                                 STATUS          CHART                           APP VERSION
cluster-proxy           open-cluster-management-addon   1               2023-06-12 17:42:56.936825 +0900 JST    deployed        cluster-proxy-0.3.0             1.0.0      
managed-serviceaccount  open-cluster-management-addon   1               2023-06-12 18:05:47.798653 +0900 JST    deployed        managed-serviceaccount-0.3.0    1.0.0      
@yana1205 yana1205 reopened this Jun 12, 2023
@mikeshng
Copy link
Member

Thank you @yana1205 for all the great details in this bug report.

CC @xuezhaojun @ycyaoxdu I am not sure if this is a clusteradm or cluster proxy issue.

@xuezhaojun
Copy link
Member

Hi, @mikeshng it's a clusteradm issue, as @yana1205 mentioned above, it's because clusteradm is using a deprecated field to Get the managedproxyconfiguration. That's exactly the root cause, thanks for reporting @yana1205

@qiujian16
Copy link
Member

/assign @xuezhaojun

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

4 participants