v1alpha1

package
v0.0.1-mvp Latest Latest
Warning

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

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

Documentation

Overview

package v1alpha1 implements the v1alpha1 version of the resources used by registryman.

Index

Constants

View Source
const GroupName = "registryman.kubermatic.com"

GroupName specifies the group name used to register the objects.

Variables

View Source
var (
	// localSchemeBuilder and AddToScheme will stay in k8s.io/kubernetes.
	SchemeBuilder runtime.SchemeBuilder

	// Depreciated: use Install instead
	AddToScheme = localSchemeBuilder.AddToScheme
	Install     = localSchemeBuilder.AddToScheme
)
View Source
var GroupVersion = v1.GroupVersion{Group: GroupName, Version: "v1alpha1"}

GroupVersion specifies the group and the version used to register the objects.

View Source
var ProjectValidator *validate.SchemaValidator

ProjectValidator can validate a resource against the CRD validation rules of a Project resource.

View Source
var RegistryValidator *validate.SchemaValidator

RegistryValidator can validate a resource against the CRD validation rules of a Registry resource.

View Source
var ScannerValidator *validate.SchemaValidator

ScannerValidator can validate a resource against the CRD validation rules of a Scanner resource.

View Source
var SchemeGroupVersion = schema.GroupVersion{Group: GroupName, Version: "v1alpha1"}

SchemeGroupVersion is group version used to register these objects Deprecated: use GroupVersion instead.

Functions

func Resource

func Resource(resource string) schema.GroupResource

Resource takes an unqualified resource and returns a Group qualified GroupResource

Types

type MemberRole

type MemberRole int

MemberRole shows the capabilities, the role of the member within the project.

const (
	LimitedGuestRole MemberRole = iota
	GuestRole
	DeveloperRole
	MaintainerRole
	ProjectAdminRole
	PushOnlyRole
	PullOnlyRole
	PullAndPushRole
)

func (MemberRole) MarshalJSON

func (mr MemberRole) MarshalJSON() ([]byte, error)

func (MemberRole) String

func (mr MemberRole) String() string

func (*MemberRole) UnmarshalJSON

func (mr *MemberRole) UnmarshalJSON(data []byte) error

type MemberType

type MemberType int

MemberType selects the type of the membership, like, User, Group or Robot.

const (
	UserMemberType MemberType = iota
	GroupMemberType
	RobotMemberType
)

func (MemberType) MarshalJSON

func (mt MemberType) MarshalJSON() ([]byte, error)

func (MemberType) String

func (mt MemberType) String() string

func (*MemberType) UnmarshalJSON

func (mt *MemberType) UnmarshalJSON(data []byte) error

type Project

type Project struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty" protobuf:"bytes,1,opt,name=metadata"`
	Spec              *ProjectSpec `json:"spec"`
}

Project describes the expected state of a globalregistry Project

func (*Project) DeepCopy

func (in *Project) DeepCopy() *Project

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Project.

func (*Project) DeepCopyInto

func (in *Project) DeepCopyInto(out *Project)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Project) DeepCopyObject

func (in *Project) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ProjectMember

type ProjectMember struct {

	// Type of the project member, e.g. User, Group, Robot. If not set, the
	// default value (User) is applied.
	Type MemberType `json:"type,omitempty"`

	// Name of the project member
	Name string `json:"name"`

	// Role of the project member, e.g. Developer, Maintainer, etc.
	//
	// The possible values depend on the value of the Type field.
	Role MemberRole `json:"role"`

	// DN is optional distinguished name of the user. Used with LDAP integration.
	DN string `json:"dn,omitempty"`
}

ProjectMember reprensents a User, Group or Robot user of a Project.

func (*ProjectMember) DeepCopy

func (in *ProjectMember) DeepCopy() *ProjectMember

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMember.

func (*ProjectMember) DeepCopyInto

func (in *ProjectMember) DeepCopyInto(out *ProjectMember)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*ProjectMember) UnmarshalJSON

func (pm *ProjectMember) UnmarshalJSON(data []byte) error

type ProjectSpec

type ProjectSpec struct {

	// Type selects whether the project is global or local.
	Type ProjectType `json:"type"`

	// LocalRegistries lists the registry names at which the local project
	// shall be provisioned at.
	LocalRegistries []string `json:"localRegistries,omitempty"`

	// Members enumerates the project members and their capabilities
	// provisioned for the specific registry.
	Members []*ProjectMember `json:"members,omitempty"`

	// Scanner specifies the name of the assigned scanner.
	Scanner string `json:"scanner,omitempty"`
}

ProjectSpec describes the spec field of the Project resource

func (*ProjectSpec) DeepCopy

func (in *ProjectSpec) DeepCopy() *ProjectSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectSpec.

func (*ProjectSpec) DeepCopyInto

func (in *ProjectSpec) DeepCopyInto(out *ProjectSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type ProjectType

type ProjectType int

ProjectType specifies whether a project is Global or Local.

const (
	// GlobalProjectType is a registry type that hosts all global
	// projects which are then replicated to all registries of the
	// LocalProjectType.
	GlobalProjectType ProjectType = iota
	// LocalProjectType is a registry type that hosts selected local
	// projects and all Global projects.
	LocalProjectType
)

func (ProjectType) MarshalJSON

func (rt ProjectType) MarshalJSON() ([]byte, error)

MarshalJSON implements the Marshaller interface

func (ProjectType) String

func (rt ProjectType) String() string

String method implements the Stringer interface

func (*ProjectType) UnmarshalJSON

func (rt *ProjectType) UnmarshalJSON(data []byte) error

type Registry

type Registry struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes the Registry Specification.
	Spec *RegistrySpec `json:"spec"`
}

Registry describes the expected state of a registry Object

func (*Registry) DeepCopy

func (in *Registry) DeepCopy() *Registry

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Registry.

func (*Registry) DeepCopyInto

func (in *Registry) DeepCopyInto(out *Registry)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Registry) DeepCopyObject

func (in *Registry) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RegistryList

type RegistryList struct {
	metav1.TypeMeta `json:",inline"`
	metav1.ListMeta `json:"metadata,omitempty"`
	Items           []Registry `json:"items"`
}

RegistryList collects Registry resources.

func (*RegistryList) DeepCopy

func (in *RegistryList) DeepCopy() *RegistryList

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryList.

func (*RegistryList) DeepCopyInto

func (in *RegistryList) DeepCopyInto(out *RegistryList)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*RegistryList) DeepCopyObject

func (in *RegistryList) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type RegistrySpec

type RegistrySpec struct {

	// Provider identifies the actual registry type, e.g. Harbor, Docker Hub,
	// etc.
	Provider string `json:"provider"`

	// APIEndpoint identifies the registry API endpoint in a registry
	// implementation specific way. It can be for example an HTTP endpoint,
	// like "http://harbor.example.com:8080".
	APIEndpoint string `json:"apiEndpoint"`

	// Username is the user name to be used during the authentication at the
	// APIEndpoint interface.
	Username string `json:"username"`

	// Password is the password to be used during the authentication at the
	// APIEndpoint interface.
	Password string `json:"password"`

	// Role specifies whether the registry is a Global Hub or a Local
	// registry.
	Role string `json:"role"`
}

RegistrySpec describes the specification of a Registry.

func (*RegistrySpec) DeepCopy

func (in *RegistrySpec) DeepCopy() *RegistrySpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistrySpec.

func (*RegistrySpec) DeepCopyInto

func (in *RegistrySpec) DeepCopyInto(out *RegistrySpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

type Scanner

type Scanner struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`
	// Spec describes the Scanner Specification.
	Spec *ScannerSpec `json:"spec"`
}

Scanner resource describes the configuration of an external vulnerability scanner.

func (*Scanner) DeepCopy

func (in *Scanner) DeepCopy() *Scanner

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Scanner.

func (*Scanner) DeepCopyInto

func (in *Scanner) DeepCopyInto(out *Scanner)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

func (*Scanner) DeepCopyObject

func (in *Scanner) DeepCopyObject() runtime.Object

DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.

type ScannerSpec

type ScannerSpec struct {

	// A base URL of the scanner adapter.
	Url string `json:"url,omitempty"`

	// An optional value of the HTTP Authorization header sent with each
	// request to the Scanner Adapter API.
	AccessCredential string `json:"access_credential,omitempty"`
}

func (*ScannerSpec) DeepCopy

func (in *ScannerSpec) DeepCopy() *ScannerSpec

DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ScannerSpec.

func (*ScannerSpec) DeepCopyInto

func (in *ScannerSpec) DeepCopyInto(out *ScannerSpec)

DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.

Jump to

Keyboard shortcuts

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