Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 1 addition & 44 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,49 +102,6 @@ aspire run --project src/MyApp.AppHost/MyApp.AppHost.csproj
aspire publish --project src/MyApp.AppHost/MyApp.AppHost.csproj --output-path ./artifacts/k8s
```

Common AppHost shapes:

Local development only:

```csharp
var dev = builder.AddKubernetesEnvironment("dev");

builder.AddKubeOps<Projects.AspireOperator>("operator")
.RunWithKubernetes(dev, run => run.WithPersistentCrds());
```

Azure publish/deploy only:

```csharp
var aks = builder.AddAzureKubernetesEnvironment("aks");

builder.AddKubeOps<Projects.AspireOperator>("operator")
.PublishAsKubernetesOperator(aks, publish => publish.WithServiceAccount("operator"));
```

Local run and Azure deploy:

```csharp
var dev = builder.AddKubernetesEnvironment("dev");
var aks = builder.AddAzureKubernetesEnvironment("aks");

builder.AddKubeOps<Projects.AspireOperator>("operator")
.RunWithKubernetes(dev)
.PublishAsKubernetesOperator(aks);
```

Publish only without an Aspire Kubernetes environment:

```csharp
builder.AddKubeOps<Projects.AspireOperator>("operator")
.PublishAsKubernetesOperator(publish =>
{
publish.Namespace = "operator-system";
publish.WithServiceAccount("operator");
});
```

Without `RunWithKubernetes(...)`, `AddKubeOps<TProject>(...)` keeps the operator in explicit-start mode for local Aspire runs. Standalone manifest publish does not require `AddKubernetesEnvironment(...)`, Helm, or a live cluster; publishing with a Kubernetes environment generates an Aspire Helm chart, while `aspire deploy` installs that chart into the selected environment.

## Packages

Expand Down Expand Up @@ -201,4 +158,4 @@ In short:

## Motivation

KubeOps aims to provide a first-class experience for developing Kubernetes operators within the .NET ecosystem, offering an alternative to Go-based SDKs like Kubebuilder and Operator SDK, while embracing familiar C# patterns and tooling.
KubeOps aims to provide a first-class experience for developing Kubernetes operators within the .NET ecosystem, offering an alternative to Go-based SDKs like Kubebuilder and Operator SDK, while embracing familiar C# patterns and tooling.
6 changes: 3 additions & 3 deletions docs/docs/operator/aspire.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ await host.RunAsync();
- **HTTP resilience** &mdash; the standard resilience handler (retries, circuit breaker, timeouts) is applied to all `HttpClient` instances.
- **Health checks** &mdash; a default `self` liveness check tagged `live`.

:::tip Operator name
:::tip[Operator name]
The OpenTelemetry service name and the tracing source name must match `OperatorSettings.Name` — otherwise the operator's reconciliation traces are never captured. Call `AddKubeOpsServiceDefaults()` **after** `AddKubernetesOperator()` so KubeOps can resolve the configured name automatically. If you must call it earlier, pass the name explicitly (and keep it in sync with `OperatorSettings.Name`):

```csharp
Expand Down Expand Up @@ -96,7 +96,7 @@ builder.Build().Run();
- `RunWithKubernetes(k8s)` opts the operator into local execution against a Kubernetes target.
- `PublishAsKubernetesOperator(k8s)` includes the operator, CRDs, RBAC, and service account in the Aspire Kubernetes publish/deploy output.

:::note Project reference
:::note[Project reference]
When referencing `KubeOps.Aspire.Hosting` from an AppHost, mark it as a normal code reference so the AppHost SDK does not treat it as a resource:

```xml
Expand Down Expand Up @@ -233,4 +233,4 @@ builder.AddKubeOps<Projects.AspireOperator>("operator")
.PublishAsKubernetesOperator(aks, publish => publish.WithServiceAccount("operator"));
```

For the deeper run/publish model, see [Aspire Kubernetes Operator Model](./aspire-kubernetes-model).
For the deeper run/publish model, see [Aspire Kubernetes Operator Model](./aspire-kubernetes-model).
Loading