Documentation ¶
Overview ¶
Copyright (c) HashiCorp, Inc. SPDX-License-Identifier: MPL-2.0
Package v2 contains API Schema definitions for the consul.hashicorp.com v2 API group +kubebuilder:object:generate=true +groupName=multicluster.consul.hashicorp.com
Index ¶
- Variables
- type Condition
- type ConditionType
- type Conditions
- type ExportedServices
- func (in *ExportedServices) AddFinalizer(f string)
- func (in *ExportedServices) DeepCopy() *ExportedServices
- func (in *ExportedServices) DeepCopyInto(out *ExportedServices)
- func (in *ExportedServices) DeepCopyObject() runtime.Object
- func (in *ExportedServices) DefaultNamespaceFields(tenancy common.ConsulTenancyConfig)
- func (in *ExportedServices) Finalizers() []string
- func (in *ExportedServices) KubeKind() string
- func (in *ExportedServices) KubernetesName() string
- func (in *ExportedServices) MatchesConsul(candidate *pbresource.Resource, namespace, partition string) bool
- func (in *ExportedServices) RemoveFinalizer(f string)
- func (in *ExportedServices) Resource(namespace, partition string) *pbresource.Resource
- func (in *ExportedServices) ResourceID(_, partition string) *pbresource.ID
- func (in *ExportedServices) SetLastSyncedTime(time *metav1.Time)
- func (in *ExportedServices) SetSyncedCondition(status corev1.ConditionStatus, reason, message string)
- func (in *ExportedServices) SyncedCondition() (status corev1.ConditionStatus, reason, message string)
- func (in *ExportedServices) SyncedConditionStatus() corev1.ConditionStatus
- func (in *ExportedServices) Validate(tenancy common.ConsulTenancyConfig) error
- type ExportedServicesList
- type Status
Constants ¶
This section is empty.
Variables ¶
var ( // MultiClusterGroup is a collection of multi-cluster resources. MultiClusterGroup = "multicluster.consul.hashicorp.com" // MultiClusterGroupVersion is group version used to register these objects. MultiClusterGroupVersion = schema.GroupVersion{Group: MultiClusterGroup, Version: "v2"} // MultiClusterSchemeBuilder is used to add go types to the GroupVersionKind scheme. MultiClusterSchemeBuilder = &scheme.Builder{GroupVersion: MultiClusterGroupVersion} // AddMultiClusterToScheme adds the types in this group-version to the given scheme. AddMultiClusterToScheme = MultiClusterSchemeBuilder.AddToScheme )
Functions ¶
This section is empty.
Types ¶
type Condition ¶
type Condition struct { // Type of condition. // +required Type ConditionType `json:"type" description:"type of status condition"` // Status of the condition, one of True, False, Unknown. // +required Status corev1.ConditionStatus `json:"status" description:"status of the condition, one of True, False, Unknown"` // LastTransitionTime is the last time the condition transitioned from one status to another. // +optional LastTransitionTime metav1.Time `json:"lastTransitionTime,omitempty" description:"last time the condition transitioned from one status to another"` // The reason for the condition's last transition. // +optional Reason string `json:"reason,omitempty" description:"one-word CamelCase reason for the condition's last transition"` // A human readable message indicating details about the transition. // +optional Message string `json:"message,omitempty" description:"human-readable message indicating details about last transition"` }
Conditions define a readiness condition for a Consul resource. See: https://github.com/kubernetes/community/blob/master/contributors/devel/sig-architecture/api-conventions.md#typical-status-properties +k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*Condition) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Condition.
func (*Condition) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ConditionType ¶
type ConditionType string
ConditionType is a camel-cased condition type.
const ( // ConditionSynced specifies that the resource has been synced with Consul. ConditionSynced ConditionType = "Synced" )
type Conditions ¶
type Conditions []Condition
Conditions is the schema for the conditions portion of the payload.
func (Conditions) DeepCopy ¶
func (in Conditions) DeepCopy() Conditions
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Conditions.
func (Conditions) DeepCopyInto ¶
func (in Conditions) DeepCopyInto(out *Conditions)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
type ExportedServices ¶
type ExportedServices struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata,omitempty"` Spec pbmulticluster.ExportedServices `json:"spec,omitempty"` Status `json:"status,omitempty"` }
ExportedServices is the Schema for the Exported Services API +kubebuilder:printcolumn:name="Synced",type="string",JSONPath=".status.conditions[?(@.type==\"Synced\")].status",description="The sync status of the resource with Consul" +kubebuilder:printcolumn:name="Last Synced",type="date",JSONPath=".status.lastSyncedTime",description="The last successful synced time of the resource with Consul" +kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp",description="The age of the resource" +kubebuilder:resource:scope="Namespaced"
func (*ExportedServices) AddFinalizer ¶
func (in *ExportedServices) AddFinalizer(f string)
func (*ExportedServices) DeepCopy ¶
func (in *ExportedServices) DeepCopy() *ExportedServices
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportedServices.
func (*ExportedServices) DeepCopyInto ¶
func (in *ExportedServices) DeepCopyInto(out *ExportedServices)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExportedServices) DeepCopyObject ¶
func (in *ExportedServices) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
func (*ExportedServices) DefaultNamespaceFields ¶
func (in *ExportedServices) DefaultNamespaceFields(tenancy common.ConsulTenancyConfig)
DefaultNamespaceFields is required as part of the common.MeshConfig interface.
func (*ExportedServices) Finalizers ¶
func (in *ExportedServices) Finalizers() []string
func (*ExportedServices) KubeKind ¶
func (in *ExportedServices) KubeKind() string
func (*ExportedServices) KubernetesName ¶
func (in *ExportedServices) KubernetesName() string
func (*ExportedServices) MatchesConsul ¶
func (in *ExportedServices) MatchesConsul(candidate *pbresource.Resource, namespace, partition string) bool
func (*ExportedServices) RemoveFinalizer ¶
func (in *ExportedServices) RemoveFinalizer(f string)
func (*ExportedServices) Resource ¶
func (in *ExportedServices) Resource(namespace, partition string) *pbresource.Resource
func (*ExportedServices) ResourceID ¶
func (in *ExportedServices) ResourceID(_, partition string) *pbresource.ID
func (*ExportedServices) SetLastSyncedTime ¶
func (in *ExportedServices) SetLastSyncedTime(time *metav1.Time)
func (*ExportedServices) SetSyncedCondition ¶
func (in *ExportedServices) SetSyncedCondition(status corev1.ConditionStatus, reason, message string)
func (*ExportedServices) SyncedCondition ¶
func (in *ExportedServices) SyncedCondition() (status corev1.ConditionStatus, reason, message string)
func (*ExportedServices) SyncedConditionStatus ¶
func (in *ExportedServices) SyncedConditionStatus() corev1.ConditionStatus
func (*ExportedServices) Validate ¶
func (in *ExportedServices) Validate(tenancy common.ConsulTenancyConfig) error
type ExportedServicesList ¶
type ExportedServicesList struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:"metadata,omitempty"` Items []*ExportedServices `json:"items"` }
ExportedServicesList contains a list of ExportedServices.
func (*ExportedServicesList) DeepCopy ¶
func (in *ExportedServicesList) DeepCopy() *ExportedServicesList
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new ExportedServicesList.
func (*ExportedServicesList) DeepCopyInto ¶
func (in *ExportedServicesList) DeepCopyInto(out *ExportedServicesList)
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*ExportedServicesList) DeepCopyObject ¶
func (in *ExportedServicesList) DeepCopyObject() runtime.Object
DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object.
type Status ¶
type Status struct { // Conditions indicate the latest available observations of a resource's current state. // +optional // +patchMergeKey=type // +patchStrategy=merge Conditions Conditions `json:"conditions,omitempty" patchStrategy:"merge" patchMergeKey:"type"` // LastSyncedTime is the last time the resource successfully synced with Consul. // +optional LastSyncedTime *metav1.Time `json:"lastSyncedTime,omitempty" description:"last time the condition transitioned from one status to another"` }
+k8s:deepcopy-gen=true +k8s:openapi-gen=true
func (*Status) DeepCopy ¶
DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new Status.
func (*Status) DeepCopyInto ¶
DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil.
func (*Status) GetCondition ¶
func (s *Status) GetCondition(t ConditionType) *Condition