Skip to main content

KubeOps Abstractions

Nuget NuGet Pre-Release

This package provides the fundamental building blocks for the KubeOps SDK. It defines the core interfaces, abstract base classes, and .NET attributes used throughout the operator framework.

Think of this package as the contract definition for key KubeOps components.

General Description

The KubeOps.Abstractions package is designed to provide a robust foundation for building Kubernetes operators using the KubeOps SDK. It offers a set of abstractions that allow developers to define custom resources, implement controllers, manage finalizers, and handle webhooks. By leveraging these abstractions, developers can create scalable and maintainable operator applications that interact seamlessly with Kubernetes.

When to Use

Most projects building a KubeOps operator will reference the main KubeOps.Operator package, which includes this abstractions package as a dependency.

By depending only on this package, you can define your entities and interfaces without pulling in the full operator runtime or Kubernetes client logic, promoting better separation of concerns. This is primarily useful if you want to:

  • Define your CRD entity classes in a separate library, shared between your operator and potentially other applications.
  • Build tools that need to understand KubeOps entity definitions without needing the operator runtime.

CRD schema metadata

Entity properties can describe OpenAPI schema metadata with attributes such as [DefaultValue], [Example], [Format], and [EnumValues]. String defaults and examples can set Json = true to represent structured JSON objects or arrays. [DefaultValue] can also be applied to a class to set the default wherever that type occurs in the generated schema, including the spec or status subresource.

API Reference

Browse the full public API surface of KubeOps.Abstractions on FuGet or find the package on NuGet.