crd

package
v0.0.0-...-bc09dc0 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2021 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppCRD = RegistCRD{
	CustomResourceDefinition: api_x_v1beta1.CustomResourceDefinition{
		ObjectMeta: metav1.ObjectMeta{
			Name: "applications." + autodeploy_v1.SchemeGroupVersion.Group,
		},
		Spec: api_x_v1beta1.CustomResourceDefinitionSpec{
			Group:   autodeploy_v1.SchemeGroupVersion.Group,
			Version: autodeploy_v1.SchemeGroupVersion.Version,
			Versions: []api_x_v1beta1.CustomResourceDefinitionVersion{{
				Name:    autodeploy_v1.SchemeGroupVersion.Version,
				Served:  true,
				Storage: true,
			}},
			Names: api_x_v1beta1.CustomResourceDefinitionNames{
				Plural:     "applications",
				Singular:   "application",
				ShortNames: []string{"app"},
				Kind:       "application",
			},
			Scope: api_x_v1beta1.NamespaceScoped,
			Validation: &api_x_v1beta1.CustomResourceValidation{
				OpenAPIV3Schema: &api_x_v1beta1.JSONSchemaProps{
					Properties: map[string]api_x_v1beta1.JSONSchemaProps{
						"spec": {
							Properties: map[string]api_x_v1beta1.JSONSchemaProps{
								"image": {
									Type: "string",
								},
								"replicas": {
									Type: "integer",
								},
								"resources": {
									Type: "object",

									Properties: map[string]api_x_v1beta1.JSONSchemaProps{
										"limits": {
											Type: "object",
											Properties: map[string]api_x_v1beta1.JSONSchemaProps{
												"cpu": {
													Type: "string",
												},
												"memory": {
													Type: "string",
												},
											},
										},
										"requests": {
											Type: "object",
											Properties: map[string]api_x_v1beta1.JSONSchemaProps{
												"cpu": {
													Type: "string",
												},
												"memory": {
													Type: "string",
												},
											},
										},
									},
								},
							},
						},
					},
				},
			},
		},
	},
}

Functions

This section is empty.

Types

type AppCRDEtcd

type AppCRDEtcd struct {
	AppCRDEtcdSession
	// contains filtered or unexported fields
}

func NewAppCRDEtcd

func NewAppCRDEtcd(restClient rest.Interface) *AppCRDEtcd

func (*AppCRDEtcd) Create

func (s *AppCRDEtcd) Create(app *autodeploy_v1.App) (*autodeploy_v1.App, error)

Create todo

func (*AppCRDEtcd) Delete

func (s *AppCRDEtcd) Delete(name string, opts *metav1.DeleteOptions) (*autodeploy_v1.App, error)

Delete todo

func (*AppCRDEtcd) Get

func (s *AppCRDEtcd) Get(name string, opts *metav1.GetOptions) (*autodeploy_v1.App, error)

Get todo

func (*AppCRDEtcd) List

List todo

func (*AppCRDEtcd) Namespace

func (s *AppCRDEtcd) Namespace(namespace string) AppCRDEtcdSession

Namespace todo

func (*AppCRDEtcd) Update

func (s *AppCRDEtcd) Update(app *autodeploy_v1.App) (*autodeploy_v1.App, error)

Update todo

type AppCRDEtcdSession

type AppCRDEtcdSession interface {
	Create(app *autodeploy_v1.App) (*autodeploy_v1.App, error)
	Update(app *autodeploy_v1.App) (*autodeploy_v1.App, error)
	Delete(name string, opts *metav1.DeleteOptions) (*autodeploy_v1.App, error)
	List(opts *metav1.ListOptions) (*autodeploy_v1.AppList, error)
	Get(name string, opts *metav1.GetOptions) (*autodeploy_v1.App, error)
	Namespace(namespace string) AppCRDEtcdSession
}

type RegistCRD

type RegistCRD struct {
	api_x_v1beta1.CustomResourceDefinition
}

func (*RegistCRD) Regist

func (s *RegistCRD) Regist() error

Jump to

Keyboard shortcuts

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