KeycloakResourceBuilderExtensions
Class static net8.0
Provides extension methods for adding Keycloak resources to an
Hosting.IDistributedApplicationBuilder. namespace Aspire.Hosting;
public static class KeycloakResourceBuilderExtensions{ // ...} 9 members
Methods9
Section titled MethodsAddKeycloak(IDistributedApplicationBuilder, string, int?, IResourceBuilder<ParameterResource>, IResourceBuilder<ParameterResource>)extensionats exportIResourceBuilder<KeycloakResource> Adds a Keycloak container to the application model.
WithDataBindMount(IResourceBuilder<KeycloakResource>, string)extensionats exportIResourceBuilder<KeycloakResource> Adds a bind mount for the data folder to a Keycloak container resource.
WithDataVolume(IResourceBuilder<KeycloakResource>, string?)extensionats exportIResourceBuilder<KeycloakResource> Adds a named volume for the data folder to a Keycloak container resource.
WithDisabledFeatures(IResourceBuilder<KeycloakResource>, string[])extensionats exportIResourceBuilder<KeycloakResource> Additional feature names to disable for the keycloak resource
WithEnabledFeatures(IResourceBuilder<KeycloakResource>, string[])extensionats exportIResourceBuilder<KeycloakResource> Additional feature names to enable for the keycloak resource
WithOtlpExporter(IResourceBuilder<KeycloakResource>)extensionats exportIResourceBuilder<KeycloakResource> Injects the appropriate environment variables to allow the resource to enable sending telemetry to the dashboard.
- It ensures the "opentelemetry" Keycloak feature is enabled
- It sets the OTLP endpoint to the value of the
ASPIRE_DASHBOARD_OTLP_ENDPOINT_URLenvironment variable. - It sets the service name and instance id to the resource name and UID. Values are injected by the orchestrator.
- It sets a small batch schedule delay in development. This reduces the delay that OTLP exporter waits to sends telemetry and makes the dashboard telemetry pages responsive.
WithOtlpExporter(IResourceBuilder<KeycloakResource>, OtlpProtocol)extensionats exportIResourceBuilder<KeycloakResource> Injects the appropriate environment variables to allow the resource to enable sending telemetry to the dashboard.
- It ensures the "opentelemetry" Keycloak feature is enabled
- It sets the OTLP endpoint to the value of the
ASPIRE_DASHBOARD_OTLP_ENDPOINT_URLenvironment variable. - It sets the service name and instance id to the resource name and UID. Values are injected by the orchestrator.
- It sets a small batch schedule delay in development. This reduces the delay that OTLP exporter waits to sends telemetry and makes the dashboard telemetry pages responsive.
WithRealmImport(IResourceBuilder<KeycloakResource>, string, bool)extensionobsoleteIResourceBuilder<KeycloakResource> Adds a realm import to a Keycloak container resource.
WithRealmImport(IResourceBuilder<KeycloakResource>, string)extensionats ignoredIResourceBuilder<KeycloakResource> Adds a realm import to a Keycloak container resource.