Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Commit f515955

Browse files
feat: Update CRDs (#13)
1 parent b0f4a52 commit f515955

17 files changed

Lines changed: 1554 additions & 59 deletions

Generated/KubernetesCRDModelGen.SourceGenerator/KubernetesCRDModelGen.SourceGenerator.SourceGenerator/v1.clusterimagecatalogs.postgresql.cnpg.io.g.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ public partial class V1ClusterImageCatalogList : IKubernetesObject<V1ListMeta>,
3636
public required IList<V1ClusterImageCatalog> Items { get; set; }
3737
}
3838

39+
/// <summary>CatalogComponentImage is a named image entry for a non-PostgreSQL component.</summary>
40+
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
41+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
42+
public partial class V1ClusterImageCatalogSpecComponentImages
43+
{
44+
/// <summary>Image is the container image reference.</summary>
45+
[JsonPropertyName("image")]
46+
public required string Image { get; set; }
47+
48+
/// <summary>Key is the unique identifier for this image within the catalog.</summary>
49+
[JsonPropertyName("key")]
50+
public required string Key { get; set; }
51+
}
52+
3953
/// <summary>
4054
/// ExtensionEnvVar defines an environment variable for a specific extension
4155
/// image volume.
@@ -139,7 +153,11 @@ public partial class V1ClusterImageCatalogSpecImagesExtensions
139153
[JsonPropertyName("ld_library_path")]
140154
public IList<string>? LdLibraryPath { get; set; }
141155

142-
/// <summary>The name of the extension, required</summary>
156+
/// <summary>
157+
/// The name of the extension, required. The limit of 59 characters
158+
/// leaves room for the prefix the operator adds when deriving the
159+
/// extension&apos;s Kubernetes Volume name (capped at 63 characters).
160+
/// </summary>
143161
[JsonPropertyName("name")]
144162
public required string Name { get; set; }
145163
}
@@ -170,6 +188,13 @@ public partial class V1ClusterImageCatalogSpecImages
170188
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
171189
public partial class V1ClusterImageCatalogSpec
172190
{
191+
/// <summary>
192+
/// ComponentImages is a list of named images for components other than PostgreSQL
193+
/// (e.g. pgbouncer). Keys must be unique within a catalog.
194+
/// </summary>
195+
[JsonPropertyName("componentImages")]
196+
public IList<V1ClusterImageCatalogSpecComponentImages>? ComponentImages { get; set; }
197+
173198
/// <summary>List of CatalogImages available in the catalog</summary>
174199
[JsonPropertyName("images")]
175200
public required IList<V1ClusterImageCatalogSpecImages> Images { get; set; }

Generated/KubernetesCRDModelGen.SourceGenerator/KubernetesCRDModelGen.SourceGenerator.SourceGenerator/v1.clusters.postgresql.cnpg.io.g.cs

Lines changed: 252 additions & 14 deletions
Large diffs are not rendered by default.

Generated/KubernetesCRDModelGen.SourceGenerator/KubernetesCRDModelGen.SourceGenerator.SourceGenerator/v1.databaseroles.postgresql.cnpg.io.g.cs

Lines changed: 402 additions & 0 deletions
Large diffs are not rendered by default.

Generated/KubernetesCRDModelGen.SourceGenerator/KubernetesCRDModelGen.SourceGenerator.SourceGenerator/v1.imagecatalogs.postgresql.cnpg.io.g.cs

Lines changed: 26 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ public partial class V1ImageCatalogList : IKubernetesObject<V1ListMeta>, IItems<
3636
public required IList<V1ImageCatalog> Items { get; set; }
3737
}
3838

39+
/// <summary>CatalogComponentImage is a named image entry for a non-PostgreSQL component.</summary>
40+
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
41+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
42+
public partial class V1ImageCatalogSpecComponentImages
43+
{
44+
/// <summary>Image is the container image reference.</summary>
45+
[JsonPropertyName("image")]
46+
public required string Image { get; set; }
47+
48+
/// <summary>Key is the unique identifier for this image within the catalog.</summary>
49+
[JsonPropertyName("key")]
50+
public required string Key { get; set; }
51+
}
52+
3953
/// <summary>
4054
/// ExtensionEnvVar defines an environment variable for a specific extension
4155
/// image volume.
@@ -139,7 +153,11 @@ public partial class V1ImageCatalogSpecImagesExtensions
139153
[JsonPropertyName("ld_library_path")]
140154
public IList<string>? LdLibraryPath { get; set; }
141155

142-
/// <summary>The name of the extension, required</summary>
156+
/// <summary>
157+
/// The name of the extension, required. The limit of 59 characters
158+
/// leaves room for the prefix the operator adds when deriving the
159+
/// extension&apos;s Kubernetes Volume name (capped at 63 characters).
160+
/// </summary>
143161
[JsonPropertyName("name")]
144162
public required string Name { get; set; }
145163
}
@@ -170,6 +188,13 @@ public partial class V1ImageCatalogSpecImages
170188
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
171189
public partial class V1ImageCatalogSpec
172190
{
191+
/// <summary>
192+
/// ComponentImages is a list of named images for components other than PostgreSQL
193+
/// (e.g. pgbouncer). Keys must be unique within a catalog.
194+
/// </summary>
195+
[JsonPropertyName("componentImages")]
196+
public IList<V1ImageCatalogSpecComponentImages>? ComponentImages { get; set; }
197+
173198
/// <summary>List of CatalogImages available in the catalog</summary>
174199
[JsonPropertyName("images")]
175200
public required IList<V1ImageCatalogSpecImages> Images { get; set; }

Generated/KubernetesCRDModelGen.SourceGenerator/KubernetesCRDModelGen.SourceGenerator.SourceGenerator/v1.poolers.postgresql.cnpg.io.g.cs

Lines changed: 123 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -355,26 +355,59 @@ public partial class V1PoolerSpecMonitoringPodMonitorRelabelings
355355
}
356356

357357
/// <summary>
358-
/// The configuration of the monitoring infrastructure of this pooler.
359-
///
360-
/// Deprecated: This feature will be removed in an upcoming release. If
361-
/// you need this functionality, you can create a PodMonitor manually.
358+
/// Configure TLS communication for the metrics endpoint.
359+
/// Changing tls.enabled option will force a rollout of all instances.
362360
/// </summary>
363361
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
364362
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
363+
public partial class V1PoolerSpecMonitoringTls
364+
{
365+
/// <summary>
366+
/// Enable TLS for the monitoring endpoint.
367+
/// Changing this option will force a rollout of all instances.
368+
/// </summary>
369+
[JsonPropertyName("enabled")]
370+
public bool? Enabled { get; set; }
371+
}
372+
373+
/// <summary>The configuration of the monitoring infrastructure of this pooler.</summary>
374+
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
375+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
365376
public partial class V1PoolerSpecMonitoring
366377
{
367-
/// <summary>Enable or disable the `PodMonitor`</summary>
378+
/// <summary>
379+
/// Enable or disable the `PodMonitor`
380+
///
381+
/// Deprecated: This feature will be removed in an upcoming release. If
382+
/// you need this functionality, you can create a PodMonitor manually.
383+
/// </summary>
368384
[JsonPropertyName("enablePodMonitor")]
369385
public bool? EnablePodMonitor { get; set; }
370386

371-
/// <summary>The list of metric relabelings for the `PodMonitor`. Applied to samples before ingestion.</summary>
387+
/// <summary>
388+
/// The list of metric relabelings for the `PodMonitor`. Applied to samples before ingestion.
389+
///
390+
/// Deprecated: This feature will be removed in an upcoming release. If
391+
/// you need this functionality, you can create a PodMonitor manually.
392+
/// </summary>
372393
[JsonPropertyName("podMonitorMetricRelabelings")]
373394
public IList<V1PoolerSpecMonitoringPodMonitorMetricRelabelings>? PodMonitorMetricRelabelings { get; set; }
374395

375-
/// <summary>The list of relabelings for the `PodMonitor`. Applied to samples before scraping.</summary>
396+
/// <summary>
397+
/// The list of relabelings for the `PodMonitor`. Applied to samples before scraping.
398+
///
399+
/// Deprecated: This feature will be removed in an upcoming release. If
400+
/// you need this functionality, you can create a PodMonitor manually.
401+
/// </summary>
376402
[JsonPropertyName("podMonitorRelabelings")]
377403
public IList<V1PoolerSpecMonitoringPodMonitorRelabelings>? PodMonitorRelabelings { get; set; }
404+
405+
/// <summary>
406+
/// Configure TLS communication for the metrics endpoint.
407+
/// Changing tls.enabled option will force a rollout of all instances.
408+
/// </summary>
409+
[JsonPropertyName("tls")]
410+
public V1PoolerSpecMonitoringTls? Tls { get; set; }
378411
}
379412

380413
/// <summary>
@@ -420,6 +453,35 @@ public partial class V1PoolerSpecPgbouncerClientTLSSecret
420453
public required string Name { get; set; }
421454
}
422455

456+
/// <summary>
457+
/// ImageCatalogRef points to an entry in an ImageCatalog or ClusterImageCatalog.
458+
/// Mutually exclusive with Image.
459+
/// </summary>
460+
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
461+
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
462+
public partial class V1PoolerSpecPgbouncerImageCatalogRef
463+
{
464+
/// <summary>
465+
/// APIGroup is the group for the resource being referenced.
466+
/// If APIGroup is not specified, the specified Kind must be in the core API group.
467+
/// For any other third-party types, APIGroup is required.
468+
/// </summary>
469+
[JsonPropertyName("apiGroup")]
470+
public string? ApiGroup { get; set; }
471+
472+
/// <summary>Key identifies the entry within the catalog&apos;s componentImages list.</summary>
473+
[JsonPropertyName("key")]
474+
public required string Key { get; set; }
475+
476+
/// <summary>Kind is the type of resource being referenced</summary>
477+
[JsonPropertyName("kind")]
478+
public required string Kind { get; set; }
479+
480+
/// <summary>Name is the name of resource being referenced</summary>
481+
[JsonPropertyName("name")]
482+
public required string Name { get; set; }
483+
}
484+
423485
/// <summary>The pool mode. Default: `session`.</summary>
424486
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
425487
[JsonConverter(typeof(JsonStringEnumConverter<V1PoolerSpecPgbouncerPoolModeEnum>))]
@@ -497,6 +559,21 @@ public partial class V1PoolerSpecPgbouncer
497559
[JsonPropertyName("clientTLSSecret")]
498560
public V1PoolerSpecPgbouncerClientTLSSecret? ClientTLSSecret { get; set; }
499561

562+
/// <summary>
563+
/// Image is the pgbouncer container image to use. When set, it takes
564+
/// precedence over ImageCatalogRef and the operator default, but is
565+
/// overridden by an explicit image set in the pod template.
566+
/// </summary>
567+
[JsonPropertyName("image")]
568+
public string? Image { get; set; }
569+
570+
/// <summary>
571+
/// ImageCatalogRef points to an entry in an ImageCatalog or ClusterImageCatalog.
572+
/// Mutually exclusive with Image.
573+
/// </summary>
574+
[JsonPropertyName("imageCatalogRef")]
575+
public V1PoolerSpecPgbouncerImageCatalogRef? ImageCatalogRef { get; set; }
576+
500577
/// <summary>
501578
/// Additional parameters to be passed to PgBouncer - please check
502579
/// the CNPG documentation for a list of options you can configure
@@ -11600,12 +11677,7 @@ public partial class V1PoolerSpec
1160011677
[JsonPropertyName("instances")]
1160111678
public int? Instances { get; set; }
1160211679

11603-
/// <summary>
11604-
/// The configuration of the monitoring infrastructure of this pooler.
11605-
///
11606-
/// Deprecated: This feature will be removed in an upcoming release. If
11607-
/// you need this functionality, you can create a PodMonitor manually.
11608-
/// </summary>
11680+
/// <summary>The configuration of the monitoring infrastructure of this pooler.</summary>
1160911681
[JsonPropertyName("monitoring")]
1161011682
public V1PoolerSpecMonitoring? Monitoring { get; set; }
1161111683

@@ -11636,6 +11708,21 @@ public partial class V1PoolerSpec
1163611708
public V1PoolerSpecTypeEnum? Type { get; set; }
1163711709
}
1163811710

11711+
/// <summary>Phase summarizes the overall lifecycle state of the Pooler.</summary>
11712+
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
11713+
[JsonConverter(typeof(JsonStringEnumConverter<V1PoolerStatusPhaseEnum>))]
11714+
public enum V1PoolerStatusPhaseEnum
11715+
{
11716+
[EnumMember(Value = "active"), JsonStringEnumMemberName("active")]
11717+
Active,
11718+
[EnumMember(Value = "paused"), JsonStringEnumMemberName("paused")]
11719+
Paused,
11720+
[EnumMember(Value = "inactive"), JsonStringEnumMemberName("inactive")]
11721+
Inactive,
11722+
[EnumMember(Value = "failed"), JsonStringEnumMemberName("failed")]
11723+
Failed
11724+
}
11725+
1163911726
/// <summary>The client CA secret version</summary>
1164011727
[global::System.CodeDom.Compiler.GeneratedCode("KubernetesCRDModelGen", "1.6.0+0fbafdb9fc339df17b265ba23ecc4a7be2359877")]
1164111728
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
@@ -11751,10 +11838,33 @@ public partial class V1PoolerStatusSecrets
1175111838
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
1175211839
public partial class V1PoolerStatus
1175311840
{
11841+
/// <summary>Error is the latest admission validation error</summary>
11842+
[JsonPropertyName("error")]
11843+
public string? Error { get; set; }
11844+
11845+
/// <summary>
11846+
/// Image is the resolved pgbouncer container image that the operator is
11847+
/// using for this Pooler, including any override coming from spec.template.
11848+
/// While Phase is Active or Paused this field reflects what the Deployment
11849+
/// actually runs; while Phase is Inactive or Failed it may carry the last
11850+
/// successfully resolved value (or be empty if the Pooler has never reconciled
11851+
/// successfully).
11852+
/// </summary>
11853+
[JsonPropertyName("image")]
11854+
public string? Image { get; set; }
11855+
1175411856
/// <summary>The number of pods trying to be scheduled</summary>
1175511857
[JsonPropertyName("instances")]
1175611858
public int? Instances { get; set; }
1175711859

11860+
/// <summary>Phase summarizes the overall lifecycle state of the Pooler.</summary>
11861+
[JsonPropertyName("phase")]
11862+
public V1PoolerStatusPhaseEnum? Phase { get; set; }
11863+
11864+
/// <summary>PhaseReason is a human-readable explanation of the current Phase.</summary>
11865+
[JsonPropertyName("phaseReason")]
11866+
public string? PhaseReason { get; set; }
11867+
1175811868
/// <summary>The resource version of the config object</summary>
1175911869
[JsonPropertyName("secrets")]
1176011870
public V1PoolerStatusSecrets? Secrets { get; set; }

Generated/KubernetesCRDModelGen.SourceGenerator/KubernetesCRDModelGen.SourceGenerator.SourceGenerator/v1.scheduledbackups.postgresql.cnpg.io.g.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ public partial class V1ScheduledBackupSpec
232232
[global::System.Diagnostics.CodeAnalysis.ExcludeFromCodeCoverage]
233233
public partial class V1ScheduledBackupStatus
234234
{
235+
/// <summary>Error is the latest admission validation error</summary>
236+
[JsonPropertyName("error")]
237+
public string? Error { get; set; }
238+
235239
/// <summary>The latest time the schedule</summary>
236240
[JsonPropertyName("lastCheckTime")]
237241
public DateTime? LastCheckTime { get; set; }

crds/backups.postgresql.cnpg.io.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.20.1
5+
controller-gen.kubebuilder.io/version: v0.21.0
66
helm.sh/resource-policy: keep
77
name: backups.postgresql.cnpg.io
88
spec:

crds/clusterimagecatalogs.postgresql.cnpg.io.yaml

Lines changed: 33 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: apiextensions.k8s.io/v1
22
kind: CustomResourceDefinition
33
metadata:
44
annotations:
5-
controller-gen.kubebuilder.io/version: v0.20.1
5+
controller-gen.kubebuilder.io/version: v0.21.0
66
helm.sh/resource-policy: keep
77
name: clusterimagecatalogs.postgresql.cnpg.io
88
spec:
@@ -45,6 +45,33 @@ spec:
4545
Specification of the desired behavior of the ClusterImageCatalog.
4646
More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#spec-and-status
4747
properties:
48+
componentImages:
49+
description: |-
50+
ComponentImages is a list of named images for components other than PostgreSQL
51+
(e.g. pgbouncer). Keys must be unique within a catalog.
52+
items:
53+
description: CatalogComponentImage is a named image entry for a non-PostgreSQL component.
54+
properties:
55+
image:
56+
description: Image is the container image reference.
57+
type: string
58+
key:
59+
description: Key is the unique identifier for this image within the catalog.
60+
maxLength: 63
61+
pattern: ^[a-z0-9]([-a-z0-9]*[a-z0-9])?$
62+
type: string
63+
required:
64+
- image
65+
- key
66+
type: object
67+
maxItems: 32
68+
type: array
69+
x-kubernetes-list-map-keys:
70+
- key
71+
x-kubernetes-list-type: map
72+
x-kubernetes-validations:
73+
- message: Component image keys must be unique
74+
rule: self.all(e, self.filter(f, f.key==e.key).size() == 1)
4875
images:
4976
description: List of CatalogImages available in the catalog
5077
items:
@@ -144,7 +171,11 @@ spec:
144171
type: string
145172
type: array
146173
name:
147-
description: The name of the extension, required
174+
description: |-
175+
The name of the extension, required. The limit of 59 characters
176+
leaves room for the prefix the operator adds when deriving the
177+
extension's Kubernetes Volume name (capped at 63 characters).
178+
maxLength: 59
148179
minLength: 1
149180
pattern: ^[a-z0-9]([-a-z0-9_]*[a-z0-9])?$
150181
type: string

0 commit comments

Comments
 (0)