Merge pull request #1874 from mrlihanbo/proxy-header-api
add ProxyHeader API
This commit is contained in:
commit
14e673be3d
|
@ -14151,6 +14151,14 @@
|
|||
"description": "Provider represents the cloud provider name of the member cluster.",
|
||||
"type": "string"
|
||||
},
|
||||
"proxyHeader": {
|
||||
"description": "ProxyHeader is the HTTP header required by proxy server. The key in the key-value pair is HTTP header key and value is the associated header payloads. For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').",
|
||||
"type": "object",
|
||||
"additionalProperties": {
|
||||
"type": "string",
|
||||
"default": ""
|
||||
}
|
||||
},
|
||||
"proxyURL": {
|
||||
"description": "ProxyURL is the proxy URL for the cluster. If not empty, the karmada control plane will use this proxy to talk to the cluster. More details please refer to: https://github.com/kubernetes/client-go/issues/351",
|
||||
"type": "string"
|
||||
|
|
|
@ -61,6 +61,12 @@ type ClusterSpec struct {
|
|||
// +optional
|
||||
ProxyURL string
|
||||
|
||||
// ProxyHeader is the HTTP header required by proxy server.
|
||||
// The key in the key-value pair is HTTP header key and value is the associated header payloads.
|
||||
// For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').
|
||||
// +optional
|
||||
ProxyHeader map[string]string
|
||||
|
||||
// Provider represents the cloud provider name of the member cluster.
|
||||
// +optional
|
||||
Provider string
|
||||
|
|
|
@ -73,6 +73,12 @@ type ClusterSpec struct {
|
|||
// +optional
|
||||
ProxyURL string `json:"proxyURL,omitempty"`
|
||||
|
||||
// ProxyHeader is the HTTP header required by proxy server.
|
||||
// The key in the key-value pair is HTTP header key and value is the associated header payloads.
|
||||
// For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').
|
||||
// +optional
|
||||
ProxyHeader map[string]string `json:"proxyHeader,omitempty"`
|
||||
|
||||
// Provider represents the cloud provider name of the member cluster.
|
||||
// +optional
|
||||
Provider string `json:"provider,omitempty"`
|
||||
|
|
|
@ -274,6 +274,7 @@ func autoConvert_v1alpha1_ClusterSpec_To_cluster_ClusterSpec(in *ClusterSpec, ou
|
|||
out.ImpersonatorSecretRef = (*cluster.LocalSecretReference)(unsafe.Pointer(in.ImpersonatorSecretRef))
|
||||
out.InsecureSkipTLSVerification = in.InsecureSkipTLSVerification
|
||||
out.ProxyURL = in.ProxyURL
|
||||
out.ProxyHeader = *(*map[string]string)(unsafe.Pointer(&in.ProxyHeader))
|
||||
out.Provider = in.Provider
|
||||
out.Region = in.Region
|
||||
out.Zone = in.Zone
|
||||
|
@ -293,6 +294,7 @@ func autoConvert_cluster_ClusterSpec_To_v1alpha1_ClusterSpec(in *cluster.Cluster
|
|||
out.ImpersonatorSecretRef = (*LocalSecretReference)(unsafe.Pointer(in.ImpersonatorSecretRef))
|
||||
out.InsecureSkipTLSVerification = in.InsecureSkipTLSVerification
|
||||
out.ProxyURL = in.ProxyURL
|
||||
out.ProxyHeader = *(*map[string]string)(unsafe.Pointer(&in.ProxyHeader))
|
||||
out.Provider = in.Provider
|
||||
out.Region = in.Region
|
||||
out.Zone = in.Zone
|
||||
|
|
|
@ -147,6 +147,13 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
|||
*out = new(LocalSecretReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.ProxyHeader != nil {
|
||||
in, out := &in.ProxyHeader, &out.ProxyHeader
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]v1.Taint, len(*in))
|
||||
|
|
|
@ -147,6 +147,13 @@ func (in *ClusterSpec) DeepCopyInto(out *ClusterSpec) {
|
|||
*out = new(LocalSecretReference)
|
||||
**out = **in
|
||||
}
|
||||
if in.ProxyHeader != nil {
|
||||
in, out := &in.ProxyHeader, &out.ProxyHeader
|
||||
*out = make(map[string]string, len(*in))
|
||||
for key, val := range *in {
|
||||
(*out)[key] = val
|
||||
}
|
||||
}
|
||||
if in.Taints != nil {
|
||||
in, out := &in.Taints, &out.Taints
|
||||
*out = make([]v1.Taint, len(*in))
|
||||
|
|
|
@ -682,6 +682,22 @@ func schema_pkg_apis_cluster_v1alpha1_ClusterSpec(ref common.ReferenceCallback)
|
|||
Format: "",
|
||||
},
|
||||
},
|
||||
"proxyHeader": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "ProxyHeader is the HTTP header required by proxy server. The key in the key-value pair is HTTP header key and value is the associated header payloads. For the header with multiple values, the values should be separated by comma(e.g. 'k1': 'v1,v2,v3').",
|
||||
Type: []string{"object"},
|
||||
AdditionalProperties: &spec.SchemaOrBool{
|
||||
Allows: true,
|
||||
Schema: &spec.Schema{
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Default: "",
|
||||
Type: []string{"string"},
|
||||
Format: "",
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
},
|
||||
"provider": {
|
||||
SchemaProps: spec.SchemaProps{
|
||||
Description: "Provider represents the cloud provider name of the member cluster.",
|
||||
|
|
Loading…
Reference in New Issue