rebase: update kubernetes to v1.23.0

updating go dependency to latest kubernetes
released version i.e v1.23.0

Signed-off-by: Madhu Rajanna <madhupr007@gmail.com>
This commit is contained in:
Madhu Rajanna
2021-12-08 19:20:47 +05:30
committed by mergify[bot]
parent 42403e2ba7
commit 5762da3e91
789 changed files with 49781 additions and 11501 deletions

View File

@ -19,6 +19,7 @@ package dynamic
import (
"context"
"fmt"
"net/http"
"k8s.io/apimachinery/pkg/api/meta"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
@ -60,17 +61,30 @@ func NewForConfigOrDie(c *rest.Config) Interface {
}
// NewForConfig creates a new dynamic client or returns an error.
// NewForConfig is equivalent to NewForConfigAndClient(c, httpClient),
// where httpClient was generated with rest.HTTPClientFor(c).
func NewForConfig(inConfig *rest.Config) (Interface, error) {
config := ConfigFor(inConfig)
httpClient, err := rest.HTTPClientFor(config)
if err != nil {
return nil, err
}
return NewForConfigAndClient(config, httpClient)
}
// NewForConfigAndClient creates a new dynamic client for the given config and http client.
// Note the http client provided takes precedence over the configured transport values.
func NewForConfigAndClient(inConfig *rest.Config, h *http.Client) (Interface, error) {
config := ConfigFor(inConfig)
// for serializing the options
config.GroupVersion = &schema.GroupVersion{}
config.APIPath = "/if-you-see-this-search-for-the-break"
restClient, err := rest.RESTClientFor(config)
restClient, err := rest.RESTClientForConfigAndClient(config, h)
if err != nil {
return nil, err
}
return &dynamicClient{client: restClient}, nil
}
@ -110,6 +124,7 @@ func (c *dynamicResourceClient) Create(ctx context.Context, obj *unstructured.Un
result := c.client.client.
Post().
AbsPath(append(c.makeURLSegments(name), subresources...)...).
SetHeader("Content-Type", runtime.ContentTypeJSON).
Body(outBytes).
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
Do(ctx)
@ -145,6 +160,7 @@ func (c *dynamicResourceClient) Update(ctx context.Context, obj *unstructured.Un
result := c.client.client.
Put().
AbsPath(append(c.makeURLSegments(name), subresources...)...).
SetHeader("Content-Type", runtime.ContentTypeJSON).
Body(outBytes).
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
Do(ctx)
@ -181,6 +197,7 @@ func (c *dynamicResourceClient) UpdateStatus(ctx context.Context, obj *unstructu
result := c.client.client.
Put().
AbsPath(append(c.makeURLSegments(name), "status")...).
SetHeader("Content-Type", runtime.ContentTypeJSON).
Body(outBytes).
SpecificallyVersionedParams(&opts, dynamicParameterCodec, versionV1).
Do(ctx)
@ -211,6 +228,7 @@ func (c *dynamicResourceClient) Delete(ctx context.Context, name string, opts me
result := c.client.client.
Delete().
AbsPath(append(c.makeURLSegments(name), subresources...)...).
SetHeader("Content-Type", runtime.ContentTypeJSON).
Body(deleteOptionsByte).
Do(ctx)
return result.Error()
@ -225,6 +243,7 @@ func (c *dynamicResourceClient) DeleteCollection(ctx context.Context, opts metav
result := c.client.client.
Delete().
AbsPath(c.makeURLSegments("")...).
SetHeader("Content-Type", runtime.ContentTypeJSON).
Body(deleteOptionsByte).
SpecificallyVersionedParams(&listOptions, dynamicParameterCodec, versionV1).
Do(ctx)