Skip to content

Commit

Permalink
Update deps
Browse files Browse the repository at this point in the history
Signed-off-by: Tamal Saha <[email protected]>
  • Loading branch information
tamalsaha committed Nov 18, 2024
1 parent aacb720 commit 2d1178d
Show file tree
Hide file tree
Showing 28 changed files with 727 additions and 19 deletions.
4 changes: 2 additions & 2 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ require (
k8s.io/client-go v0.30.2
k8s.io/klog/v2 v2.130.1
k8s.io/kubectl v0.30.2
kmodules.xyz/client-go v0.30.37
kmodules.xyz/resource-metadata v0.22.2
kmodules.xyz/client-go v0.30.38
kmodules.xyz/resource-metadata v0.22.3
kmodules.xyz/sets v0.29.0
kubepack.dev/chart-doc-gen v0.4.7
kubepack.dev/kubepack v0.29.2-0.20240519151029-6ba83ceff9d4
Expand Down
8 changes: 4 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -1156,8 +1156,8 @@ kmodules.xyz/apiversion v0.2.0 h1:vAQYqZFm4xu4pbB1cAdHbFEPES6EQkcR4wc06xdTOWk=
kmodules.xyz/apiversion v0.2.0/go.mod h1:oPX8g8LvlPdPX3Yc5YvCzJHQnw3YF/X4/jdW0b1am80=
kmodules.xyz/apply v0.29.0 h1:0OXGfE2IPuvXHk6uI9zp6KCYdBibx8mK4PEl0g3LZ44=
kmodules.xyz/apply v0.29.0/go.mod h1:bwToXErB+DC7/EEWjQVARCSbJBjGx5hIEuV1n0tC73g=
kmodules.xyz/client-go v0.30.37 h1:hj4BMsNDgRVc2aDPB6Y3x5iCylXTZDZeQPJp/oA6lxs=
kmodules.xyz/client-go v0.30.37/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM=
kmodules.xyz/client-go v0.30.38 h1:kAQ3FdgX2HbkmfFGEoeKz7fmJYWo1Ndgdum50aaHyI0=
kmodules.xyz/client-go v0.30.38/go.mod h1:CAu+JlA8RVGtj6LQHu0Q1w2mnFUajuti49c7T1AvGdM=
kmodules.xyz/go-containerregistry v0.0.12 h1:Tl32QGmSqRVm9PUEb/f3dgDeu9zW5fVzt3qmAFIE37I=
kmodules.xyz/go-containerregistry v0.0.12/go.mod h1:KgeNg0hDsgeda+qc0NzWk0iVRdF0+ZIg/oRzGoYh78I=
kmodules.xyz/monitoring-agent-api v0.30.2 h1:sAgz5P5EXZqhlj1NzJ+QltAgeIx5bGSMj+aYy2EiKaw=
Expand All @@ -1168,8 +1168,8 @@ kmodules.xyz/offshoot-api v0.30.1 h1:TrulAYO+oBsXe9sZZGTmNWIuI8qD2izMpgcTSPvgAmI
kmodules.xyz/offshoot-api v0.30.1/go.mod h1:T3mpjR6fui0QzOcmQvIuANytW48fe9ytmy/1cgx6D4g=
kmodules.xyz/prober v0.29.0 h1:Ex7m4F9rH7uWNNJlLgP63ROOM+nUATJkC2L5OQ7nwMg=
kmodules.xyz/prober v0.29.0/go.mod h1:UtK+HKyI1lFLEKX+HFLyOCVju6TO93zv3kwGpzqmKOo=
kmodules.xyz/resource-metadata v0.22.2 h1:TJDSTeyuYdLPnHW3biTNlB6OtJfdQfkZ3C0Tukxsoy8=
kmodules.xyz/resource-metadata v0.22.2/go.mod h1:G57v46vQOq5P1HIs9Rl7lJ5Y4dBcjJG5OyxApTdSyNs=
kmodules.xyz/resource-metadata v0.22.3 h1:cDxIvOYcWPnv372puDmhB0klHXaaQrV98JloeTkC4wU=
kmodules.xyz/resource-metadata v0.22.3/go.mod h1:zq0gtycDR21iPzhhqrbOGF4lwffIgQ9xiS8T34aJqjk=
kmodules.xyz/resource-metrics v0.30.5 h1:ZhpGeR9DCz1HTrKUg/mWhr95wlFzCPRdgVAqwaggy1o=
kmodules.xyz/resource-metrics v0.30.5/go.mod h1:w9+rz7/s/kGP1GWzYSuRdCn+l7EwpesmESSEHkLBnIQ=
kmodules.xyz/schema-checker v0.4.2 h1:tAbxEtM759GxDM/3sQi/+OKKwUsEF+Ih4KReV3Eb/Xw=
Expand Down
19 changes: 19 additions & 0 deletions vendor/k8s.io/apiserver/pkg/authentication/user/doc.go

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

84 changes: 84 additions & 0 deletions vendor/k8s.io/apiserver/pkg/authentication/user/user.go

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

9 changes: 9 additions & 0 deletions vendor/kmodules.xyz/client-go/api/v1/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,21 @@ const (
HostingProviderGeneric HostingProvider = "Generic"
HostingProviderGKE HostingProvider = "GKE"
HostingProviderLinode HostingProvider = "Linode"
HostingProviderAkamai HostingProvider = "Akamai"
HostingProviderPacket HostingProvider = "Packet"
HostingProviderRancher HostingProvider = "Rancher"
HostingProviderScaleway HostingProvider = "Scaleway"
HostingProviderVultr HostingProvider = "Vultr"
)

func (h HostingProvider) ConvertToPreferredProvider() HostingProvider {
switch h {
case HostingProviderLinode:
return HostingProviderAkamai
}
return h
}

const (
AceInfoConfigMapName = "ace-info"

Expand Down
60 changes: 51 additions & 9 deletions vendor/kmodules.xyz/client-go/client/delegated.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ package client

import (
"context"
"net/http"
"strings"

apiutil2 "kmodules.xyz/client-go/client/apiutil"
Expand All @@ -26,7 +27,9 @@ import (
"k8s.io/apimachinery/pkg/apis/meta/v1/unstructured"
"k8s.io/apimachinery/pkg/runtime"
"k8s.io/apimachinery/pkg/runtime/schema"
"k8s.io/apiserver/pkg/authentication/user"
restclient "k8s.io/client-go/rest"
"k8s.io/client-go/transport"
"sigs.k8s.io/controller-runtime/pkg/client"
"sigs.k8s.io/controller-runtime/pkg/client/apiutil"
)
Expand All @@ -36,6 +39,9 @@ import (

// NewDelegatingClientInput encapsulates the input parameters to create a new delegating client.
type NewDelegatingClientInput struct {
config *restclient.Config
options client.Options

CacheReader client.Reader
Client client.Client
UncachedObjects []client.Object
Expand All @@ -58,9 +64,11 @@ func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error) {
uncachedGVKs[gvk] = struct{}{}
}

return &delegatingClient{
scheme: in.Client.Scheme(),
mapper: in.Client.RESTMapper(),
return &DelegatingClient{
config: in.config,
options: in.options,
scheme: in.Client.Scheme(),
mapper: in.Client.RESTMapper(),
Reader: &delegatingReader{
CacheReader: in.CacheReader,
ClientReader: in.Client,
Expand All @@ -75,33 +83,65 @@ func NewDelegatingClient(in NewDelegatingClientInput) (client.Client, error) {
}, nil
}

type delegatingClient struct {
type DelegatingClient struct {
client.Reader
client.Writer
client.StatusClient
client.SubResourceClientConstructor

scheme *runtime.Scheme
mapper meta.RESTMapper

config *restclient.Config
options client.Options
}

func (d *DelegatingClient) RestConfig() *restclient.Config {
return d.config
}

func (d *DelegatingClient) Impersonate(u user.Info) (*restclient.Config, client.Client, error) {
config := restclient.CopyConfig(d.config)
config.Impersonate = restclient.ImpersonationConfig{
UserName: u.GetName(),
UID: u.GetUID(),
Groups: u.GetGroups(),
Extra: u.GetExtra(),
}

// share the transport between all clients
optionsShallowCopy := d.options
if d.options.HTTPClient != nil {
optionsShallowCopy.HTTPClient = &http.Client{
Transport: transport.NewImpersonatingRoundTripper(transport.ImpersonationConfig{
UserName: u.GetName(),
UID: u.GetUID(),
Groups: u.GetGroups(),
Extra: u.GetExtra(),
}, d.options.HTTPClient.Transport),
}
}
cc, err := NewClient(config, optionsShallowCopy)
return config, cc, err
}

// GroupVersionKindFor returns the GroupVersionKind for the given object.
func (d *delegatingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) {
func (d *DelegatingClient) GroupVersionKindFor(obj runtime.Object) (schema.GroupVersionKind, error) {
return apiutil.GVKForObject(obj, d.scheme)
}

// IsObjectNamespaced returns true if the GroupVersionKind of the object is namespaced.
func (d *delegatingClient) IsObjectNamespaced(obj runtime.Object) (bool, error) {
func (d *DelegatingClient) IsObjectNamespaced(obj runtime.Object) (bool, error) {
return apiutil.IsObjectNamespaced(obj, d.scheme, d.mapper)
}

// Scheme returns the scheme this client is using.
func (d *delegatingClient) Scheme() *runtime.Scheme {
func (d *DelegatingClient) Scheme() *runtime.Scheme {
return d.scheme
}

// RESTMapper returns the rest mapper this client is using.
func (d *delegatingClient) RESTMapper() meta.RESTMapper {
func (d *DelegatingClient) RESTMapper() meta.RESTMapper {
return d.mapper
}

Expand Down Expand Up @@ -167,7 +207,7 @@ func (d *delegatingReader) List(ctx context.Context, list client.ObjectList, opt
return d.CacheReader.List(ctx, list, opts...)
}

func (d *delegatingClient) SubResource(subResource string) client.SubResourceClient {
func (d *DelegatingClient) SubResource(subResource string) client.SubResourceClient {
return d.SubResourceClientConstructor.SubResource(subResource)
}

Expand All @@ -181,6 +221,8 @@ func NewClient(config *restclient.Config, options client.Options) (client.Client
return nil, err
}
co := NewDelegatingClientInput{
config: config,
options: options,
Client: c,
Cachable: cachable,
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
/*
Copyright AppsCode Inc. and Contributors
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package v1alpha1

import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

const (
ResourceKindGatewayInfo = "GatewayInfo"
ResourceGatewayInfo = "gatewayinfo"
ResourceGatewayInfos = "gatewayinfos"
)

// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type GatewayInfo struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec GatewayInfoSpec `json:"spec,omitempty"`
}

type GatewayInfoSpec struct {
GatewayClassName string `json:"gatewayClassName"`
ServiceType string `json:"serviceType"`
HostName string `json:"hostName,omitempty"`
IP string `json:"ip,omitempty"`
}
Loading

0 comments on commit 2d1178d

Please sign in to comment.