Documentation ¶
Overview ¶
Package v1 contains API Schema definitions for the crd v1 API group +kubebuilder:object:generate=true +groupName=crd.harborsync.k8s.io
Index ¶
- Variables
- type HarborRobotAccount
- type HarborRobotAccountList
- type HarborRobotAccountSpec
- type HarborRobotAccountStatus
- type HarborSync
- type HarborSyncList
- type HarborSyncSpec
- type HarborSyncStatus
- type MappingType
- type ProjectMapping
- type ProjectMatchingType
- type RobotAccountCredential
- type WebhookConfig
- type WebhookUpdatePayload
Constants ¶
This section is empty.
Variables ¶
var ( // GroupVersion is group version used to register these objects GroupVersion = schema.GroupVersion{Group: "crd.harborsync.k8s.io", Version: "v1"} // 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 HarborRobotAccount ¶ added in v1.3.0
type HarborRobotAccount struct { // we use a specific label that allows us to search t metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HarborRobotAccountSpec `json:"spec,omitempty"` Status HarborRobotAccountStatus `json:"status,omitempty"` }
HarborRobotAccount is the Schema for the harborrobotaccounts API
func (*HarborRobotAccount) DeepCopy ¶ added in v1.3.0
func (in *HarborRobotAccount) DeepCopy() *HarborRobotAccount
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborRobotAccount.
func (*HarborRobotAccount) DeepCopyInto ¶ added in v1.3.0
func (in *HarborRobotAccount) DeepCopyInto(out *HarborRobotAccount)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HarborRobotAccount) DeepCopyObject ¶ added in v1.3.0
func (in *HarborRobotAccount) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HarborRobotAccountList ¶ added in v1.3.0
type HarborRobotAccountList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HarborRobotAccount `json:"items"` }
HarborRobotAccountList contains a list of HarborRobotAccount
func (*HarborRobotAccountList) DeepCopy ¶ added in v1.3.0
func (in *HarborRobotAccountList) DeepCopy() *HarborRobotAccountList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborRobotAccountList.
func (*HarborRobotAccountList) DeepCopyInto ¶ added in v1.3.0
func (in *HarborRobotAccountList) DeepCopyInto(out *HarborRobotAccountList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HarborRobotAccountList) DeepCopyObject ¶ added in v1.3.0
func (in *HarborRobotAccountList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HarborRobotAccountSpec ¶ added in v1.3.0
type HarborRobotAccountSpec struct {
Credential RobotAccountCredential `json:"credential"`
}
HarborRobotAccountSpec defines the desired state of HarborRobotAccount
func (*HarborRobotAccountSpec) DeepCopy ¶ added in v1.3.0
func (in *HarborRobotAccountSpec) DeepCopy() *HarborRobotAccountSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborRobotAccountSpec.
func (*HarborRobotAccountSpec) DeepCopyInto ¶ added in v1.3.0
func (in *HarborRobotAccountSpec) DeepCopyInto(out *HarborRobotAccountSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborRobotAccountStatus ¶ added in v1.3.0
type HarborRobotAccountStatus struct {
LastSync int64 `json:"last_sync"`
}
HarborRobotAccountStatus defines the observed state of HarborRobotAccount
func (*HarborRobotAccountStatus) DeepCopy ¶ added in v1.3.0
func (in *HarborRobotAccountStatus) DeepCopy() *HarborRobotAccountStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborRobotAccountStatus.
func (*HarborRobotAccountStatus) DeepCopyInto ¶ added in v1.3.0
func (in *HarborRobotAccountStatus) DeepCopyInto(out *HarborRobotAccountStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborSync ¶
type HarborSync struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec HarborSyncSpec `json:"spec,omitempty"` Status HarborSyncStatus `json:"status,omitempty"` }
HarborSync is the Schema for the harborsyncs API
func (*HarborSync) DeepCopy ¶
func (in *HarborSync) DeepCopy() *HarborSync
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborSync.
func (*HarborSync) DeepCopyInto ¶
func (in *HarborSync) DeepCopyInto(out *HarborSync)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HarborSync) DeepCopyObject ¶
func (in *HarborSync) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HarborSyncList ¶
type HarborSyncList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []HarborSync `json:"items"` }
HarborSyncList contains a list of HarborSync
func (*HarborSyncList) DeepCopy ¶
func (in *HarborSyncList) DeepCopy() *HarborSyncList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborSyncList.
func (*HarborSyncList) DeepCopyInto ¶
func (in *HarborSyncList) DeepCopyInto(out *HarborSyncList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*HarborSyncList) DeepCopyObject ¶
func (in *HarborSyncList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type HarborSyncSpec ¶
type HarborSyncSpec struct { // Specifies how to do matching on a harbor project. // Valid values are: // - "Regex" (default): interpret the project name as regular expression; Type ProjectMatchingType `json:"type"` // ProjectName specifies the project name ProjectName string `json:"name"` // PushAccess allows the robot account to push images, too. defaults to false. // As of now we can not tell what permissions a robot account has. The user // has to wait for the next rotation until the robot account has the new permissions. // Alternatively, you can re-create your HarborSync spec. This forces a rotation. PushAccess bool `json:"pushAccess"` // The RobotAccountSuffix specifies the suffix to use when creating a new robot account // +kubebuilder:validation:MinLength=4 RobotAccountSuffix string `json:"robotAccountSuffix"` // The Mapping contains the mapping from project to a secret in a namespace Mapping []ProjectMapping `json:"mapping,omitempty"` // Webhook contains a list of endpoints which will be called // if the robot account changes (e..g automatic rotation, expired account, disabled...) // +optional Webhook []WebhookConfig `json:"webhook,omitempty"` }
HarborSyncSpec defines the desired state how should harbor projects map to secrets in namespaces
func (*HarborSyncSpec) DeepCopy ¶
func (in *HarborSyncSpec) DeepCopy() *HarborSyncSpec
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborSyncSpec.
func (*HarborSyncSpec) DeepCopyInto ¶
func (in *HarborSyncSpec) DeepCopyInto(out *HarborSyncSpec)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type HarborSyncStatus ¶
type HarborSyncStatus struct{}
HarborSyncStatus defines the observed state of HarborSync
func (*HarborSyncStatus) DeepCopy ¶
func (in *HarborSyncStatus) DeepCopy() *HarborSyncStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new HarborSyncStatus.
func (*HarborSyncStatus) DeepCopyInto ¶
func (in *HarborSyncStatus) DeepCopyInto(out *HarborSyncStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type MappingType ¶
type MappingType string
MappingType specifies how to map the project into the namespace/secret Only one of the following matching types may be specified. If none of the following types is specified, the default one is Translate. +kubebuilder:validation:Enum=Translate;Match
const ( // TranslateMappingType interpolates the project expression into the namespace TranslateMappingType MappingType = "Translate" // MatchMappingType treats the Namespace as regular expression and injects secrets into // all matching namespaces MatchMappingType MappingType = "Match" )
type ProjectMapping ¶
type ProjectMapping struct { Namespace string `json:"namespace"` Secret string `json:"secret"` Type MappingType `json:"type"` }
ProjectMapping defines how projects are mapped to secrets in specific namespaces
func (*ProjectMapping) DeepCopy ¶
func (in *ProjectMapping) DeepCopy() *ProjectMapping
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ProjectMapping.
func (*ProjectMapping) DeepCopyInto ¶
func (in *ProjectMapping) DeepCopyInto(out *ProjectMapping)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ProjectMatchingType ¶
type ProjectMatchingType string
ProjectMatchingType specifies the type of matching to be done. Only one of the following matching types may be specified. If none of the following types is specified, the default one is Regex. +kubebuilder:validation:Enum=Regex
const ( // RegexMatching interprets the name field as regular expression // Capturing groups may be used in a ProjectMapping RegexMatching ProjectMatchingType = "Regex" )
type RobotAccountCredential ¶
type RobotAccountCredential struct { Name string `json:"name"` CreatedAt int64 `json:"created_at"` Token string `json:"token"` }
RobotAccountCredential holds the robot account name & token to access the harbor API
func (*RobotAccountCredential) DeepCopy ¶
func (in *RobotAccountCredential) DeepCopy() *RobotAccountCredential
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new RobotAccountCredential.
func (*RobotAccountCredential) DeepCopyInto ¶
func (in *RobotAccountCredential) DeepCopyInto(out *RobotAccountCredential)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebhookConfig ¶
type WebhookConfig struct { // Endpoint is a url Endpoint string `json:"endpoint"` }
WebhookConfig defines how to call a webhook
func (*WebhookConfig) DeepCopy ¶
func (in *WebhookConfig) DeepCopy() *WebhookConfig
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookConfig.
func (*WebhookConfig) DeepCopyInto ¶
func (in *WebhookConfig) DeepCopyInto(out *WebhookConfig)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type WebhookUpdatePayload ¶
type WebhookUpdatePayload struct { Project string `json:"project"` Credentials RobotAccountCredential `json:"credentials"` }
WebhookUpdatePayload contains the new credentials of a robot account
func (*WebhookUpdatePayload) DeepCopy ¶
func (in *WebhookUpdatePayload) DeepCopy() *WebhookUpdatePayload
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new WebhookUpdatePayload.
func (*WebhookUpdatePayload) DeepCopyInto ¶
func (in *WebhookUpdatePayload) DeepCopyInto(out *WebhookUpdatePayload)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.