-
Notifications
You must be signed in to change notification settings - Fork 3
Read the veccgslb in the defaultgslbmanager #72
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -1,5 +1,6 @@ | ||||||
| using KubeOps.KubernetesClient; | ||||||
| using Cyclops.MultiCluster.Models.K8sEntities; | ||||||
| using k8s.Models; | ||||||
|
|
||||||
| namespace Cyclops.MultiCluster.Services.Default | ||||||
| { | ||||||
|
|
@@ -18,7 +19,34 @@ public async Task<V1Gslb[]> GetGslbsAsync() | |||||
| { | ||||||
| _logger.LogInformation("Getting all gslb resources in the cluster"); | ||||||
| var resources = await _client.ListAsync<V1Gslb>(); | ||||||
| return resources.ToArray(); | ||||||
| var veccGslbs = await _client.ListAsync<V1VeccGslb>(); | ||||||
| var allResources = resources.ToList(); | ||||||
| allResources.AddRange(veccGslbs.Select(v => ToV1Gslb(v))); | ||||||
| return allResources.ToArray(); | ||||||
| } | ||||||
|
|
||||||
| public static V1Gslb ToV1Gslb(V1VeccGslb veccGslb) | ||||||
| { | ||||||
| return new V1Gslb | ||||||
| { | ||||||
| ApiVersion = veccGslb.ApiVersion, | ||||||
| Kind = "Gslb", | ||||||
|
Comment on lines
+32
to
+33
|
||||||
| ApiVersion = veccGslb.ApiVersion, | |
| Kind = "Gslb", |
Copilot
AI
Apr 13, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ObjectReference.Name is being set to veccGslb.Name() (the CRD object’s metadata.name) rather than the referenced ingress/service name. This will make downstream logic look up the wrong Service/Ingress. It should use veccGslb.ObjectReference.Name (matching the conversion logic already used in K8sChangedController).
| Name = veccGslb.Name(), | |
| Name = veccGslb.ObjectReference.Name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
using k8s.Models;appears unused in this file. Unused usings can produce build warnings (and can fail builds if warnings are treated as errors). Remove it unless something in this file explicitly needs types fromk8s.Models.