Documentation
¶
Index ¶
- Constants
- type ClusterReconciler
- func (r *ClusterReconciler) FetchCredentials(namespace, secretRef string) (*gnmic.Credentials, error)
- func (r *ClusterReconciler) GetClusterPlan(namespace, name string) (*gnmic.ApplyPlan, error)
- func (r *ClusterReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
- func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
- type PipelineReconciler
- type TargetSourceReconciler
- type TargetStateReconciler
- type TunnelTargetPolicyReconciler
Constants ¶
const ( // ConditionTypeReady indicates the cluster is fully operational ConditionTypeReady = "Ready" // ConditionTypeCertificatesReady indicates TLS certificates are ready ConditionTypeCertificatesReady = "CertificatesReady" // ConditionTypeConfigApplied indicates configuration was applied to pods ConditionTypeConfigApplied = "ConfigApplied" )
Condition types for Cluster status
const ( // PipelineConditionTypeReady indicates the pipeline is active and has resources PipelineConditionTypeReady = "Ready" // PipelineConditionTypeResourcesResolved indicates all resources were resolved PipelineConditionTypeResourcesResolved = "ResourcesResolved" )
Condition types for Pipeline status
const ( // Labels LabelClusterName = "operator.gnmic.dev/cluster" LabelOutputName = "operator.gnmic.dev/output" LabelPipelineName = "operator.gnmic.dev/pipeline" LabelPodName = "operator.gnmic.dev/pod-name" LabelValueName = "gnmic" LabelValueManagedBy = "gnmic-operator" LabelServiceType = "operator.gnmic.dev/service-type" LabelValueServiceTypeTunnel = "tunnel" LabelValueServiceTypePrometheusOutput = "prometheus-output" LabelValueServiceTypeHeadless = "rest-api" LabelOutputType = "operator.gnmic.dev/output-type" LabelValueOutputTypePrometheus = "prometheus-output" LabelCertType = "operator.gnmic.dev/cert-type" LabelValueCertTypeClient = "client" LabelValueCertTypeTunnel = "tunnel" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterReconciler ¶
type ClusterReconciler struct {
client.Client
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
ClusterReconciler reconciles a Cluster object
func (*ClusterReconciler) FetchCredentials ¶
func (r *ClusterReconciler) FetchCredentials(namespace, secretRef string) (*gnmic.Credentials, error)
fetchCredentials fetches credentials from a secret
func (*ClusterReconciler) GetClusterPlan ¶ added in v0.2.0
func (r *ClusterReconciler) GetClusterPlan(namespace, name string) (*gnmic.ApplyPlan, error)
func (*ClusterReconciler) Reconcile ¶
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*ClusterReconciler) SetupWithManager ¶
func (r *ClusterReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type PipelineReconciler ¶
PipelineReconciler reconciles a Pipeline object
func (*PipelineReconciler) Reconcile ¶
Reconcile validates the Pipeline and updates its status. The actual configuration building happens in the ClusterReconciler which watches Pipelines.
func (*PipelineReconciler) SetupWithManager ¶
func (r *PipelineReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type TargetSourceReconciler ¶
TargetSourceReconciler reconciles a TargetSource object
func (*TargetSourceReconciler) Reconcile ¶
func (r *TargetSourceReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state.
func (*TargetSourceReconciler) SetupWithManager ¶
func (r *TargetSourceReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.
type TargetStateReconciler ¶ added in v0.2.0
type TargetStateReconciler struct {
client.Client
Scheme *runtime.Scheme
// contains filtered or unexported fields
}
TargetStateReconciler watches Cluster resources and manages SSE stream goroutines to collect target state from gNMIc pods. State updates are reflected into the Target CR's .status.clusterStates field.
func (*TargetStateReconciler) SetupWithManager ¶ added in v0.2.0
func (r *TargetStateReconciler) SetupWithManager(mgr ctrl.Manager) error
type TunnelTargetPolicyReconciler ¶
TunnelTargetPolicyReconciler reconciles a TunnelTargetPolicy object
func (*TunnelTargetPolicyReconciler) Reconcile ¶
func (r *TunnelTargetPolicyReconciler) Reconcile(ctx context.Context, req ctrl.Request) (ctrl.Result, error)
Reconcile is part of the main kubernetes reconciliation loop which aims to move the current state of the cluster closer to the desired state. TODO(user): Modify the Reconcile function to compare the state specified by the TunnelTargetPolicy object against the actual cluster state, and then perform operations to make the cluster state reflect the state specified by the user.
For more details, check Reconcile and its Result here: - https://pkg.go.dev/sigs.k8s.io/[email protected]/pkg/reconcile
func (*TunnelTargetPolicyReconciler) SetupWithManager ¶
func (r *TunnelTargetPolicyReconciler) SetupWithManager(mgr ctrl.Manager) error
SetupWithManager sets up the controller with the Manager.