v1alpha1

package
v0.0.0-...-8115ff7 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package v1alpha1 contains API Schema definitions for the goharbor v1alpha1 API group +kubebuilder:object:generate=true +groupName=goharbor.goharbor.io

Index

Constants

This section is empty.

Variables

View Source
var (
	// GroupVersion is group version used to register these objects
	GroupVersion = schema.GroupVersion{Group: "goharbor.goharbor.io", Version: "v1alpha1"}

	// SchemeBuilder is used to add go types to the GroupVersionKind scheme
	SchemeBuilder = &scheme.Builder{GroupVersion: GroupVersion}

	// AddToScheme adds the types in this group-version to the given scheme.
	AddToScheme = SchemeBuilder.AddToScheme
)

Functions

This section is empty.

Types

type AccessCredential

type AccessCredential struct {
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
	Namespace string `json:"namespace"`

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern="[a-z0-9]([-a-z0-9]*[a-z0-9])?(\\.[a-z0-9]([-a-z0-9]*[a-z0-9])?)*"
	AccessSecretRef string `json:"accessSecretRef"`
}

AccessCredential is a namespaced credential to keep the access key and secret for the harbor server configuration

func (*AccessCredential) DeepCopy

func (in *AccessCredential) DeepCopy() *AccessCredential

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

func (*AccessCredential) DeepCopyInto

func (in *AccessCredential) DeepCopyInto(out *AccessCredential)

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

type Condition

type Condition struct {
	// +kubebuilder:validation:Required
	// Type condition type
	Type status.ConditionType `json:"type"`

	// +kubebuilder:validation:Required
	// Status String that describes the condition status
	Status corev1.ConditionStatus `json:"status"`

	// +kubebuilder:validation:Optional
	// Reason one work CamelCase reason
	Reason string `json:"reason,omitempty"`

	// +kubebuilder:validation:Optional
	// Message Human readable reason string
	Message string `json:"message,omitempty"`
}

Condition defines the general format for conditions on Kubernetes resources. In practice, each kubernetes resource defines their own format for conditions, but most (maybe all) follows this structure.

func (*Condition) DeepCopy

func (in *Condition) DeepCopy() *Condition

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

func (*Condition) DeepCopyInto

func (in *Condition) DeepCopyInto(out *Condition)

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

type HarborServerConfiguration

type HarborServerConfiguration struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   HarborServerConfigurationSpec   `json:"spec,omitempty"`
	Status HarborServerConfigurationStatus `json:"status,omitempty"`
}

+kubebuilder:object:root=true +kubebuilder:storageversion +k8s:openapi-gen=true +kubebuilder:subresource:status +kubebuilder:resource:categories="goharbor",shortName="hsc",scope="Cluster" +kubebuilder:printcolumn:name="Harbor Server",type=string,JSONPath=`.spec.serverURL`,description="The public URL to the Harbor server",priority=0 +kubebuilder:printcolumn:name="Status",type=string,JSONPath=`.status.status`,description="The status of the Harbor server",priority=0 +kubebuilder:printcolumn:name="Version",type=string,JSONPath=`.spec.version`,description="The version of the Harbor server",priority=5 HarborServerConfiguration is the Schema for the harborserverconfigurations API

func (*HarborServerConfiguration) DeepCopy

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

func (*HarborServerConfiguration) DeepCopyInto

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

func (*HarborServerConfiguration) DeepCopyObject

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

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

type HarborServerConfigurationList

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

HarborServerConfigurationList contains a list of HarborServerConfiguration

func (*HarborServerConfigurationList) DeepCopy

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

func (*HarborServerConfigurationList) DeepCopyInto

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

func (*HarborServerConfigurationList) DeepCopyObject

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

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

type HarborServerConfigurationSpec

type HarborServerConfigurationSpec struct {

	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern="(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)$|^(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9\\-]*[a-zA-Z0-9])\\.)+([A-Za-z]|[A-Za-z][A-Za-z0-9\\-]*[A-Za-z0-9])"
	ServerURL string `json:"serverURL"`

	// Indicate if the Harbor server is an insecure registry
	// +kubebuilder:validation:Optional
	InSecure bool `json:"inSecure,omitempty"`

	// Default indicates the harbor configuration manages namespaces.
	// Value in goharbor.io/harbor annotation will be considered with high priority.
	// At most, one HarborServerConfiguration can be the default, multiple defaults will be rejected.
	// +kubebuilder:validation:Required
	Default bool `json:"default,omitempty"`

	// +kubebuilder:validation:Required
	AccessCredential *AccessCredential `json:"accessCredential"`

	// The version of the Harbor server
	// +kubebuilder:validation:Required
	// +kubebuilder:validation:Pattern="(0|[1-9]\\d*)\\.(0|[1-9]\\d*)\\.(0|[1-9]\\d*)(?:-((?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+([0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?"
	Version string `json:"version"`

	// Rules configures the container image rewrite rules for transparent proxy caching with Harbor.
	// +kubebuilder:validation:Optional
	Rules []string `json:"rules,omitempty"`

	// NamespaceSelector decides whether to apply the HSC on a namespace based
	// on whether the namespace matches the selector.
	// See
	// https://kubernetes.io/docs/concepts/overview/working-with-objects/labels/
	// for more examples of label selectors.
	//
	// Default to the empty LabelSelector, which matches everything.
	// +optional
	NamespaceSelector *metav1.LabelSelector `json:"namespaceSelector,omitempty"`
}

HarborServerConfigurationSpec defines the desired state of HarborServerConfiguration

func (*HarborServerConfigurationSpec) DeepCopy

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

func (*HarborServerConfigurationSpec) DeepCopyInto

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

type HarborServerConfigurationStatus

type HarborServerConfigurationStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// Indicate if the server is healthy
	Status string `json:"status"`

	// Conditions list of extracted conditions from Resource
	// Add the health status of harbor components into condition list
	// +listType:map
	// +listMapKey:type
	Conditions []Condition `json:"conditions"`
}

HarborServerConfigurationStatus defines the observed state of HarborServerConfiguration

func (*HarborServerConfigurationStatus) DeepCopy

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

func (*HarborServerConfigurationStatus) DeepCopyInto

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

type PullSecretBinding

type PullSecretBinding struct {
	metav1.TypeMeta   `json:",inline"`
	metav1.ObjectMeta `json:"metadata,omitempty"`

	Spec   PullSecretBindingSpec   `json:"spec,omitempty"`
	Status PullSecretBindingStatus `json:"status,omitempty"`
}

PullSecretBinding is the Schema for the pullsecretbindings API

func (*PullSecretBinding) DeepCopy

func (in *PullSecretBinding) DeepCopy() *PullSecretBinding

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

func (*PullSecretBinding) DeepCopyInto

func (in *PullSecretBinding) DeepCopyInto(out *PullSecretBinding)

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

func (*PullSecretBinding) DeepCopyObject

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

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

type PullSecretBindingList

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

PullSecretBindingList contains a list of PullSecretBinding

func (*PullSecretBindingList) DeepCopy

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

func (*PullSecretBindingList) DeepCopyInto

func (in *PullSecretBindingList) DeepCopyInto(out *PullSecretBindingList)

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

func (*PullSecretBindingList) DeepCopyObject

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

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

type PullSecretBindingSpec

type PullSecretBindingSpec struct {

	// RobotID points to the robot account id used for secret binding
	// +kubebuilder:validation:Required
	RobotID string `json:"robotId"`

	// ProjectID points to the project associated with the secret binding
	// +kubebuilder:validation:Required
	ProjectID string `json:"projectId"`

	// Indicate which harbor server configuration is referred
	HarborServerConfig string `json:"harborServerConfig"`

	// Indicate which service account binds the pull secret
	ServiceAccount string `json:"serviceAccount"`
}

PullSecretBindingSpec defines the desired state of PullSecretBinding

func (*PullSecretBindingSpec) DeepCopy

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

func (*PullSecretBindingSpec) DeepCopyInto

func (in *PullSecretBindingSpec) DeepCopyInto(out *PullSecretBindingSpec)

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

type PullSecretBindingStatus

type PullSecretBindingStatus struct {
	// INSERT ADDITIONAL STATUS FIELD - define observed state of cluster
	// Important: Run "make" to regenerate code after modifying this file
	// Indicate the status of binding: `binding`, `bound` and `unknown`
	Status string `json:"status"`

	// Conditions list of extracted conditions from Resource
	// Add the relate conditions of the parts involved in this binding
	// +listType:map
	// +listMapKey:type
	Conditions []Condition `json:"conditions"`
}

PullSecretBindingStatus defines the observed state of PullSecretBinding

func (*PullSecretBindingStatus) DeepCopy

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

func (*PullSecretBindingStatus) DeepCopyInto

func (in *PullSecretBindingStatus) DeepCopyInto(out *PullSecretBindingStatus)

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