deploy

package
v0.999.0 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2025 License: MIT Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyDeployment

func ApplyDeployment(ctx context.Context, cli client.Client, scheme *runtime.Scheme,
	instance *llamav1alpha1.LlamaStackDistribution, deployment *appsv1.Deployment, logger logr.Logger) error

ApplyDeployment creates or updates the Deployment.

func ApplyNetworkPolicy

func ApplyNetworkPolicy(ctx context.Context, c client.Client, scheme *runtime.Scheme,
	instance *llamav1alpha1.LlamaStackDistribution, networkPolicy *networkingv1.NetworkPolicy, log logr.Logger) error

ApplyNetworkPolicy creates or updates a NetworkPolicy.

func ApplyResources

func ApplyResources(
	ctx context.Context,
	cli client.Client,
	scheme *runtime.Scheme,
	ownerInstance *llamav1alpha1.LlamaStackDistribution,
	resMap *resmap.ResMap,
) error

ApplyResources takes a Kustomize ResMap and applies the resources to the cluster.

func CheckClusterRoleExists

func CheckClusterRoleExists(ctx context.Context, cli client.Client, crb *unstructured.Unstructured) (bool, error)

CheckClusterRoleExists checks if a RoleBinding should be skipped due to missing SCC ClusterRole.

func FilterExcludeKinds

func FilterExcludeKinds(resMap *resmap.ResMap, kindsToExclude []string) (*resmap.ResMap, error)

func GetOperatorNamespace

func GetOperatorNamespace() (string, error)

func GetServiceName

func GetServiceName(instance *llamav1alpha1.LlamaStackDistribution) string

func GetServicePort

func GetServicePort(instance *llamav1alpha1.LlamaStackDistribution) int32

func HandleDisabledNetworkPolicy

func HandleDisabledNetworkPolicy(ctx context.Context, c client.Client, networkPolicy *networkingv1.NetworkPolicy, log logr.Logger) error

HandleDisabledNetworkPolicy handles the deletion of a NetworkPolicy when the feature is disabled. It checks if the NetworkPolicy exists and deletes it if found.

func RenderManifest

func RenderManifest(
	fs filesys.FileSystem,
	manifestPath string,
	ownerInstance *llamav1alpha1.LlamaStackDistribution,
) (*resmap.ResMap, error)

RenderManifest takes a manifest directory and transforms it through kustomization and plugins to produce final Kubernetes resources.

func RenderManifestWithContext added in v0.4.0

func RenderManifestWithContext(
	fs filesys.FileSystem,
	manifestsPath string,
	ownerInstance *llamav1alpha1.LlamaStackDistribution,
	manifestCtx *ManifestContext,
) (*resmap.ResMap, error)

RenderManifestWithContext renders manifests and enhances the Deployment with complex specs.

Types

type ManifestContext added in v0.4.0

type ManifestContext struct {
	ResolvedImage string
	ConfigMapHash string
	CABundleHash  string
	ContainerSpec map[string]any
	PodSpec       map[string]any
}

ManifestContext provides the necessary context for complex resource rendering.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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