topology

package
v0.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 1, 2024 License: BSD-3-Clause Imports: 37 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AllocateTunnelIDs

func AllocateTunnelIDs(
	previousTunnels map[string][]*clabernetesapisv1alpha1.PointToPointTunnel,
	processedTunnels map[string][]*clabernetesapisv1alpha1.PointToPointTunnel,
)

AllocateTunnelIDs processes the given tunnels and allocates vnids. This function updates the given status object by iterating over the freshly processed tunnels (as processed during a reconciliation) and assigning any tunnels in the status without a vnid the next valid vnid.

func GetTopologyKind added in v0.0.19

func GetTopologyKind(t *clabernetesapisv1alpha1.Topology) string

GetTopologyKind returns the "kind" of topology this CR represents -- typically this will be "containerlab", but may be "kne" or perhaps others in the future as well.

func NewController added in v0.0.19

NewController returns a new Controller.

func ReconcileResolve added in v0.0.29

func ReconcileResolve[T ctrlruntimeclient.Object, TL ctrlruntimeclient.ObjectList](
	ctx context.Context,
	reconciler *Reconciler,
	ownedType T,
	ownedTypeListing TL,
	ownedTypeName string,
	owningTopology *clabernetesapisv1alpha1.Topology,
	currentClabernetesConfigs map[string]*clabernetesutilcontainerlab.Config,
	resolveFunc func(
		ownedObject TL,
		currentClabernetesConfigs map[string]*clabernetesutilcontainerlab.Config,
		owningTopology *clabernetesapisv1alpha1.Topology,
	) (*clabernetesutil.ObjectDiffer[T], error),
) (*clabernetesutil.ObjectDiffer[T], error)

ReconcileResolve is a generic func to consolidate the more or less common pattern of resolving k8s objects that we need to reconcile in one of the "sub reconcilers" (i.e. deployment reconciler).

func ResolveGlobalVsTopologyBool added in v0.0.19

func ResolveGlobalVsTopologyBool(globalValue bool, topologyValue *bool) bool

ResolveGlobalVsTopologyBool accepts a pointer to bool value from the global config as well as from a topology spec, and returns a normal bool of the proper value. Meaning, if the topology value is unset, use the global value, but if the topology value is set always return that value.

func ResolveTopologyRemovePrefix added in v0.0.26

func ResolveTopologyRemovePrefix(t *clabernetesapisv1alpha1.Topology) bool

ResolveTopologyRemovePrefix returns true if the topology resource should strip the containerlab topology prefix from a resource (deployment/service) name. This helper exists primarily for testing reasons as in the "normal" course of operation this value would always be taken from the status of a Topology object as this field as this will hold the resolved value at time of the creation of the Topology object. In the testing case the status field will be nil though, so in that case we'll go with the default "false" here.

func ServiceConforms added in v0.0.19

func ServiceConforms(
	existingService,
	renderedService *k8scorev1.Service,
	expectedOwnerUID apimachinerytypes.UID,
) bool

ServiceConforms asserts if a given service conforms with a rendered service -- this isn't checking if the services are exactly the same, just checking that the parts clabernetes cares about are the same.

Types

type ConfigMapReconciler added in v0.0.19

type ConfigMapReconciler struct {
	// contains filtered or unexported fields
}

ConfigMapReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating configmaps for a clabernetes topology resource.

func NewConfigMapReconciler added in v0.0.19

func NewConfigMapReconciler(
	log claberneteslogging.Instance,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *ConfigMapReconciler

NewConfigMapReconciler returns an instance of ConfigMapReconciler.

func (*ConfigMapReconciler) Conforms added in v0.0.19

func (r *ConfigMapReconciler) Conforms(
	existingConfigMap,
	renderedConfigMap *k8scorev1.ConfigMap,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms checks if the existingConfigMap conforms with the renderedConfigMap.

func (*ConfigMapReconciler) Render added in v0.0.19

func (r *ConfigMapReconciler) Render(
	owningTopology *clabernetesapisv1alpha1.Topology,
	clabernetesConfigs map[string]*clabernetesutilcontainerlab.Config,
	filesFromURL map[string][]clabernetesapisv1alpha1.FileFromURL,
	imagePullSecretsString string,
) (*k8scorev1.ConfigMap, error)

Render accepts an object (just for name/namespace reasons) and a mapping of clabernetes sub-topology configs and tunnels and renders the final configmap for the deployment -- this is the configmap that will ultimately be referenced when mounting sub-topologies and tunnel data in the clabernetes launcher pod(s) for a given topology.

type ConnectivityReconciler added in v0.0.21

type ConnectivityReconciler struct {
	// contains filtered or unexported fields
}

ConnectivityReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating the Connectivity cr for the Topology.

func NewConnectivityReconciler added in v0.0.21

func NewConnectivityReconciler(
	log claberneteslogging.Instance,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *ConnectivityReconciler

NewConnectivityReconciler returns an instance of ConnectivityReconciler.

func (*ConnectivityReconciler) Conforms added in v0.0.21

func (r *ConnectivityReconciler) Conforms(
	existingConnectivity,
	renderedConnectivity *clabernetesapisv1alpha1.Connectivity,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms checks if the existing connectivity cr conforms to the rendered expectation.

func (*ConnectivityReconciler) Render added in v0.0.21

Render returns a rendered Connectivity cr for the given topology/tunnels.

type Controller added in v0.0.19

type Controller struct {
	*clabernetescontrollers.BaseController
	TopologyReconciler *Reconciler
}

Controller is the Containerlab topology controller object.

func (*Controller) Reconcile added in v0.0.19

func (c *Controller) Reconcile(
	ctx context.Context,
	req ctrlruntime.Request,
) (ctrlruntime.Result, error)

Reconcile handles reconciliation for this controller.

func (*Controller) SetupWithManager added in v0.0.19

func (c *Controller) SetupWithManager(mgr ctrlruntime.Manager) error

SetupWithManager sets up the controller with the Manager.

type DefinitionProcessor added in v0.0.29

type DefinitionProcessor interface {
	// Process processes the topology, updating the given reconcile data object as necessary.
	Process() error
}

DefinitionProcessor is an interface defining a definition processor -- that is, an object that accepts a clabernetes topology to update based on the included (probably containerlab, but maybe kne or others in the future) configuration.

func NewDefinitionProcessor added in v0.0.29

func NewDefinitionProcessor(
	logger claberneteslogging.Instance,
	topology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) (DefinitionProcessor, error)

NewDefinitionProcessor returns a definition processor for the given Topology.

type DeploymentReconciler added in v0.0.19

type DeploymentReconciler struct {
	// contains filtered or unexported fields
}

DeploymentReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating deployments for a clabernetes topology resource.

func NewDeploymentReconciler added in v0.0.19

func NewDeploymentReconciler(
	log claberneteslogging.Instance,
	managerAppName,
	managerNamespace,
	criKind string,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *DeploymentReconciler

NewDeploymentReconciler returns an instance of DeploymentReconciler.

func (*DeploymentReconciler) Conforms added in v0.0.19

func (r *DeploymentReconciler) Conforms(
	existingDeployment,
	renderedDeployment *k8sappsv1.Deployment,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms checks if the existingDeployment conforms with the renderedDeployment.

func (*DeploymentReconciler) DetermineNodesNeedingRestart added in v0.0.19

func (r *DeploymentReconciler) DetermineNodesNeedingRestart(
	reconcileData *ReconcileData,
)

DetermineNodesNeedingRestart accepts reconcile data (which contains the previous and current rendered sub-topologies) and updates the reconcile data NodesNeedingReboot set with each node that needs restarting due to configuration changes.

func (*DeploymentReconciler) Render added in v0.0.19

func (r *DeploymentReconciler) Render(
	owningTopology *clabernetesapisv1alpha1.Topology,
	clabernetesConfigs map[string]*clabernetesutilcontainerlab.Config,
	nodeName string,
) *k8sappsv1.Deployment

Render accepts the owning topology a mapping of clabernetes sub-topology configs and a node name and renders the final deployment for this node.

func (*DeploymentReconciler) RenderAll added in v0.0.19

func (r *DeploymentReconciler) RenderAll(
	owningTopology *clabernetesapisv1alpha1.Topology,
	clabernetesConfigs map[string]*clabernetesutilcontainerlab.Config,
	nodeNames []string,
) []*k8sappsv1.Deployment

RenderAll accepts the owning topology a mapping of clabernetes sub-topology configs and a list of node names and renders the final deployments for the given nodes.

func (*DeploymentReconciler) Resolve added in v0.0.19

Resolve accepts a mapping of clabernetes configs and a list of deployments that are -- by owner reference and/or labels -- associated with the topology. It returns a ObjectDiffer object that contains the missing, extra, and current deployments for the topology.

type PersistentVolumeClaimReconciler added in v0.0.19

type PersistentVolumeClaimReconciler struct {
	// contains filtered or unexported fields
}

PersistentVolumeClaimReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating the optional PVC that is used to persist the containerlab directory of a topology's nodes.

func NewPersistentVolumeClaimReconciler added in v0.0.19

func NewPersistentVolumeClaimReconciler(
	log claberneteslogging.Instance,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *PersistentVolumeClaimReconciler

NewPersistentVolumeClaimReconciler returns an instance of PersistentVolumeClaimReconciler.

func (*PersistentVolumeClaimReconciler) Conforms added in v0.0.19

func (r *PersistentVolumeClaimReconciler) Conforms(
	existingPVC,
	renderedPVC *k8scorev1.PersistentVolumeClaim,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms checks if the existingService conforms with the renderedService.

func (*PersistentVolumeClaimReconciler) Render added in v0.0.19

Render accepts the owning topology a mapping of clabernetes sub-topology configs and a node name and renders the pvc for this node. Note that *Render* (but not RenderAll) accepts an existing pvc as well - we do this because the VolumeName field is immutable, so we *must* use the name of the volume that got provisioned (if it exists). RenderAll in this case should not ever be used to render/re-render existing pvcs, so it can safely pass nil when it calls Render.

func (*PersistentVolumeClaimReconciler) RenderAll added in v0.0.19

RenderAll accepts the owning topology a mapping of clabernetes sub-topology configs and a list of node names and renders the pvcs for the given nodes.

func (*PersistentVolumeClaimReconciler) Resolve added in v0.0.19

Resolve accepts a mapping of clabernetes configs and a list of services that are -- by owner reference and/or labels -- associated with the topology. It returns a ObjectDiffer object that contains the missing, extra, and current services for the topology.

type ReconcileData added in v0.0.19

type ReconcileData struct {
	Kind string

	PreviousHashes clabernetesapisv1alpha1.ReconcileHashes
	ResolvedHashes clabernetesapisv1alpha1.ReconcileHashes

	PreviousConfigs      map[string]*clabernetesutilcontainerlab.Config
	ResolvedConfigs      map[string]*clabernetesutilcontainerlab.Config
	ResolvedConfigsBytes []byte

	ResolvedTunnels map[string][]*clabernetesapisv1alpha1.PointToPointTunnel

	ResolvedExposedPorts map[string]*clabernetesapisv1alpha1.ExposedPorts

	ShouldUpdateResource bool
	NodesNeedingReboot   clabernetesutil.StringSet
}

ReconcileData is a struct that holds data that is common during a reconciliation process regardless of the type of clabernetes topology that is being reconciled.

func NewReconcileData added in v0.0.19

func NewReconcileData(
	owningTopology *clabernetesapisv1alpha1.Topology,
) (*ReconcileData, error)

NewReconcileData accepts a Topology object and returns a ReconcileData object.

func (*ReconcileData) ConfigMapHasChanges added in v0.0.19

func (r *ReconcileData) ConfigMapHasChanges() bool

ConfigMapHasChanges returns true if the data that gets stored in the topology configmap has changed between the last reconcile and the current iteration. This is just a helper to be more verbose/clear what we are checking rather than having a giant conditional in the Reconciler.

func (*ReconcileData) SetStatus added in v0.0.19

func (r *ReconcileData) SetStatus(
	owningTopologyStatus *clabernetesapisv1alpha1.TopologyStatus,
) error

SetStatus accepts a topology status and updates it with the ReconcileData information. This is called prior to updating a clabernetes topology object so that the hashes and information that we set in ReconcileData makes its way to the CR.

type Reconciler

type Reconciler struct {
	Log    claberneteslogging.Instance
	Client ctrlruntimeclient.Client

	// these ones are exposed for testing purposes. no reason to not expose them really anyway so
	// no big deal. not exposing the others at this point since there isnt a reason to (yet, but
	// testing will probably cause them to be exposed at some point too)
	ServiceFabricReconciler         *ServiceFabricReconciler
	ServiceExposeReconciler         *ServiceExposeReconciler
	PersistentVolumeClaimReconciler *PersistentVolumeClaimReconciler
	DeploymentReconciler            *DeploymentReconciler
	// contains filtered or unexported fields
}

Reconciler (TopologyReconciler) is the base clabernetes topology reconciler that is embedded in all clabernetes topology controllers, it provides common methods for reconciling the common/standard resources that represent a clabernetes object (configmap, deployments, services, etc.).

func NewReconciler added in v0.0.19

func NewReconciler(
	log claberneteslogging.Instance,
	client ctrlruntimeclient.Client,
	managerAppName,
	managerNamespace,
	criKind string,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *Reconciler

NewReconciler creates a new generic Reconciler (TopologyReconciler).

func (*Reconciler) ReconcileConfigMap

func (r *Reconciler) ReconcileConfigMap(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcileConfigMap reconciles the primary configmap containing clabernetes configs, tunnel information, pull secret information, and perhaps more in the future.

func (*Reconciler) ReconcileConnectivity added in v0.0.21

func (r *Reconciler) ReconcileConnectivity(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcileConnectivity reconciles the inter-launcher-pod connectivity cr for the topology.

func (*Reconciler) ReconcileDeployments

func (r *Reconciler) ReconcileDeployments(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcileDeployments reconciles the deployments that make up a clabernetes Topology.

func (*Reconciler) ReconcileNamespaceResources added in v0.0.19

func (r *Reconciler) ReconcileNamespaceResources(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
) error

ReconcileNamespaceResources reconciles resources that exist in a Topology's namespace but are not 1:1 with a Topology -- for example ServiceAccount and RoleBinding resources which are created at the point the first Topology in a namespace is created and exist until the final Topology in a namespace is being removed.

func (*Reconciler) ReconcileNaming added in v0.0.26

func (r *Reconciler) ReconcileNaming(
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
)

ReconcileNaming resolves the "naming" flavor for the Topology and updates (if needed) the status of the Topology with this resolved value. Note that this field is immutable so once we have set it in the status we never have to do it again -- k8s/openapi validator things enforce that this naming value cannot change.

func (*Reconciler) ReconcilePersistentVolumeClaim added in v0.0.19

func (r *Reconciler) ReconcilePersistentVolumeClaim(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcilePersistentVolumeClaim reconciles the persistent volume claims used for persisting the containerlab working directory on nodes in a topology.

func (*Reconciler) ReconcileRoleBinding added in v0.0.19

func (r *Reconciler) ReconcileRoleBinding(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
) error

ReconcileRoleBinding reconciles the role binding for the given namespace -- note that there is only *one* role binding per namespace, but its simply reconciled each time a Topology is reconciled to make life easy. This and the ServiceAccount are the only resources we need to worry about when deleting, a Topology resource, hence there is `deleting` arg to indicate if we should see if we should clean things up.

func (*Reconciler) ReconcileServiceAccount added in v0.0.19

func (r *Reconciler) ReconcileServiceAccount(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
) error

ReconcileServiceAccount reconciles the service account for the given namespace -- note that there is only *one* service account per namespace, but its simply reconciled each time a Topology is reconciled to make life easy. This and the RoleBinding are the only resources we need to worry about when deleting, a Topology resource, hence there is `deleting` arg to indicate if we should see if we should clean things up.

func (*Reconciler) ReconcileServiceFabric

func (r *Reconciler) ReconcileServiceFabric(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcileServiceFabric reconciles the service used for "fabric" (inter node) connectivity.

func (*Reconciler) ReconcileServices added in v0.0.19

func (r *Reconciler) ReconcileServices(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcileServices reconciles all the services for a clabernetes Topology.

func (*Reconciler) ReconcileServicesExpose

func (r *Reconciler) ReconcileServicesExpose(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
) error

ReconcileServicesExpose reconciles the service(s) used for exposing nodes.

type RoleBindingReconciler added in v0.0.19

type RoleBindingReconciler struct {
	// contains filtered or unexported fields
}

RoleBindingReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating (and deleting when necessary) the clabernetes launcher role binding for a given namespace.

func NewRoleBindingReconciler added in v0.0.19

func NewRoleBindingReconciler(
	log claberneteslogging.Instance,
	client ctrlruntimeclient.Client,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
	appName string,
) *RoleBindingReconciler

NewRoleBindingReconciler returns an instance of RoleBindingReconciler.

func (*RoleBindingReconciler) Conforms added in v0.0.19

func (r *RoleBindingReconciler) Conforms(
	existingRoleBinding,
	renderedRoleBinding *k8srbacv1.RoleBinding,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms returns true if an existing RoleBinding conforms with the rendered RoleBinding.

func (*RoleBindingReconciler) Reconcile added in v0.0.19

func (r *RoleBindingReconciler) Reconcile(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
) error

Reconcile either enforces the RoleBinding configuration for a given namespace or removes the role binding if the Topology being reconciled is the last Topology resource in the namespace.

func (*RoleBindingReconciler) Render added in v0.0.19

func (r *RoleBindingReconciler) Render(
	owningTopology *clabernetesapisv1alpha1.Topology,
	existingRoleBinding *k8srbacv1.RoleBinding,
) *k8srbacv1.RoleBinding

Render renders the role binding for the given namespace. Exported for easy testing.

type ServiceAccountReconciler added in v0.0.19

type ServiceAccountReconciler struct {
	// contains filtered or unexported fields
}

ServiceAccountReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating (and deleting when necessary) the clabernetes launcher service account for a given namespace.

func NewServiceAccountReconciler added in v0.0.19

func NewServiceAccountReconciler(
	log claberneteslogging.Instance,
	client ctrlruntimeclient.Client,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *ServiceAccountReconciler

NewServiceAccountReconciler returns an instance of ServiceAccountReconciler.

func (*ServiceAccountReconciler) Conforms added in v0.0.19

func (r *ServiceAccountReconciler) Conforms(
	existingServiceAccount,
	renderedServiceAccount *k8scorev1.ServiceAccount,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms returns true if an existing ServiceAccount conforms with the rendered ServiceAccount.

func (*ServiceAccountReconciler) Reconcile added in v0.0.19

func (r *ServiceAccountReconciler) Reconcile(
	ctx context.Context,
	owningTopology *clabernetesapisv1alpha1.Topology,
) error

Reconcile either enforces the ServiceAccount configuration for a given namespace or removes the service account if the Topology being reconciled is the last Topology resource in the namespace.

func (*ServiceAccountReconciler) Render added in v0.0.19

func (r *ServiceAccountReconciler) Render(
	owningTopology *clabernetesapisv1alpha1.Topology,
	existingServieAccount *k8scorev1.ServiceAccount,
) *k8scorev1.ServiceAccount

Render renders a service account for the given namespace. Exported for easy testing.

type ServiceExposeReconciler added in v0.0.19

type ServiceExposeReconciler struct {
	// contains filtered or unexported fields
}

ServiceExposeReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating the "expose" service for a clabernetes topology resource.

func NewServiceExposeReconciler added in v0.0.19

func NewServiceExposeReconciler(
	log claberneteslogging.Instance,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *ServiceExposeReconciler

NewServiceExposeReconciler returns an instance of ServiceExposeReconciler.

func (*ServiceExposeReconciler) Conforms added in v0.0.19

func (r *ServiceExposeReconciler) Conforms(
	existingService,
	renderedService *k8scorev1.Service,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms checks if the existingService conforms with the renderedService.

func (*ServiceExposeReconciler) Render added in v0.0.19

func (r *ServiceExposeReconciler) Render(
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
	nodeName string,
) *k8scorev1.Service

Render accepts the owning topology a mapping of clabernetes sub-topology configs and a node name and renders the final expose service for this node.

func (*ServiceExposeReconciler) RenderAll added in v0.0.19

func (r *ServiceExposeReconciler) RenderAll(
	owningTopology *clabernetesapisv1alpha1.Topology,
	reconcileData *ReconcileData,
	nodeNames []string,
) []*k8scorev1.Service

RenderAll accepts the owning topology a mapping of clabernetes sub-topology configs and a list of node names and renders the final expose services for the given nodes.

func (*ServiceExposeReconciler) Resolve added in v0.0.19

Resolve accepts a mapping of clabernetes configs and a list of services that are -- by owner reference and/or labels -- associated with the topology. It returns a ObjectDiffer object that contains the missing, extra, and current services for the topology.

type ServiceFabricReconciler added in v0.0.19

type ServiceFabricReconciler struct {
	// contains filtered or unexported fields
}

ServiceFabricReconciler is a subcomponent of the "TopologyReconciler" but is exposed for testing purposes. This is the component responsible for rendering/validating the "fabric" service for a clabernetes topology resource.

func NewServiceFabricReconciler added in v0.0.19

func NewServiceFabricReconciler(
	log claberneteslogging.Instance,
	configManagerGetter clabernetesconfig.ManagerGetterFunc,
) *ServiceFabricReconciler

NewServiceFabricReconciler returns an instance of ServiceFabricReconciler.

func (*ServiceFabricReconciler) Conforms added in v0.0.19

func (r *ServiceFabricReconciler) Conforms(
	existingService,
	renderedService *k8scorev1.Service,
	expectedOwnerUID apimachinerytypes.UID,
) bool

Conforms checks if the existingService conforms with the renderedService.

func (*ServiceFabricReconciler) Render added in v0.0.19

func (r *ServiceFabricReconciler) Render(
	owningTopology *clabernetesapisv1alpha1.Topology,
	nodeName string,
) *k8scorev1.Service

Render accepts the owning topology a mapping of clabernetes sub-topology configs and a node name and renders the final fabric service for this node.

func (*ServiceFabricReconciler) RenderAll added in v0.0.19

func (r *ServiceFabricReconciler) RenderAll(
	owningTopology *clabernetesapisv1alpha1.Topology,
	nodeNames []string,
) []*k8scorev1.Service

RenderAll accepts the owning topology a mapping of clabernetes sub-topology configs and a list of node names and renders the final fabric services for the given nodes.

func (*ServiceFabricReconciler) Resolve added in v0.0.19

Resolve accepts a mapping of clabernetes configs and a list of services that are -- by owner reference and/or labels -- associated with the topology. It returns a ObjectDiffer object that contains the missing, extra, and current services for the topology.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL