crd-client

command module
v0.0.0-...-6b6aee0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 20, 2022 License: GPL-3.0 Imports: 1 Imported by: 0

README

用于对CRD对象生成clientSet及Informer

1. 生成CRD的client, informer, lister

  1. 添加crd项目的对象对应包至 /apis, 格式为 /apis/gourpName/version/

  2. 添加文件中的代码生成注解

    • crd_types:
    // +genclient
    // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    type Crd struct
    
    // +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
    type CrdList struct
    
    • doc
    // +k8s:deepcopy-gen=package
    // +groupName=app.customer.domain  
    package v1
    
    • groupversion_info
    //+kubebuilder:object:generate=true
    //+groupName=app.customer.domain
    package v1
    
  3. /hack/tools.go 引用 k8s.io/code-generator,生成vendor

  4. 执行命令进行代码生成

    update-codegen
    

2. 添加client,informer到crdClientset

参照crdclientset.go crdinformerset.go文件中的格式,添加对应的的代码

Documentation

Overview

Package crd_client 功能描述: Date: 2022/5/20 author: lixiaoming

Directories

Path Synopsis
apis
app/v1
Package v1 功能描述: 生成 Lister Date: 2022/5/20 author: lixiaoming +k8s:deepcopy-gen=package +groupName=app.customer.domain Package v1 contains API Schema definitions for the app v1 API group +kubebuilder:object:generate=true +groupName=app.customer.domain Package v1 功能描述: Date: 2022/5/20 author: lixiaoming
Package v1 功能描述: 生成 Lister Date: 2022/5/20 author: lixiaoming +k8s:deepcopy-gen=package +groupName=app.customer.domain Package v1 contains API Schema definitions for the app v1 API group +kubebuilder:object:generate=true +groupName=app.customer.domain Package v1 功能描述: Date: 2022/5/20 author: lixiaoming
elasticsearch/v1
Package v1 contains API schema definitions for managing Elasticsearch resources.
Package v1 contains API schema definitions for managing Elasticsearch resources.
helm.fluxcd.io/v1
+k8s:deepcopy-gen=package,register +groupName=helm.fluxcd.io Package v1 is the v1 version of the API.
+k8s:deepcopy-gen=package,register +groupName=helm.fluxcd.io Package v1 is the v1 version of the API.
kb/v1
Package v1 is the v1 version of the API.
Package v1 is the v1 version of the API.
kibana/v1
Package v1 contains API schema definitions for managing Kibana resources.
Package v1 contains API schema definitions for managing Kibana resources.
Package clentset 功能描述: crd clientset test Date: 2022/5/20 author: lixiaoming Package crdclientset 功能描述: Date: 2022/5/20 author: lixiaoming
Package clentset 功能描述: crd clientset test Date: 2022/5/20 author: lixiaoming Package crdclientset 功能描述: Date: 2022/5/20 author: lixiaoming
generated
app/v1/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
app/v1/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
app/v1/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
app/v1/clientset/versioned/typed/app/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
app/v1/clientset/versioned/typed/app/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
elasticsearch/v1/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
elasticsearch/v1/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
elasticsearch/v1/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
elasticsearch/v1/clientset/versioned/typed/elasticsearch/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
elasticsearch/v1/clientset/versioned/typed/elasticsearch/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
helm.fluxcd.io/v1/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
helm.fluxcd.io/v1/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
helm.fluxcd.io/v1/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
helm.fluxcd.io/v1/clientset/versioned/typed/helm.fluxcd.io/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
helm.fluxcd.io/v1/clientset/versioned/typed/helm.fluxcd.io/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
kb/v1/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
kb/v1/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
kb/v1/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
kb/v1/clientset/versioned/typed/kb/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kb/v1/clientset/versioned/typed/kb/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
kibana/v1/clientset/versioned
This package has the automatically generated clientset.
This package has the automatically generated clientset.
kibana/v1/clientset/versioned/fake
This package has the automatically generated fake clientset.
This package has the automatically generated fake clientset.
kibana/v1/clientset/versioned/scheme
This package contains the scheme of the automatically generated clientset.
This package contains the scheme of the automatically generated clientset.
kibana/v1/clientset/versioned/typed/kibana/v1
This package has the automatically generated typed clients.
This package has the automatically generated typed clients.
kibana/v1/clientset/versioned/typed/kibana/v1/fake
Package fake has the automatically generated clients.
Package fake has the automatically generated clients.
Package hack 功能描述: Date: 2022/5/20 author: lixiaoming
Package hack 功能描述: Date: 2022/5/20 author: lixiaoming

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL