运维开发网

1.14 k8s源码阅读-核心数据结构

运维开发网 https://www.qedev.com 2021-02-06 12:32 出处:51CTO 作者:1350368559
Group,资源组源码:kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.goVersion,资源版本源码:kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.gokubernetes/vendor/k8s.io/apimachinery/pkg/apis/

Group,资源组

源码:kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go

Version,资源版本

源码:kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go

kubernetes/vendor/k8s.io/apimachinery/pkg/apis/meta/v1/types.go
// APIVersions lists the versions that are available, to allow clients to
// discover the API at /api, which is the root path of the legacy v1 API.
//
// +protobuf.options.(gogoproto.goproto_stringer)=false
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
type APIVersions struct {
    TypeMeta `json:",inline"`
    // versions are the api versions that are available.
    Versions []string `json:"versions" protobuf:"bytes,1,rep,name=versions"`
    // a map of client CIDR to server address that is serving this group.
    // This is to help clients reach servers in the most network-efficient way possible.
    // Clients can use the appropriate server address as per the CIDR that they match.
    // In case of multiple matches, clients should use the longest matching CIDR.
    // The server returns only those CIDRs that it thinks that the client can match.
    // For example: the master will return an internal IP CIDR only, if the client reaches the server using an internal IP.
    // Server looks at X-Forwarded-For header or X-Real-Ip header or request.RemoteAddr (in that order) to get the client IP.
    ServerAddressByClientCIDRs []ServerAddressByClientCIDR `json:"serverAddressByClientCIDRs" protobuf:"bytes,2,rep,name=serverAddressByClientCIDRs"`
}

Alpha版本

Beta版本

Stable版本

Resource,资源

所有资源对象都是Entity,翻译为实体

0

精彩评论

暂无评论...
验证码 换一张
取 消