aboutsummaryrefslogtreecommitdiff
path: root/plugin/kubernetes/object/service.go
diff options
context:
space:
mode:
Diffstat (limited to 'plugin/kubernetes/object/service.go')
-rw-r--r--plugin/kubernetes/object/service.go12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugin/kubernetes/object/service.go b/plugin/kubernetes/object/service.go
index be010e96b..af9a42b48 100644
--- a/plugin/kubernetes/object/service.go
+++ b/plugin/kubernetes/object/service.go
@@ -16,6 +16,9 @@ type Service struct {
ExternalName string
Ports []api.ServicePort
+ // ExternalIPs we may want to export.
+ ExternalIPs []string
+
*Empty
}
@@ -37,6 +40,8 @@ func ToService(obj interface{}) interface{} {
ClusterIP: svc.Spec.ClusterIP,
Type: svc.Spec.Type,
ExternalName: svc.Spec.ExternalName,
+
+ ExternalIPs: make([]string, len(svc.Status.LoadBalancer.Ingress)+len(svc.Spec.ExternalIPs)),
}
if len(svc.Spec.Ports) == 0 {
@@ -47,6 +52,11 @@ func ToService(obj interface{}) interface{} {
copy(s.Ports, svc.Spec.Ports)
}
+ li := copy(s.ExternalIPs, svc.Spec.ExternalIPs)
+ for i, lb := range svc.Status.LoadBalancer.Ingress {
+ s.ExternalIPs[li+i] = lb.IP
+ }
+
*svc = api.Service{}
return s
@@ -65,8 +75,10 @@ func (s *Service) DeepCopyObject() runtime.Object {
Type: s.Type,
ExternalName: s.ExternalName,
Ports: make([]api.ServicePort, len(s.Ports)),
+ ExternalIPs: make([]string, len(s.ExternalIPs)),
}
copy(s1.Ports, s.Ports)
+ copy(s1.ExternalIPs, s.ExternalIPs)
return s1
}
ption value='feat/seo-components'>feat/seo-components Unnamed repository; edit this file 'description' to name the repository.
aboutsummaryrefslogtreecommitdiff
path: root/packages/astro/test/fixtures/config-port (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2021-11-19Fix blog example (#1910)Gravatar Matthew Phillips 1-1/+1
2021-11-19Version Packages (next) (#1907)astro@0.21.0-next.10Gravatar github-actions[bot] 23-21/+28
2021-11-19Remove further dependence on vite package (#1906)Gravatar Matthew Phillips 3-5/+9
2021-11-19Version Packages (next) (#1904)astro@0.21.0-next.9Gravatar github-actions[bot] 23-21/+30
2021-11-19Remove OSX \x00 workaround (#1901)Gravatar Matthew Phillips 2-5/+5
2021-11-19Resolve vite client modules to vendored vite (#1903)Gravatar Matthew Phillips 2-2/+7
2021-11-19[ci] yarn formatGravatar matthewp 1-3/+3
2021-11-19Add Debug tests (#1882)Gravatar Matthew Phillips 4-0/+62
2021-11-19[ci] collect statsGravatar FredKSchott 1-0/+1
2021-11-19Version Packages (next) (#1881)astro@0.21.0-next.8@astrojs/renderer-vue@0.2.0-next.2Gravatar github-actions[bot] 25-23/+42
2021-11-18Improve HMR (#1896)Gravatar Drew Powers 2-10/+18
2021-11-18update depsGravatar Fred K. Schott 5-352/+65
2021-11-18fix #1778Gravatar Fred K. Schott 2-1/+8
2021-11-18Update compiler (#1869)Gravatar Nate Moore 3-11/+6
2021-11-18remove unused remark dependency (#1894)Gravatar Fred K. Schott 2-245/+13
2021-11-18Improve error messages (#1875)Gravatar Drew Powers 39-61/+448
2021-11-18pin astro compiler to older versionGravatar Fred K. Schott 2-5/+5
2021-11-18Update yarn.lock to reflect the state of the package.json files (#1892)Gravatar Jonathan Neal 5-1300/+1000
2021-11-19[ci] yarn formatGravatar FredKSchott 1-5/+3