Documentation
¶
Overview ¶
Package v1alpha1 contains the v1alpha1 version of the administrative APIs.
Index ¶
- Constants
- Variables
- func Kind(kind string) schema.GroupKind
- func Labels(owner ExportReference, core bool) map[string]string
- func Resource(resource string) schema.GroupResource
- type APIIdentity
- func (in *APIIdentity) DeepCopy() *APIIdentity
- func (in *APIIdentity) DeepCopyInto(out *APIIdentity)
- func (in *APIIdentity) DeepCopyObject() runtime.Object
- func (in *APIIdentity) GetConditions() conditionsv1alpha1.Conditions
- func (in APIIdentity) OpenAPIModelName() string
- func (in *APIIdentity) SetConditions(c conditionsv1alpha1.Conditions)
- type APIIdentityList
- type APIIdentityStatus
- type ExportReference
- type Holder
Constants ¶
const ( // APIIdentityOwnerLabel is the name of the APIExport that owns the // identity, so that entries can be selected by export name. APIIdentityOwnerLabel = "apiidentities.admin.kcp.io/owner" // APIIdentityOwnerClusterLabel is the logical cluster of the APIExport // that owns the identity, so that entries can be selected by workspace. APIIdentityOwnerClusterLabel = "apiidentities.admin.kcp.io/owner-cluster" // APIIdentityCoreLabel is "true" on the identities of the core // APIExports in root and "false" on every other one. APIIdentityCoreLabel = "apiidentities.admin.kcp.io/core" )
const ( APIIdentityShared conditionsv1alpha1.ConditionType = "Shared" )
Variables ¶
var ( SchemeBuilder = runtime.NewSchemeBuilder(addKnownTypes) AddToScheme = SchemeBuilder.AddToScheme )
var SchemeGroupVersion = schema.GroupVersion{Group: admin.GroupName, Version: "v1alpha1"}
SchemeGroupVersion is group version used to register these objects.
Functions ¶
func Labels ¶
func Labels(owner ExportReference, core bool) map[string]string
Labels returns the labels an entry carries for its owner and core flag.
func Resource ¶
func Resource(resource string) schema.GroupResource
Resource takes an unqualified resource and returns a Group qualified GroupResource.
Types ¶
type APIIdentity ¶
type APIIdentity struct {
metav1.TypeMeta `json:",inline"`
// +optional
metav1.ObjectMeta `json:"metadata,omitempty"`
// +optional
Status APIIdentityStatus `json:"status,omitempty"`
}
APIIdentity is the view of one API identity: which APIExport owns it and which other APIExports hold it. It is computed from the APIExports of the installation and not stored anywhere; there is one per identity, named after the identity value, served read-only through the Admin workspace.
+crd +genclient +genclient:nonNamespaced +genclient:noStatus +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +kubebuilder:resource:scope=Cluster,categories=kcp +kubebuilder:printcolumn:name="Owner",type=string,JSONPath=`.status.owner.name`,description="APIExport owning the identity" +kubebuilder:printcolumn:name="Cluster",type=string,JSONPath=`.status.owner.cluster`,description="Logical cluster of the owner" +kubebuilder:printcolumn:name="Core",type=boolean,JSONPath=`.status.core`,description="Identity of a core APIExport in root" +kubebuilder:printcolumn:name="Shared",type=string,JSONPath=`.status.conditions[?(@.type=="Shared")].status`,priority=1,description="True while other APIExports hold the identity" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp"
func (*APIIdentity) DeepCopy ¶
func (in *APIIdentity) DeepCopy() *APIIdentity
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIIdentity.
func (*APIIdentity) DeepCopyInto ¶
func (in *APIIdentity) DeepCopyInto(out *APIIdentity)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*APIIdentity) DeepCopyObject ¶
func (in *APIIdentity) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*APIIdentity) GetConditions ¶
func (in *APIIdentity) GetConditions() conditionsv1alpha1.Conditions
func (APIIdentity) OpenAPIModelName ¶
func (in APIIdentity) OpenAPIModelName() string
OpenAPIModelName returns the OpenAPI model name for this type.
func (*APIIdentity) SetConditions ¶
func (in *APIIdentity) SetConditions(c conditionsv1alpha1.Conditions)
type APIIdentityList ¶
type APIIdentityList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata"`
Items []APIIdentity `json:"items"`
}
APIIdentityList is a list of APIIdentity resources.
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*APIIdentityList) DeepCopy ¶
func (in *APIIdentityList) DeepCopy() *APIIdentityList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIIdentityList.
func (*APIIdentityList) DeepCopyInto ¶
func (in *APIIdentityList) DeepCopyInto(out *APIIdentityList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*APIIdentityList) DeepCopyObject ¶
func (in *APIIdentityList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (APIIdentityList) OpenAPIModelName ¶
func (in APIIdentityList) OpenAPIModelName() string
OpenAPIModelName returns the OpenAPI model name for this type.
type APIIdentityStatus ¶
type APIIdentityStatus struct {
// owner is the APIExport that holds the identity authoritatively: the
// oldest one holding it. When it is deleted the oldest holder succeeds
// it; an identity no APIExport holds any more has no entry.
//
// +required
Owner ExportReference `json:"owner"`
// holders lists the APIExports, other than the owner, that serve the
// identity: those whose identity secret carries the same key, oldest
// first.
//
// +optional
// +listType=map
// +listMapKey=cluster
// +listMapKey=name
Holders []Holder `json:"holders,omitempty"`
// core is true for the identities of the core APIExports in the root
// workspace, which every shard needs before it can serve.
//
// +optional
Core bool `json:"core,omitempty"`
// conditions is a list of conditions that apply to the identity.
//
// +optional
Conditions conditionsv1alpha1.Conditions `json:"conditions,omitempty"`
}
APIIdentityStatus is the derived state of an identity. The object has no spec: nothing about it is user intent.
func (*APIIdentityStatus) DeepCopy ¶
func (in *APIIdentityStatus) DeepCopy() *APIIdentityStatus
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new APIIdentityStatus.
func (*APIIdentityStatus) DeepCopyInto ¶
func (in *APIIdentityStatus) DeepCopyInto(out *APIIdentityStatus)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (APIIdentityStatus) OpenAPIModelName ¶
func (in APIIdentityStatus) OpenAPIModelName() string
OpenAPIModelName returns the OpenAPI model name for this type.
type ExportReference ¶
type ExportReference struct {
// cluster is the logical cluster name hosting the APIExport.
//
// +required
// +kubebuilder:validation:MinLength=1
Cluster string `json:"cluster"`
// name is the name of the APIExport.
//
// +required
// +kubebuilder:validation:MinLength=1
Name string `json:"name"`
// uid is the UID of the APIExport, so that an export deleted and
// recreated under the same name can be told apart from the original.
//
// +optional
UID string `json:"uid,omitempty"`
}
ExportReference identifies an APIExport across the installation.
func (*ExportReference) DeepCopy ¶
func (in *ExportReference) DeepCopy() *ExportReference
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportReference.
func (*ExportReference) DeepCopyInto ¶
func (in *ExportReference) DeepCopyInto(out *ExportReference)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (ExportReference) Equal ¶
func (r ExportReference) Equal(o ExportReference) bool
Equal reports whether two references name the same APIExport, ignoring the UID: a recreated export under the same name in the same cluster is the same export for the purpose of holding an identity.
func (ExportReference) OpenAPIModelName ¶
func (in ExportReference) OpenAPIModelName() string
OpenAPIModelName returns the OpenAPI model name for this type.
type Holder ¶
type Holder struct {
ExportReference `json:",inline"`
// since is when the holder was created.
//
// +optional
Since metav1.Time `json:"since,omitempty"`
}
Holder is an APIExport, other than the owner, that serves the identity.
func (*Holder) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Holder.
func (*Holder) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (Holder) OpenAPIModelName ¶
OpenAPIModelName returns the OpenAPI model name for this type.