Skip to content

Commit

Permalink
Merge pull request karmada-io#1874 from mrlihanbo/proxy-header-api
Browse files Browse the repository at this point in the history
add ProxyHeader API
  • Loading branch information
karmada-bot authored Jun 4, 2022
2 parents 15c8ec5 + 08833eb commit 14e673b
Show file tree
Hide file tree
Showing 7 changed files with 52 additions and 0 deletions.
8 changes: 8 additions & 0 deletions api/openapi-spec/swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/cluster/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions pkg/apis/cluster/v1alpha1/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"`
Expand Down
2 changes: 2 additions & 0 deletions pkg/apis/cluster/v1alpha1/zz_generated.conversion.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pkg/apis/cluster/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 7 additions & 0 deletions pkg/apis/cluster/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 16 additions & 0 deletions pkg/generated/openapi/zz_generated.openapi.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 14e673b

Please sign in to comment.