From 680ebe23ded8578f24a4287c147fb9ce3d63b57a Mon Sep 17 00:00:00 2001 From: Patrick Dillon Date: Mon, 3 Jun 2019 15:42:04 -0400 Subject: [PATCH] Add ProxyStatus to config/v1/types_project. --- config/v1/types_proxy.go | 25 ++++++++++++++++++- config/v1/zz_generated.deepcopy.go | 17 +++++++++++++ .../v1/zz_generated.swagger_doc_generated.go | 19 +++++++++++--- 3 files changed, 57 insertions(+), 4 deletions(-) diff --git a/config/v1/types_proxy.go b/config/v1/types_proxy.go index 4004ace8b0e..5539c9aa57d 100644 --- a/config/v1/types_proxy.go +++ b/config/v1/types_proxy.go @@ -15,8 +15,12 @@ type Proxy struct { // Spec holds user-settable values for the proxy configuration // +required Spec ProxySpec `json:"spec"` + // status holds observed values from the cluster. They may not be overridden. + // +optional + Status ProxyStatus `json:"status"` } +// ProxySpec contains cluster proxy creation configuration. type ProxySpec struct { // httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var. // +optional @@ -26,7 +30,26 @@ type ProxySpec struct { // +optional HTTPSProxy string `json:"httpsProxy,omitempty"` - // noProxy is the list of domains for which the proxy should not be used. Empty means unset and will not result in an env var. + // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. + // Each name is matched as either a domain which contains the host name as a suffix, or the host name itself. + // For instance, example.com would match example.com, example.com:80, and www.example.com. + // Wildcard(*) characters are not accepted, except a single * character which matches all hosts + // and effectively disables the proxy. Empty means unset and will not result in an env var. + // +optional + NoProxy string `json:"noProxy,omitempty"` +} + +// ProxyStatus shows current known state of the cluster proxy. +type ProxyStatus struct { + // httpProxy is the URL of the proxy for HTTP requests. + // +optional + HTTPProxy string `json:"httpProxy,omitempty"` + + // httpsProxy is the URL of the proxy for HTTPS requests. + // +optional + HTTPSProxy string `json:"httpsProxy,omitempty"` + + // noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. // +optional NoProxy string `json:"noProxy,omitempty"` } diff --git a/config/v1/zz_generated.deepcopy.go b/config/v1/zz_generated.deepcopy.go index bb944cd89f5..aa7adfb6034 100644 --- a/config/v1/zz_generated.deepcopy.go +++ b/config/v1/zz_generated.deepcopy.go @@ -2413,6 +2413,7 @@ func (in *Proxy) DeepCopyInto(out *Proxy) { out.TypeMeta = in.TypeMeta in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) out.Spec = in.Spec + out.Status = in.Status return } @@ -2483,6 +2484,22 @@ func (in *ProxySpec) DeepCopy() *ProxySpec { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *ProxyStatus) DeepCopyInto(out *ProxyStatus) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProxyStatus. +func (in *ProxyStatus) DeepCopy() *ProxyStatus { + if in == nil { + return nil + } + out := new(ProxyStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RegistryLocation) DeepCopyInto(out *RegistryLocation) { *out = *in diff --git a/config/v1/zz_generated.swagger_doc_generated.go b/config/v1/zz_generated.swagger_doc_generated.go index 65e759682da..07da832296c 100644 --- a/config/v1/zz_generated.swagger_doc_generated.go +++ b/config/v1/zz_generated.swagger_doc_generated.go @@ -1098,8 +1098,9 @@ func (TemplateReference) SwaggerDoc() map[string]string { } var map_Proxy = map[string]string{ - "": "Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster`", - "spec": "Spec holds user-settable values for the proxy configuration", + "": "Proxy holds cluster-wide information on how to configure default proxies for the cluster. The canonical name is `cluster`", + "spec": "Spec holds user-settable values for the proxy configuration", + "status": "status holds observed values from the cluster. They may not be overridden.", } func (Proxy) SwaggerDoc() map[string]string { @@ -1115,15 +1116,27 @@ func (ProxyList) SwaggerDoc() map[string]string { } var map_ProxySpec = map[string]string{ + "": "ProxySpec contains cluster proxy creation configuration.", "httpProxy": "httpProxy is the URL of the proxy for HTTP requests. Empty means unset and will not result in an env var.", "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests. Empty means unset and will not result in an env var.", - "noProxy": "noProxy is the list of domains for which the proxy should not be used. Empty means unset and will not result in an env var.", + "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used. Each name is matched as either a domain which contains the host name as a suffix, or the host name itself. For instance, example.com would match example.com, example.com:80, and www.example.com. Wildcard(*) characters are not accepted, except a single * character which matches all hosts and effectively disables the proxy. Empty means unset and will not result in an env var.", } func (ProxySpec) SwaggerDoc() map[string]string { return map_ProxySpec } +var map_ProxyStatus = map[string]string{ + "": "ProxyStatus shows current known state of the cluster proxy.", + "httpProxy": "httpProxy is the URL of the proxy for HTTP requests.", + "httpsProxy": "httpsProxy is the URL of the proxy for HTTPS requests.", + "noProxy": "noProxy is a comma-separated list of hostnames and/or CIDRs for which the proxy should not be used.", +} + +func (ProxyStatus) SwaggerDoc() map[string]string { + return map_ProxyStatus +} + var map_Scheduler = map[string]string{ "": "Scheduler holds cluster-wide information about Scheduler. The canonical name is `cluster`", "metadata": "Standard object's metadata.",