Skip to content

Commit 69cabab

Browse files
Set docker summaries for all extensions. (#6323)
* Set docker summaries for all extensions. Saw that it was missing on SqlServer during Damian's demo. * Fix cosmos image * Fix summary * Move package tags hints to <remarks> * Fix tags * Update src/Aspire.Hosting.MySql/MySqlBuilderExtensions.cs --------- Co-authored-by: Eric Erhardt <[email protected]>
1 parent 194b783 commit 69cabab

File tree

28 files changed

+155
-48
lines changed

28 files changed

+155
-48
lines changed

src/Aspire.Hosting.Azure.CosmosDB/AzureCosmosDBExtensions.cs

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,14 +98,15 @@ public static IResourceBuilder<AzureCosmosDBResource> AddAzureCosmosDB(this IDis
9898

9999
/// <summary>
100100
/// Configures an Azure Cosmos DB resource to be emulated using the Azure Cosmos DB emulator with the NoSQL API. This resource requires an <see cref="AzureCosmosDBResource"/> to be added to the application model.
101-
/// For more information on the Azure Cosmos DB emulator, see <a href="https://learn.microsoft.com/azure/cosmos-db/emulator#authentication"></a>
101+
/// For more information on the Azure Cosmos DB emulator, see <a href="https://learn.microsoft.com/azure/cosmos-db/emulator#authentication"></a>.
102102
/// </summary>
103103
/// <param name="builder">The Azure Cosmos DB resource builder.</param>
104104
/// <param name="configureContainer">Callback that exposes underlying container used for emulation to allow for customization.</param>
105105
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>
106106
/// <remarks>
107107
/// When using the Azure Cosmos DB emulator, the container requires a TLS/SSL certificate.
108-
/// For more information, see <a href="https://learn.microsoft.com/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux#export-the-emulators-tlsssl-certificate"></a>
108+
/// For more information, see <a href="https://learn.microsoft.com/azure/cosmos-db/how-to-develop-emulator?tabs=docker-linux#export-the-emulators-tlsssl-certificate"></a>.
109+
/// This version of the package defaults to the <inheritdoc cref="CosmosDBEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="CosmosDBEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="CosmosDBEmulatorContainerImageTags.Image"/> container image.
109110
/// </remarks>
110111
public static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResourceBuilder<AzureCosmosDBResource> builder, Action<IResourceBuilder<AzureCosmosDBEmulatorResource>>? configureContainer = null)
111112
{
@@ -117,9 +118,9 @@ public static IResourceBuilder<AzureCosmosDBResource> RunAsEmulator(this IResour
117118
builder.WithEndpoint(name: "emulator", targetPort: 8081)
118119
.WithAnnotation(new ContainerImageAnnotation
119120
{
120-
Registry = "mcr.microsoft.com",
121-
Image = "cosmosdb/linux/azure-cosmos-emulator",
122-
Tag = "latest"
121+
Registry = CosmosDBEmulatorContainerImageTags.Registry,
122+
Image = CosmosDBEmulatorContainerImageTags.Image,
123+
Tag = CosmosDBEmulatorContainerImageTags.Tag
123124
});
124125

125126
CosmosClient? cosmosClient = null;
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Licensed to the .NET Foundation under one or more agreements.
2+
// The .NET Foundation licenses this file to you under the MIT license.
3+
4+
namespace Aspire.Hosting.Azure.Cosmos;
5+
6+
internal static class CosmosDBEmulatorContainerImageTags
7+
{
8+
/// <summary>mcr.microsoft.com</summary>
9+
public const string Registry = "mcr.microsoft.com";
10+
11+
/// <summary>cosmosdb/linux/azure-cosmos-emulator</summary>
12+
public const string Image = "cosmosdb/linux/azure-cosmos-emulator";
13+
14+
/// <summary>latest</summary>
15+
public const string Tag = "latest";
16+
}

src/Aspire.Hosting.Azure.EventHubs/AzureEventHubsExtensions.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ public static IResourceBuilder<AzureEventHubsResource> AddAzureEventHubs(
7878
/// <summary>
7979
/// Adds an Azure Event Hubs hub resource to the application model. This resource requires an <see cref="AzureEventHubsResource"/> to be added to the application model.
8080
/// </summary>
81+
/// <remarks>
82+
/// This version of the package defaults to the <inheritdoc cref="EventHubsEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="EventHubsEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="EventHubsEmulatorContainerImageTags.Image"/> container image.
83+
/// </remarks>
8184
/// <param name="builder">The Azure Event Hubs resource builder.</param>
8285
/// <param name="name">The name of the Event Hub.</param>
8386
public static IResourceBuilder<AzureEventHubsResource> AddEventHub(this IResourceBuilder<AzureEventHubsResource> builder, [ResourceName] string name)

src/Aspire.Hosting.Azure.EventHubs/EventHubsEmulatorContainerImageTags.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ namespace Aspire.Hosting.Azure.EventHubs;
55

66
internal static class EventHubsEmulatorContainerImageTags
77
{
8+
/// <summary>mcr.microsoft.com</summary>
89
public const string Registry = "mcr.microsoft.com";
10+
11+
/// <summary>azure-messaging/eventhubs-emulator</summary>
912
public const string Image = "azure-messaging/eventhubs-emulator";
10-
public const string Tag = "latest";
13+
14+
/// <summary>latest</summary>
15+
public const string Tag = "latest"; // latest is the only arch-agnostic tag
1116
}

src/Aspire.Hosting.Azure.Storage/AzureStorageExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,11 @@ public static IResourceBuilder<AzureStorageResource> AddAzureStorage(this IDistr
7979
}
8080

8181
/// <summary>
82-
/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model. This version of the package defaults to the <inheritdoc cref="StorageEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="StorageEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="StorageEmulatorContainerImageTags.Image"/> container image.
82+
/// Configures an Azure Storage resource to be emulated using Azurite. This resource requires an <see cref="AzureStorageResource"/> to be added to the application model.
8383
/// </summary>
84+
/// <remarks>
85+
/// This version of the package defaults to the <inheritdoc cref="StorageEmulatorContainerImageTags.Tag"/> tag of the <inheritdoc cref="StorageEmulatorContainerImageTags.Registry"/>/<inheritdoc cref="StorageEmulatorContainerImageTags.Image"/> container image.
86+
/// </remarks>
8487
/// <param name="builder">The Azure storage resource builder.</param>
8588
/// <param name="configureContainer">Callback that exposes underlying container used for emulation to allow for customization.</param>
8689
/// <returns>A reference to the <see cref="IResourceBuilder{T}"/>.</returns>

src/Aspire.Hosting.Elasticsearch/ElasticsearchBuilderExtensions.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,10 @@ public static class ElasticsearchBuilderExtensions
2020
private const int ElasticsearchInternalPort = 9300;
2121

2222
/// <summary>
23-
/// Adds an Elasticsearch container resource to the application model. This version of the package defaults to the <inheritdoc cref="ElasticsearchContainerImageTags.Tag"/> tag of the <inheritdoc cref="ElasticsearchContainerImageTags.Image"/> container image.
23+
/// Adds an Elasticsearch container resource to the application model.
2424
/// </summary>
2525
/// <remarks>
26-
/// The default image is "elasticsearch" and the tag is "8.15.1".
26+
/// This version of the package defaults to the <inheritdoc cref="ElasticsearchContainerImageTags.Tag"/> tag of the <inheritdoc cref="ElasticsearchContainerImageTags.Image"/> container image.
2727
/// </remarks>
2828
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
2929
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency.</param>
@@ -38,8 +38,8 @@ public static class ElasticsearchBuilderExtensions
3838
/// var elasticsearch = builder.AddElasticsearch("elasticsearch");
3939
/// var api = builder.AddProject&lt;Projects.Api&gt;("api")
4040
/// .WithReference(elasticsearch);
41-
///
42-
/// builder.Build().Run();
41+
///
42+
/// builder.Build().Run();
4343
/// </code>
4444
/// </example>
4545
public static IResourceBuilder<ElasticsearchResource> AddElasticsearch(
@@ -109,8 +109,8 @@ public static IResourceBuilder<ElasticsearchResource> AddElasticsearch(
109109
/// .WithDataVolume();
110110
/// var api = builder.AddProject&lt;Projects.Api&gt;("api")
111111
/// .WithReference(elasticsearch);
112-
///
113-
/// builder.Build().Run();
112+
///
113+
/// builder.Build().Run();
114114
/// </code>
115115
/// </example>
116116
public static IResourceBuilder<ElasticsearchResource> WithDataVolume(this IResourceBuilder<ElasticsearchResource> builder, string? name = null)
@@ -136,8 +136,8 @@ public static IResourceBuilder<ElasticsearchResource> WithDataVolume(this IResou
136136
/// .WithDataBindMount("./data/elasticsearch/data");
137137
/// var api = builder.AddProject&lt;Projects.Api&gt;("api")
138138
/// .WithReference(elasticsearch);
139-
///
140-
/// builder.Build().Run();
139+
///
140+
/// builder.Build().Run();
141141
/// </code>
142142
/// </example>
143143
public static IResourceBuilder<ElasticsearchResource> WithDataBindMount(this IResourceBuilder<ElasticsearchResource> builder, string source)

src/Aspire.Hosting.Garnet/GarnetBuilderExtensions.cs

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ public static class GarnetBuilderExtensions
1919
/// <summary>
2020
/// Adds a Garnet container to the application model.
2121
/// </summary>
22+
/// <remarks>
23+
/// This version of the package defaults to the <inheritdoc cref="GarnetContainerImageTags.Tag"/> tag of the <inheritdoc cref="GarnetContainerImageTags.Registry"/>/<inheritdoc cref="GarnetContainerImageTags.Image"/> container image.
24+
/// </remarks>
2225
/// <example>
2326
/// Use in application host
2427
/// <code lang="csharp">
@@ -27,8 +30,8 @@ public static class GarnetBuilderExtensions
2730
/// var garnet = builder.AddGarnet("garnet");
2831
/// var api = builder.AddProject&lt;Projects.Api&gt;("api)
2932
/// .WithReference(garnet);
30-
///
31-
/// builder.Build().Run();
33+
///
34+
/// builder.Build().Run();
3235
/// </code>
3336
/// </example>
3437
/// <example>
@@ -39,7 +42,7 @@ public static class GarnetBuilderExtensions
3942
///
4043
/// var multiplexer = builder.Services.BuildServiceProvider()
4144
/// .GetRequiredService&lt;IConnectionMultiplexer&gt;();
42-
///
45+
///
4346
/// var db = multiplexer.GetDatabase();
4447
/// db.HashSet("key", [new HashEntry("hash", "value")]);
4548
/// var value = db.HashGet("key", "hash");

src/Aspire.Hosting.Garnet/GarnetContainerImageTags.cs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,12 @@ namespace Aspire.Hosting.Garnet;
55

66
internal static class GarnetContainerImageTags
77
{
8+
/// <summary>ghcr.io</summary>
89
public const string Registry = "ghcr.io";
10+
11+
/// <summary>microsoft/garnet</summary>
912
public const string Image = "microsoft/garnet";
13+
14+
/// <summary>1.0</summary>
1015
public const string Tag = "1.0";
1116
}

src/Aspire.Hosting.Kafka/KafkaBuilderExtensions.cs

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,11 @@ public static class KafkaBuilderExtensions
2121
private const string Target = "/var/lib/kafka/data";
2222

2323
/// <summary>
24-
/// Adds a Kafka resource to the application. A container is used for local development. This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.Tag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.Image"/> container image.
24+
/// Adds a Kafka resource to the application. A container is used for local development.
2525
/// </summary>
26+
/// <remarks>
27+
/// This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.Tag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.Image"/> container image.
28+
/// </remarks>
2629
/// <param name="builder">The <see cref="IDistributedApplicationBuilder"/>.</param>
2730
/// <param name="name">The name of the resource. This name will be used as the connection string name when referenced in a dependency</param>
2831
/// <param name="port">The host port of Kafka broker.</param>
@@ -77,8 +80,11 @@ public static IResourceBuilder<KafkaServerResource> AddKafka(this IDistributedAp
7780
}
7881

7982
/// <summary>
80-
/// Adds a Kafka UI container to the application. This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.KafkaUiTag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.KafkaUiImage"/> container image.
83+
/// Adds a Kafka UI container to the application.
8184
/// </summary>
85+
/// <remarks>
86+
/// This version of the package defaults to the <inheritdoc cref="KafkaContainerImageTags.KafkaUiTag"/> tag of the <inheritdoc cref="KafkaContainerImageTags.KafkaUiImage"/> container image.
87+
/// </remarks>
8288
/// <param name="builder">The Kafka server resource builder.</param>
8389
/// <param name="configureContainer">Configuration callback for KafkaUI container resource.</param>
8490
/// <param name="containerName">The name of the container (Optional).</param>
Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
1-
// Licensed to the .NET Foundation under one or more agreements.
1+
// Licensed to the .NET Foundation under one or more agreements.
22
// The .NET Foundation licenses this file to you under the MIT license.
33

44
namespace Aspire.Hosting.Keycloak;
55

66
internal static class KeycloakContainerImageTags
77
{
8+
/// <summary>quay.io</summary>
89
public const string Registry = "quay.io";
10+
11+
/// <summary>keycloak/keycloak</summary>
912
public const string Image = "keycloak/keycloak";
13+
14+
/// <summary>25.0</summary>
1015
public const string Tag = "25.0";
1116
}

0 commit comments

Comments
 (0)