Documentation
¶
Overview ¶
Package v1alpha1 contains API Schema definitions for the containerregistry v1alpha1 API group +kubebuilder:object:generate=true +groupName=goharbor.io
Index ¶
- Constants
- Variables
- type ChartMuseumComponent
- type ClairAdapterComponent
- type ClairComponent
- type CoreComponent
- type Harbor
- type HarborComponents
- type HarborCondition
- type HarborConditionType
- type HarborDeployment
- type HarborList
- type HarborSpec
- type HarborStatus
- type JobServiceComponent
- type NodeSelector
- type NotaryComponent
- type NotaryDBMigrator
- type NotaryServerComponent
- type NotarySignerComponent
- type PortalComponent
- type RegistryComponent
- type RegistryControllerComponent
Constants ¶
const ( CoreName = "core" RegistryName = "registry" CertificateName = "certificate" JobServiceName = "jobservice" PortalName = "portal" NotaryName = "notary" ClairName = "clair" ChartMuseumName = "chartmuseum" )
const ( HarborClairDatabaseHostKey = "host" HarborClairDatabasePortKey = "port" HarborClairDatabaseNameKey = "database" HarborClairDatabaseUserKey = "username" HarborClairDatabasePasswordKey = "password" HarborClairDatabaseSSLKey = "ssl" )
const ( HarborClairAdapterBrokerURLKey = "url" HarborClairAdapterBrokerNamespaceKey = "namespace" )
const ( HarborCoreDatabaseHostKey = "host" HarborCoreDatabasePortKey = "port" HarborCoreDatabaseNameKey = "database" HarborCoreDatabaseUserKey = "username" HarborCoreDatabasePasswordKey = "password" )
const ( // ipaddress:port[,weight,password,database_index] HarborJobServiceBrokerURLKey = "url" HarborJobServiceBrokerNamespaceKey = "namespace" )
const ( HarborNotaryServerDatabaseHostKey = "host" HarborNotaryServerDatabasePortKey = "port" HarborNotaryServerDatabaseNameKey = "database" HarborNotaryServerDatabaseUserKey = "username" HarborNotaryServerDatabasePasswordKey = "password" HarborNotaryServerDatabaseSSLKey = "ssl" )
const ( HarborNotarySignerDatabaseHostKey = "host" HarborNotarySignerDatabasePortKey = "port" HarborNotarySignerDatabaseNameKey = "database" HarborNotarySignerDatabaseUserKey = "username" HarborNotarySignerDatabasePasswordKey = "password" HarborNotarySignerDatabaseSSLKey = "ssl" )
const ( WarningLabel = "goharbor.io/warning" OperatorNameLabel = "goharbor.io/name" OperatorVersionLabel = "goharbor.io/version" ComponentNameLabel = "goharbor.io/component" )
const ( //HarborAdminUserKey = corev1.BasicAuthUsernameKey HarborAdminPasswordKey = corev1.BasicAuthPasswordKey )
const (
HarborChartMuseumCacheURLKey = "url"
)
const (
HarborChartMuseumStorageKindKey = "kind"
)
const (
HarborClassAnnotation = "goharbor.io/harbor-class"
)
const (
// ipaddress:port[,weight,password,database_index]
HarborRegistryURLKey = "url"
)
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "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 ChartMuseumComponent ¶
type ChartMuseumComponent struct {
HarborDeployment `json:",inline"`
// +optional
StorageSecret string `json:"storageSecret,omitempty"`
// +optional
CacheSecret string `json:"cacheSecret,omitempty"`
}
func (*ChartMuseumComponent) DeepCopy ¶
func (in *ChartMuseumComponent) DeepCopy() *ChartMuseumComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ChartMuseumComponent.
func (*ChartMuseumComponent) DeepCopyInto ¶
func (in *ChartMuseumComponent) DeepCopyInto(out *ChartMuseumComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ChartMuseumComponent) GetImage ¶
func (component *ChartMuseumComponent) GetImage() string
type ClairAdapterComponent ¶
type ClairAdapterComponent struct {
// +optional
Image *string `json:"image,omitempty"`
// +kubebuilder:validation:Required
RedisSecret string `json:"redisSecret"`
}
func (*ClairAdapterComponent) DeepCopy ¶
func (in *ClairAdapterComponent) DeepCopy() *ClairAdapterComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClairAdapterComponent.
func (*ClairAdapterComponent) DeepCopyInto ¶
func (in *ClairAdapterComponent) DeepCopyInto(out *ClairAdapterComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClairAdapterComponent) GetImage ¶
func (component *ClairAdapterComponent) GetImage() string
type ClairComponent ¶
type ClairComponent struct {
HarborDeployment `json:",inline"`
// +kubebuilder:validation:Required
DatabaseSecret string `json:"databaseSecret"`
VulnerabilitySources []string `json:"vulnerabilitySources"`
Adapter ClairAdapterComponent `json:"adapter"`
}
func (*ClairComponent) DeepCopy ¶
func (in *ClairComponent) DeepCopy() *ClairComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ClairComponent.
func (*ClairComponent) DeepCopyInto ¶
func (in *ClairComponent) DeepCopyInto(out *ClairComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ClairComponent) GetImage ¶
func (component *ClairComponent) GetImage() string
type CoreComponent ¶
type CoreComponent struct {
HarborDeployment `json:",inline"`
// +kubebuilder:validation:Required
DatabaseSecret string `json:"databaseSecret"`
}
func (*CoreComponent) DeepCopy ¶
func (in *CoreComponent) DeepCopy() *CoreComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new CoreComponent.
func (*CoreComponent) DeepCopyInto ¶
func (in *CoreComponent) DeepCopyInto(out *CoreComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*CoreComponent) GetImage ¶
func (component *CoreComponent) GetImage() string
type Harbor ¶
type Harbor struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec HarborSpec `json:"spec,omitempty"`
// Most recently observed status of the Harbor.
// +optional
Status HarborStatus `json:"status,omitempty"`
}
Harbor is the Schema for the harbors API +kubebuilder:object:root=true +k8s:openapi-gen=true +resource:path=harbor +kubebuilder:subresource:status +kubebuilder:resource:shortName="h" +kubebuilder:printcolumn:name="Version",type=string,JSONPath=`.spec.version`,description="The semver Harbor version",priority=5 +kubebuilder:printcolumn:name="Public URL",type=string,JSONPath=`.spec.publicURL`,description="The public URL to the Harbor application",priority=0 +kubebuilder:printcolumn:name="Applied",type=string,JSONPath=`.status.conditions[?(@.type=="Applied")].status`,description="The current status of the new Harbor spec",priority=20 +kubebuilder:printcolumn:name="Ready",type=string,JSONPath=`.status.conditions[?(@.type=="Ready")].status`,description="The current status of the Harbor application",priority=10
func (*Harbor) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Harbor.
func (*Harbor) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Harbor) DeepCopyObject ¶
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*Harbor) Default ¶
func (r *Harbor) Default()
Default implements webhook.Defaulter so a webhook will be registered for the type
func (*Harbor) NormalizeComponentName ¶
type HarborComponents ¶
type HarborComponents struct {
// +optional
Core *CoreComponent `json:"core,omitempty"`
// +optional
Portal *PortalComponent `json:"portal,omitempty"`
// +optional
Registry *RegistryComponent `json:"registry,omitempty"`
// +optional
JobService *JobServiceComponent `json:"jobService,omitempty"`
// +optional
ChartMuseum *ChartMuseumComponent `json:"chartMuseum,omitempty"`
// +optional
Clair *ClairComponent `json:"clair,omitempty"`
// +optional
Notary *NotaryComponent `json:"notary,omitempty"`
}
func (*HarborComponents) DeepCopy ¶
func (in *HarborComponents) DeepCopy() *HarborComponents
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborComponents.
func (*HarborComponents) DeepCopyInto ¶
func (in *HarborComponents) DeepCopyInto(out *HarborComponents)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborCondition ¶
type HarborCondition struct {
// Type of harhor condition.
Type HarborConditionType `json:"type"`
// Status of the condition, one of True, False, Unknown.
Status corev1.ConditionStatus `json:"status"`
// The last time this condition was updated.
LastUpdateTime metav1.Time `json:"lastUpdateTime,omitempty"`
// Last time the condition transitioned from one status to another.
LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty"`
// The reason for the condition's last transition.
Reason string `json:"reason,omitempty"`
// A human readable message indicating details about the transition.
Message string `json:"message,omitempty"`
}
HarborCondition describes the state of a Harbor at a certain point.
func (*HarborCondition) DeepCopy ¶
func (in *HarborCondition) DeepCopy() *HarborCondition
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborCondition.
func (*HarborCondition) DeepCopyInto ¶
func (in *HarborCondition) DeepCopyInto(out *HarborCondition)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborConditionType ¶
type HarborConditionType string
const ( AppliedConditionType HarborConditionType = "Applied" ReadyConditionType HarborConditionType = "Ready" )
type HarborDeployment ¶
type HarborDeployment struct {
// Number of desired pods. This is a pointer to distinguish between explicit
// zero and not specified. Defaults to 1.
// +optional
// +kubebuilder:validation:Minimum=1
Replicas *int32 `json:"replicas,omitempty"`
// +optional
Image *string `json:"image,omitempty"`
// +optional
NodeSelector NodeSelector `json:"nodeSelector,omitempty"`
ImagePullSecrets []corev1.LocalObjectReference `json:"imagePullSecrets,omitempty" patchStrategy:"merge" patchMergeKey:"name"`
}
func (*HarborDeployment) DeepCopy ¶
func (in *HarborDeployment) DeepCopy() *HarborDeployment
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborDeployment.
func (*HarborDeployment) DeepCopyInto ¶
func (in *HarborDeployment) DeepCopyInto(out *HarborDeployment)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborList ¶
type HarborList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []Harbor `json:"items"`
}
HarborList contains a list of Harbor +kubebuilder:object:root=true +resource:path=harbors
func (*HarborList) DeepCopy ¶
func (in *HarborList) DeepCopy() *HarborList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborList.
func (*HarborList) DeepCopyInto ¶
func (in *HarborList) DeepCopyInto(out *HarborList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HarborList) DeepCopyObject ¶
func (in *HarborList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HarborSpec ¶
type HarborSpec struct {
// The Harbor semver version
// +kubebuilder:validation:Required
// https://semver.org/#is-there-a-suggested-regular-expression-regex-to-check-a-semver-string
// +kubebuilder:validation:Pattern="^(?P<major>0|[1-9]\\d*)\\.(?P<minor>0|[1-9]\\d*)\\.(?P<patch>0|[1-9]\\d*)(?:-(?P<prerelease>(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\\.(?:0|[1-9]\\d*|\\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\\+(?P<buildmetadata>[0-9a-zA-Z-]+(?:\\.[0-9a-zA-Z-]+)*))?$"
HarborVersion string `json:"version"`
// The url exposed to clients to access harbor
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern="^https?://.*$"
PublicURL string `json:"publicURL"`
// The name of the secret containing the TLS secret used for ingresses
// +optional
TLSSecretName string `json:"tlsSecretName"`
// +kubebuilder:validation:Required
Components HarborComponents `json:"components,omitempty"`
// The name of the secret containing the password for root user
// +kubebuilder:validation:Required
AdminPasswordSecret string `json:"adminPasswordSecret"`
// The Maximum priority. Deployments may be created with priority in interval ] priority - 100 ; priority ]
// +kubebuilder:validation:Optional
Priority *int32 `json:"priority,omitempty"`
// The option to set repository read only.
// +kubebuilder:validation:Optional
ReadOnly bool `json:"readOnly,omitempty"`
// Indicates that the harbor is paused.
// +optional
Paused bool `json:"paused,omitempty"`
// The issuer for Harbor certificates.
// If the 'kind' field is not set, or set to 'Issuer', an Issuer resource
// with the given name in the same namespace as the Certificate will be used.
// If the 'kind' field is set to 'ClusterIssuer', a ClusterIssuer with the
// provided name will be used.
// The 'name' field in this stanza is required at all times.
CertificateIssuerRef cmmeta.ObjectReference `json:"certificateIssuerRef"`
}
HarborSpec defines the desired state of Harbor
func (*HarborSpec) DeepCopy ¶
func (in *HarborSpec) DeepCopy() *HarborSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborSpec.
func (*HarborSpec) DeepCopyInto ¶
func (in *HarborSpec) DeepCopyInto(out *HarborSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborStatus ¶
type HarborStatus struct {
// Represents the latest available observations of a harbor's current state.
// +patchMergeKey=type
// +patchStrategy=merge
Conditions []HarborCondition `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type" protobuf:"bytes,6,rep,name=conditions"`
ObservedGeneration int64 `json:"observedGeneration,omitempty"`
}
HarborStatus defines the observed state of Harbor https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties
func (*HarborStatus) DeepCopy ¶
func (in *HarborStatus) DeepCopy() *HarborStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborStatus.
func (*HarborStatus) DeepCopyInto ¶
func (in *HarborStatus) DeepCopyInto(out *HarborStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type JobServiceComponent ¶
type JobServiceComponent struct {
HarborDeployment `json:",inline"`
// +kubebuilder:validation:Required
RedisSecret string `json:"redisSecret"`
// +optional
WorkerCount int32 `json:"workerCount"`
}
func (*JobServiceComponent) DeepCopy ¶
func (in *JobServiceComponent) DeepCopy() *JobServiceComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new JobServiceComponent.
func (*JobServiceComponent) DeepCopyInto ¶
func (in *JobServiceComponent) DeepCopyInto(out *JobServiceComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*JobServiceComponent) GetImage ¶
func (component *JobServiceComponent) GetImage() string
type NodeSelector ¶
func (NodeSelector) DeepCopy ¶
func (in NodeSelector) DeepCopy() NodeSelector
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NodeSelector.
func (NodeSelector) DeepCopyInto ¶
func (in NodeSelector) DeepCopyInto(out *NodeSelector)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NotaryComponent ¶
type NotaryComponent struct {
// The url exposed to clients to access notary
// +kubebuilder:validation:Required
// +kubebuilder:validation:Pattern="^https?://.*$"
PublicURL string `json:"publicURL"`
// +optional
DBMigrator NotaryDBMigrator `json:"dbMigrator,omitempty"`
// +kubebuilder:validation:Required
Signer NotarySignerComponent `json:"signer"`
// +kubebuilder:validation:Required
Server NotaryServerComponent `json:"server"`
}
func (*NotaryComponent) DeepCopy ¶
func (in *NotaryComponent) DeepCopy() *NotaryComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotaryComponent.
func (*NotaryComponent) DeepCopyInto ¶
func (in *NotaryComponent) DeepCopyInto(out *NotaryComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type NotaryDBMigrator ¶
type NotaryDBMigrator struct {
// +optional
Image *string `json:"image,omitempty"`
}
func (*NotaryDBMigrator) DeepCopy ¶
func (in *NotaryDBMigrator) DeepCopy() *NotaryDBMigrator
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotaryDBMigrator.
func (*NotaryDBMigrator) DeepCopyInto ¶
func (in *NotaryDBMigrator) DeepCopyInto(out *NotaryDBMigrator)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NotaryDBMigrator) GetImage ¶
func (component *NotaryDBMigrator) GetImage() string
type NotaryServerComponent ¶
type NotaryServerComponent struct {
HarborDeployment `json:",inline"`
// +kubebuilder:validation:Required
DatabaseSecret string `json:"databaseSecret"`
}
func (*NotaryServerComponent) DeepCopy ¶
func (in *NotaryServerComponent) DeepCopy() *NotaryServerComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotaryServerComponent.
func (*NotaryServerComponent) DeepCopyInto ¶
func (in *NotaryServerComponent) DeepCopyInto(out *NotaryServerComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NotaryServerComponent) GetImage ¶
func (component *NotaryServerComponent) GetImage() string
type NotarySignerComponent ¶
type NotarySignerComponent struct {
HarborDeployment `json:",inline"`
// +kubebuilder:validation:Required
DatabaseSecret string `json:"databaseSecret"`
}
func (*NotarySignerComponent) DeepCopy ¶
func (in *NotarySignerComponent) DeepCopy() *NotarySignerComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new NotarySignerComponent.
func (*NotarySignerComponent) DeepCopyInto ¶
func (in *NotarySignerComponent) DeepCopyInto(out *NotarySignerComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*NotarySignerComponent) GetImage ¶
func (component *NotarySignerComponent) GetImage() string
type PortalComponent ¶
type PortalComponent struct {
HarborDeployment `json:",inline"`
}
func (*PortalComponent) DeepCopy ¶
func (in *PortalComponent) DeepCopy() *PortalComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new PortalComponent.
func (*PortalComponent) DeepCopyInto ¶
func (in *PortalComponent) DeepCopyInto(out *PortalComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*PortalComponent) GetImage ¶
func (component *PortalComponent) GetImage() string
type RegistryComponent ¶
type RegistryComponent struct {
HarborDeployment `json:",inline"`
Controller RegistryControllerComponent `json:"controller,omitempty"`
// +optional
StorageSecret string `json:"storageSecret,omitempty"`
// +optional
CacheSecret string `json:"cacheSecret,omitempty"`
}
func (*RegistryComponent) DeepCopy ¶
func (in *RegistryComponent) DeepCopy() *RegistryComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryComponent.
func (*RegistryComponent) DeepCopyInto ¶
func (in *RegistryComponent) DeepCopyInto(out *RegistryComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RegistryComponent) GetImage ¶
func (component *RegistryComponent) GetImage() string
type RegistryControllerComponent ¶
type RegistryControllerComponent struct {
// +optional
Image *string `json:"image,omitempty"`
}
func (*RegistryControllerComponent) DeepCopy ¶
func (in *RegistryControllerComponent) DeepCopy() *RegistryControllerComponent
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RegistryControllerComponent.
func (*RegistryControllerComponent) DeepCopyInto ¶
func (in *RegistryControllerComponent) DeepCopyInto(out *RegistryControllerComponent)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*RegistryControllerComponent) GetImage ¶
func (component *RegistryControllerComponent) GetImage() string