From d0c7593b705d12fa4857997f9cc998a17b004afa Mon Sep 17 00:00:00 2001 From: Andrea Fasano Date: Fri, 3 Jul 2026 03:57:29 -0400 Subject: [PATCH] bump openshift/api to fetch InternalReleaseImage v1 --- .../config/v1/networkobservabilityspec.go | 3 + .../v1alpha1/remotewriteauthorization.go | 36 +-- .../config/v1alpha1/remotewritespec.go | 2 +- .../applyconfigurations/internal/internal.go | 17 +- go.mod | 2 +- go.sum | 4 +- .../applyconfigurations/internal/internal.go | 10 + .../v1/internalreleaseimage.go | 280 ++++++++++++++++++ .../v1/internalreleaseimagebundlestatus.go | 71 +++++ .../v1/internalreleaseimageref.go | 28 ++ .../v1/internalreleaseimagespec.go | 34 +++ .../v1/internalreleaseimagestatus.go | 58 ++++ .../applyconfigurations/utils.go | 10 + .../v1/fake/fake_internalreleaseimage.go | 37 +++ .../fake/fake_machineconfiguration_client.go | 4 + .../v1/generated_expansion.go | 2 + .../v1/internalreleaseimage.go | 62 ++++ .../v1/machineconfiguration_client.go | 5 + .../informers/externalversions/generic.go | 2 + .../machineconfiguration/v1/interface.go | 7 + .../v1/internalreleaseimage.go | 85 ++++++ .../v1/expansion_generated.go | 4 + .../v1/internalreleaseimage.go | 32 ++ .../openshift/api/apps/.codegen.yaml | 2 + .../openshift/api/authorization/.codegen.yaml | 2 + .../openshift/api/build/.codegen.yaml | 2 + .../openshift/api/cloudnetwork/.codegen.yaml | 2 + .../openshift/api/config/v1/types_network.go | 3 + .../v1/zz_generated.swagger_doc_generated.go | 2 +- .../v1alpha1/types_cluster_monitoring.go | 66 +++-- .../config/v1alpha1/zz_generated.deepcopy.go | 7 +- .../zz_generated.swagger_doc_generated.go | 15 +- vendor/github.com/openshift/api/features.md | 6 +- .../openshift/api/image/.codegen.yaml | 5 + .../api/machineconfiguration/v1/register.go | 2 + .../v1/types_internalreleaseimage.go | 159 ++++++++++ .../v1/zz_generated.deepcopy.go | 151 ++++++++++ ..._generated.featuregated-crd-manifests.yaml | 24 ++ .../v1/zz_generated.model_name.go | 30 ++ .../v1/zz_generated.swagger_doc_generated.go | 59 ++++ .../openshift/api/network/.codegen.yaml | 5 +- .../api/networkoperator/.codegen.yaml | 2 + .../openshift/api/oauth/.codegen.yaml | 2 + .../openshift/api/openapi/openapi.json | 23 +- .../openshift/api/project/.codegen.yaml | 2 + .../openshift/api/quota/.codegen.yaml | 2 + .../openshift/api/route/.codegen.yaml | 2 + .../openshift/api/samples/.codegen.yaml | 2 + .../openshift/api/security/.codegen.yaml | 2 + .../openshift/api/template/.codegen.yaml | 2 + .../openshift/api/user/.codegen.yaml | 2 + vendor/modules.txt | 2 +- 52 files changed, 1285 insertions(+), 95 deletions(-) create mode 100644 machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimage.go create mode 100644 machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagebundlestatus.go create mode 100644 machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimageref.go create mode 100644 machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagespec.go create mode 100644 machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagestatus.go create mode 100644 machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_internalreleaseimage.go create mode 100644 machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/internalreleaseimage.go create mode 100644 machineconfiguration/informers/externalversions/machineconfiguration/v1/internalreleaseimage.go create mode 100644 machineconfiguration/listers/machineconfiguration/v1/internalreleaseimage.go create mode 100644 vendor/github.com/openshift/api/apps/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/authorization/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/build/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/machineconfiguration/v1/types_internalreleaseimage.go create mode 100644 vendor/github.com/openshift/api/project/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/quota/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/security/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/template/.codegen.yaml create mode 100644 vendor/github.com/openshift/api/user/.codegen.yaml diff --git a/config/applyconfigurations/config/v1/networkobservabilityspec.go b/config/applyconfigurations/config/v1/networkobservabilityspec.go index 1ccd980764..5e58d8e9c1 100644 --- a/config/applyconfigurations/config/v1/networkobservabilityspec.go +++ b/config/applyconfigurations/config/v1/networkobservabilityspec.go @@ -15,6 +15,9 @@ type NetworkObservabilitySpecApplyConfiguration struct { // Valid values are "InstallAndEnable" and "NoAction". // When set to "InstallAndEnable", ensure that network observability will be installed and enabled on the cluster. If already installed, no action taken, but if it gets uninstalled, it will install it again. // When set to "NoAction", nothing will be done regarding Network observability. + // During the installation of NetworkObservability, the platform checks for any existing manual installations. + // If a successful installation using the OLMv0 or OLMv1 API is detected, it will be used. + // If the platform cannot determine how the current version was installed, or if the existing installation is incomplete, the installation process will stop. InstallationPolicy *configv1.NetworkObservabilityInstallationPolicy `json:"installationPolicy,omitempty"` } diff --git a/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go b/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go index c32870d760..e9b07674d1 100644 --- a/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go +++ b/config/applyconfigurations/config/v1alpha1/remotewriteauthorization.go @@ -4,19 +4,19 @@ package v1alpha1 import ( configv1alpha1 "github.com/openshift/api/config/v1alpha1" - v1 "k8s.io/api/core/v1" ) // RemoteWriteAuthorizationApplyConfiguration represents a declarative configuration of the RemoteWriteAuthorization type for use // with apply. // // RemoteWriteAuthorization defines the authorization method for a remote write endpoint. -// Exactly one of the nested configs must be set according to the type discriminator. +// Nested config requirements depend on the type discriminator: Authorization requires authorization, +// BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs. type RemoteWriteAuthorizationApplyConfiguration struct { // type specifies the authorization method to use. - // Allowed values are BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, ServiceAccount. + // Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount. // - // When set to BearerToken, the bearer token is read from a Secret referenced by the bearerToken field. + // When set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field. // // When set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set. // @@ -24,16 +24,12 @@ type RemoteWriteAuthorizationApplyConfiguration struct { // // When set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set. // - // When set to SafeAuthorization, credentials are read from a single Secret key (Prometheus SafeAuthorization pattern). The secret key typically contains a Bearer token. Use the safeAuthorization field. - // // When set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path. Type *configv1alpha1.RemoteWriteAuthorizationType `json:"type,omitempty"` - // safeAuthorization defines the secret reference containing the credentials for authentication (e.g. Bearer token). - // Required when type is "SafeAuthorization", and forbidden otherwise. Maps to Prometheus SafeAuthorization. The secret must exist in the openshift-monitoring namespace. - SafeAuthorization *v1.SecretKeySelector `json:"safeAuthorization,omitempty"` - // bearerToken defines the secret reference containing the bearer token. - // Required when type is "BearerToken", and forbidden otherwise. - BearerToken *SecretKeySelectorApplyConfiguration `json:"bearerToken,omitempty"` + // authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). + // Required when type is "Authorization", and forbidden otherwise. + // The secret must exist in the openshift-monitoring namespace. + Authorization *SecretKeySelectorApplyConfiguration `json:"authorization,omitempty"` // basicAuth defines HTTP basic authentication credentials. // Required when type is "BasicAuth", and forbidden otherwise. BasicAuth *BasicAuthApplyConfiguration `json:"basicAuth,omitempty"` @@ -59,19 +55,11 @@ func (b *RemoteWriteAuthorizationApplyConfiguration) WithType(value configv1alph return b } -// WithSafeAuthorization sets the SafeAuthorization field in the declarative configuration to the given value -// and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the SafeAuthorization field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithSafeAuthorization(value v1.SecretKeySelector) *RemoteWriteAuthorizationApplyConfiguration { - b.SafeAuthorization = &value - return b -} - -// WithBearerToken sets the BearerToken field in the declarative configuration to the given value +// WithAuthorization sets the Authorization field in the declarative configuration to the given value // and returns the receiver, so that objects can be built by chaining "With" function invocations. -// If called multiple times, the BearerToken field is set to the value of the last call. -func (b *RemoteWriteAuthorizationApplyConfiguration) WithBearerToken(value *SecretKeySelectorApplyConfiguration) *RemoteWriteAuthorizationApplyConfiguration { - b.BearerToken = value +// If called multiple times, the Authorization field is set to the value of the last call. +func (b *RemoteWriteAuthorizationApplyConfiguration) WithAuthorization(value *SecretKeySelectorApplyConfiguration) *RemoteWriteAuthorizationApplyConfiguration { + b.Authorization = value return b } diff --git a/config/applyconfigurations/config/v1alpha1/remotewritespec.go b/config/applyconfigurations/config/v1alpha1/remotewritespec.go index cbb3c0dbcf..07c4b1e15f 100644 --- a/config/applyconfigurations/config/v1alpha1/remotewritespec.go +++ b/config/applyconfigurations/config/v1alpha1/remotewritespec.go @@ -23,7 +23,7 @@ type RemoteWriteSpecApplyConfiguration struct { Name *string `json:"name,omitempty"` // authorization defines the authorization method for the remote write endpoint. // When omitted, no authorization is performed. - // When set, type must be one of BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). + // When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). AuthorizationConfig *RemoteWriteAuthorizationApplyConfiguration `json:"authorization,omitempty"` // headers specifies the custom HTTP headers to be sent along with each remote write request. // Sending custom headers makes the configuration of a proxy in between optional and helps the diff --git a/config/applyconfigurations/internal/internal.go b/config/applyconfigurations/internal/internal.go index 2251f8427e..ba8ba86cf8 100644 --- a/config/applyconfigurations/internal/internal.go +++ b/config/applyconfigurations/internal/internal.go @@ -5480,21 +5480,18 @@ var schemaYAML = typed.YAMLObject(`types: - name: com.github.openshift.api.config.v1alpha1.RemoteWriteAuthorization map: fields: - - name: basicAuth + - name: authorization type: - namedType: com.github.openshift.api.config.v1alpha1.BasicAuth + namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector default: {} - - name: bearerToken + - name: basicAuth type: - namedType: com.github.openshift.api.config.v1alpha1.SecretKeySelector + namedType: com.github.openshift.api.config.v1alpha1.BasicAuth default: {} - name: oauth2 type: namedType: com.github.openshift.api.config.v1alpha1.OAuth2 default: {} - - name: safeAuthorization - type: - namedType: io.k8s.api.core.v1.SecretKeySelector - name: sigv4 type: namedType: com.github.openshift.api.config.v1alpha1.Sigv4 @@ -5505,14 +5502,12 @@ var schemaYAML = typed.YAMLObject(`types: unions: - discriminator: type fields: + - fieldName: authorization + discriminatorValue: Authorization - fieldName: basicAuth discriminatorValue: BasicAuth - - fieldName: bearerToken - discriminatorValue: BearerToken - fieldName: oauth2 discriminatorValue: OAuth2 - - fieldName: safeAuthorization - discriminatorValue: SafeAuthorization - fieldName: sigv4 discriminatorValue: Sigv4 - name: com.github.openshift.api.config.v1alpha1.RemoteWriteSpec diff --git a/go.mod b/go.mod index 58d111aa3d..4c6347c35f 100644 --- a/go.mod +++ b/go.mod @@ -3,7 +3,7 @@ module github.com/openshift/client-go go 1.25.0 require ( - github.com/openshift/api v0.0.0-20260626094904-39631f42b31b + github.com/openshift/api v0.0.0-20260702202555-ef71f942ef6c github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee github.com/spf13/pflag v1.0.10 k8s.io/api v0.35.1 diff --git a/go.sum b/go.sum index 7afac635d9..8feb2dca0e 100644 --- a/go.sum +++ b/go.sum @@ -71,8 +71,8 @@ github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee h1:W5t00kpgFd github.com/modern-go/reflect2 v1.0.3-0.20250322232337-35a7c28c31ee/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 h1:C3w9PqII01/Oq1c1nUAm88MOHcQC9l5mIlSMApZMrHA= github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822/go.mod h1:+n7T8mK8HuQTcFwEeznm/DIxMOiR9yIdICNftLE1DvQ= -github.com/openshift/api v0.0.0-20260626094904-39631f42b31b h1:Z1/iNCtc1qSLJC6a91Ywk2oPSB4S9v6Lzz9hFPPkvWc= -github.com/openshift/api v0.0.0-20260626094904-39631f42b31b/go.mod h1:Jm45pE7O6/G0tYYhiLzNyZykTjmf9BfhsKYuGfLLwTE= +github.com/openshift/api v0.0.0-20260702202555-ef71f942ef6c h1:X1B6zMjD7kmKcuv9Cxs4Zhq/ruJLt7BsywSWKOA9Jn4= +github.com/openshift/api v0.0.0-20260702202555-ef71f942ef6c/go.mod h1:7WJ3IPaK6nmWT8bDcaNooHqd0H5WepjVqV/10VlkMEM= github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee h1:+Sp5GGnjHDhT/a/nQ1xdp43UscBMr7G5wxsYotyhzJ4= github.com/openshift/build-machinery-go v0.0.0-20250530140348-dc5b2804eeee/go.mod h1:8jcm8UPtg2mCAsxfqKil1xrmRMI3a+XU2TZ9fF8A7TE= github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= diff --git a/machineconfiguration/applyconfigurations/internal/internal.go b/machineconfiguration/applyconfigurations/internal/internal.go index d73a44a705..d75576e2b8 100644 --- a/machineconfiguration/applyconfigurations/internal/internal.go +++ b/machineconfiguration/applyconfigurations/internal/internal.go @@ -43,6 +43,16 @@ var schemaYAML = typed.YAMLObject(`types: elementType: namedType: __untyped_deduced_ elementRelationship: separable +- name: com.github.openshift.api.machineconfiguration.v1.InternalReleaseImage + scalar: untyped + list: + elementType: + namedType: __untyped_atomic_ + elementRelationship: atomic + map: + elementType: + namedType: __untyped_deduced_ + elementRelationship: separable - name: com.github.openshift.api.machineconfiguration.v1.KubeletConfig scalar: untyped list: diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimage.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimage.go new file mode 100644 index 0000000000..a3bc9b1e88 --- /dev/null +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimage.go @@ -0,0 +1,280 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + internal "github.com/openshift/client-go/machineconfiguration/applyconfigurations/internal" + apismetav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + managedfields "k8s.io/apimachinery/pkg/util/managedfields" + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// InternalReleaseImageApplyConfiguration represents a declarative configuration of the InternalReleaseImage type for use +// with apply. +// +// InternalReleaseImage is used to keep track and manage a set +// of release bundles (OCP and OLM operators images) that are stored +// into the control planes nodes. +// This is a singleton resource with 'cluster' as the only valid name. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +type InternalReleaseImageApplyConfiguration struct { + metav1.TypeMetaApplyConfiguration `json:",inline"` + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + *metav1.ObjectMetaApplyConfiguration `json:"metadata,omitempty"` + // spec describes the configuration of this internal release image. + Spec *InternalReleaseImageSpecApplyConfiguration `json:"spec,omitempty"` + // status describes the last observed state of this internal release image. + Status *InternalReleaseImageStatusApplyConfiguration `json:"status,omitempty"` +} + +// InternalReleaseImage constructs a declarative configuration of the InternalReleaseImage type for use with +// apply. +func InternalReleaseImage(name string) *InternalReleaseImageApplyConfiguration { + b := &InternalReleaseImageApplyConfiguration{} + b.WithName(name) + b.WithKind("InternalReleaseImage") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b +} + +// ExtractInternalReleaseImageFrom extracts the applied configuration owned by fieldManager from +// internalReleaseImage for the specified subresource. Pass an empty string for subresource to extract +// the main resource. Common subresources include "status", "scale", etc. +// internalReleaseImage must be a unmodified InternalReleaseImage API object that was retrieved from the Kubernetes API. +// ExtractInternalReleaseImageFrom provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractInternalReleaseImageFrom(internalReleaseImage *machineconfigurationv1.InternalReleaseImage, fieldManager string, subresource string) (*InternalReleaseImageApplyConfiguration, error) { + b := &InternalReleaseImageApplyConfiguration{} + err := managedfields.ExtractInto(internalReleaseImage, internal.Parser().Type("com.github.openshift.api.machineconfiguration.v1.InternalReleaseImage"), fieldManager, b, subresource) + if err != nil { + return nil, err + } + b.WithName(internalReleaseImage.Name) + + b.WithKind("InternalReleaseImage") + b.WithAPIVersion("machineconfiguration.openshift.io/v1") + return b, nil +} + +// ExtractInternalReleaseImage extracts the applied configuration owned by fieldManager from +// internalReleaseImage. If no managedFields are found in internalReleaseImage for fieldManager, a +// InternalReleaseImageApplyConfiguration is returned with only the Name, Namespace (if applicable), +// APIVersion and Kind populated. It is possible that no managed fields were found for because other +// field managers have taken ownership of all the fields previously owned by fieldManager, or because +// the fieldManager never owned fields any fields. +// internalReleaseImage must be a unmodified InternalReleaseImage API object that was retrieved from the Kubernetes API. +// ExtractInternalReleaseImage provides a way to perform a extract/modify-in-place/apply workflow. +// Note that an extracted apply configuration will contain fewer fields than what the fieldManager previously +// applied if another fieldManager has updated or force applied any of the previously applied fields. +func ExtractInternalReleaseImage(internalReleaseImage *machineconfigurationv1.InternalReleaseImage, fieldManager string) (*InternalReleaseImageApplyConfiguration, error) { + return ExtractInternalReleaseImageFrom(internalReleaseImage, fieldManager, "") +} + +// ExtractInternalReleaseImageStatus extracts the applied configuration owned by fieldManager from +// internalReleaseImage for the status subresource. +func ExtractInternalReleaseImageStatus(internalReleaseImage *machineconfigurationv1.InternalReleaseImage, fieldManager string) (*InternalReleaseImageApplyConfiguration, error) { + return ExtractInternalReleaseImageFrom(internalReleaseImage, fieldManager, "status") +} + +func (b InternalReleaseImageApplyConfiguration) IsApplyConfiguration() {} + +// WithKind sets the Kind field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Kind field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithKind(value string) *InternalReleaseImageApplyConfiguration { + b.TypeMetaApplyConfiguration.Kind = &value + return b +} + +// WithAPIVersion sets the APIVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the APIVersion field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithAPIVersion(value string) *InternalReleaseImageApplyConfiguration { + b.TypeMetaApplyConfiguration.APIVersion = &value + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithName(value string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Name = &value + return b +} + +// WithGenerateName sets the GenerateName field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the GenerateName field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithGenerateName(value string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.GenerateName = &value + return b +} + +// WithNamespace sets the Namespace field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Namespace field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithNamespace(value string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Namespace = &value + return b +} + +// WithUID sets the UID field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the UID field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithUID(value types.UID) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.UID = &value + return b +} + +// WithResourceVersion sets the ResourceVersion field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the ResourceVersion field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithResourceVersion(value string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.ResourceVersion = &value + return b +} + +// WithGeneration sets the Generation field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Generation field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithGeneration(value int64) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.Generation = &value + return b +} + +// WithCreationTimestamp sets the CreationTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the CreationTimestamp field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithCreationTimestamp(value apismetav1.Time) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.CreationTimestamp = &value + return b +} + +// WithDeletionTimestamp sets the DeletionTimestamp field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionTimestamp field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithDeletionTimestamp(value apismetav1.Time) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionTimestamp = &value + return b +} + +// WithDeletionGracePeriodSeconds sets the DeletionGracePeriodSeconds field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the DeletionGracePeriodSeconds field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithDeletionGracePeriodSeconds(value int64) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + b.ObjectMetaApplyConfiguration.DeletionGracePeriodSeconds = &value + return b +} + +// WithLabels puts the entries into the Labels field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Labels field, +// overwriting an existing map entries in Labels field with the same key. +func (b *InternalReleaseImageApplyConfiguration) WithLabels(entries map[string]string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Labels == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Labels = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Labels[k] = v + } + return b +} + +// WithAnnotations puts the entries into the Annotations field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, the entries provided by each call will be put on the Annotations field, +// overwriting an existing map entries in Annotations field with the same key. +func (b *InternalReleaseImageApplyConfiguration) WithAnnotations(entries map[string]string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + if b.ObjectMetaApplyConfiguration.Annotations == nil && len(entries) > 0 { + b.ObjectMetaApplyConfiguration.Annotations = make(map[string]string, len(entries)) + } + for k, v := range entries { + b.ObjectMetaApplyConfiguration.Annotations[k] = v + } + return b +} + +// WithOwnerReferences adds the given value to the OwnerReferences field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the OwnerReferences field. +func (b *InternalReleaseImageApplyConfiguration) WithOwnerReferences(values ...*metav1.OwnerReferenceApplyConfiguration) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + if values[i] == nil { + panic("nil value passed to WithOwnerReferences") + } + b.ObjectMetaApplyConfiguration.OwnerReferences = append(b.ObjectMetaApplyConfiguration.OwnerReferences, *values[i]) + } + return b +} + +// WithFinalizers adds the given value to the Finalizers field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Finalizers field. +func (b *InternalReleaseImageApplyConfiguration) WithFinalizers(values ...string) *InternalReleaseImageApplyConfiguration { + b.ensureObjectMetaApplyConfigurationExists() + for i := range values { + b.ObjectMetaApplyConfiguration.Finalizers = append(b.ObjectMetaApplyConfiguration.Finalizers, values[i]) + } + return b +} + +func (b *InternalReleaseImageApplyConfiguration) ensureObjectMetaApplyConfigurationExists() { + if b.ObjectMetaApplyConfiguration == nil { + b.ObjectMetaApplyConfiguration = &metav1.ObjectMetaApplyConfiguration{} + } +} + +// WithSpec sets the Spec field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Spec field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithSpec(value *InternalReleaseImageSpecApplyConfiguration) *InternalReleaseImageApplyConfiguration { + b.Spec = value + return b +} + +// WithStatus sets the Status field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Status field is set to the value of the last call. +func (b *InternalReleaseImageApplyConfiguration) WithStatus(value *InternalReleaseImageStatusApplyConfiguration) *InternalReleaseImageApplyConfiguration { + b.Status = value + return b +} + +// GetKind retrieves the value of the Kind field in the declarative configuration. +func (b *InternalReleaseImageApplyConfiguration) GetKind() *string { + return b.TypeMetaApplyConfiguration.Kind +} + +// GetAPIVersion retrieves the value of the APIVersion field in the declarative configuration. +func (b *InternalReleaseImageApplyConfiguration) GetAPIVersion() *string { + return b.TypeMetaApplyConfiguration.APIVersion +} + +// GetName retrieves the value of the Name field in the declarative configuration. +func (b *InternalReleaseImageApplyConfiguration) GetName() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Name +} + +// GetNamespace retrieves the value of the Namespace field in the declarative configuration. +func (b *InternalReleaseImageApplyConfiguration) GetNamespace() *string { + b.ensureObjectMetaApplyConfigurationExists() + return b.ObjectMetaApplyConfiguration.Namespace +} diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagebundlestatus.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagebundlestatus.go new file mode 100644 index 0000000000..bb1fe357f9 --- /dev/null +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagebundlestatus.go @@ -0,0 +1,71 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// InternalReleaseImageBundleStatusApplyConfiguration represents a declarative configuration of the InternalReleaseImageBundleStatus type for use +// with apply. +// +// InternalReleaseImageBundleStatus describes the observed state of a single release bundle managed by the cluster. +type InternalReleaseImageBundleStatusApplyConfiguration struct { + // conditions represent the observations of an internal release image current state. Valid types are: + // Mounted, Installing, Available, Removing and Degraded. + // + // If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + // If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + // If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + // If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + // If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + // + // In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + // the other conditions to be equal to "False") before being able to pull its content. + // When present, conditions must contain at least 1 entry and must not exceed 5 entries. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. + Name *string `json:"name,omitempty"` + // image is an OCP release image referenced by digest. + // The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + // where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + // The length of the whole spec must be between 1 to 447 characters. + // The field is optional, and it will be provided after a release has been successfully installed. + Image *string `json:"image,omitempty"` +} + +// InternalReleaseImageBundleStatusApplyConfiguration constructs a declarative configuration of the InternalReleaseImageBundleStatus type for use with +// apply. +func InternalReleaseImageBundleStatus() *InternalReleaseImageBundleStatusApplyConfiguration { + return &InternalReleaseImageBundleStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *InternalReleaseImageBundleStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *InternalReleaseImageBundleStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *InternalReleaseImageBundleStatusApplyConfiguration) WithName(value string) *InternalReleaseImageBundleStatusApplyConfiguration { + b.Name = &value + return b +} + +// WithImage sets the Image field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Image field is set to the value of the last call. +func (b *InternalReleaseImageBundleStatusApplyConfiguration) WithImage(value string) *InternalReleaseImageBundleStatusApplyConfiguration { + b.Image = &value + return b +} diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimageref.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimageref.go new file mode 100644 index 0000000000..2660edfe98 --- /dev/null +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimageref.go @@ -0,0 +1,28 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// InternalReleaseImageRefApplyConfiguration represents a declarative configuration of the InternalReleaseImageRef type for use +// with apply. +// +// InternalReleaseImageRef is used to provide a simple reference for a release +// bundle. Currently it contains only the name field. +type InternalReleaseImageRefApplyConfiguration struct { + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. + Name *string `json:"name,omitempty"` +} + +// InternalReleaseImageRefApplyConfiguration constructs a declarative configuration of the InternalReleaseImageRef type for use with +// apply. +func InternalReleaseImageRef() *InternalReleaseImageRefApplyConfiguration { + return &InternalReleaseImageRefApplyConfiguration{} +} + +// WithName sets the Name field in the declarative configuration to the given value +// and returns the receiver, so that objects can be built by chaining "With" function invocations. +// If called multiple times, the Name field is set to the value of the last call. +func (b *InternalReleaseImageRefApplyConfiguration) WithName(value string) *InternalReleaseImageRefApplyConfiguration { + b.Name = &value + return b +} diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagespec.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagespec.go new file mode 100644 index 0000000000..69dddfcc55 --- /dev/null +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagespec.go @@ -0,0 +1,34 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +// InternalReleaseImageSpecApplyConfiguration represents a declarative configuration of the InternalReleaseImageSpec type for use +// with apply. +// +// InternalReleaseImageSpec defines the desired state of a InternalReleaseImage. +type InternalReleaseImageSpecApplyConfiguration struct { + // releases is a list of release bundle identifiers that the user wants to + // add/remove to/from the control plane nodes. + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 16 entries. + Releases []InternalReleaseImageRefApplyConfiguration `json:"releases,omitempty"` +} + +// InternalReleaseImageSpecApplyConfiguration constructs a declarative configuration of the InternalReleaseImageSpec type for use with +// apply. +func InternalReleaseImageSpec() *InternalReleaseImageSpecApplyConfiguration { + return &InternalReleaseImageSpecApplyConfiguration{} +} + +// WithReleases adds the given value to the Releases field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Releases field. +func (b *InternalReleaseImageSpecApplyConfiguration) WithReleases(values ...*InternalReleaseImageRefApplyConfiguration) *InternalReleaseImageSpecApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithReleases") + } + b.Releases = append(b.Releases, *values[i]) + } + return b +} diff --git a/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagestatus.go b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagestatus.go new file mode 100644 index 0000000000..a2a36881e5 --- /dev/null +++ b/machineconfiguration/applyconfigurations/machineconfiguration/v1/internalreleaseimagestatus.go @@ -0,0 +1,58 @@ +// Code generated by applyconfiguration-gen. DO NOT EDIT. + +package v1 + +import ( + metav1 "k8s.io/client-go/applyconfigurations/meta/v1" +) + +// InternalReleaseImageStatusApplyConfiguration represents a declarative configuration of the InternalReleaseImageStatus type for use +// with apply. +// +// InternalReleaseImageStatus describes the current state of a InternalReleaseImage. +type InternalReleaseImageStatusApplyConfiguration struct { + // conditions represent the observations of the InternalReleaseImage controller current state. + // Valid types are: Degraded. + // If Degraded is true, that means something has gone wrong in the controller. + // The conditions list must contain at most 5 entries. + Conditions []metav1.ConditionApplyConfiguration `json:"conditions,omitempty"` + // releases is a list of the release bundles currently owned and managed by the + // cluster. + // A release bundle content could be safely pulled only when its Conditions field + // contains at least an Available entry set to "True" and Degraded to "False". + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 32 entries. + Releases []InternalReleaseImageBundleStatusApplyConfiguration `json:"releases,omitempty"` +} + +// InternalReleaseImageStatusApplyConfiguration constructs a declarative configuration of the InternalReleaseImageStatus type for use with +// apply. +func InternalReleaseImageStatus() *InternalReleaseImageStatusApplyConfiguration { + return &InternalReleaseImageStatusApplyConfiguration{} +} + +// WithConditions adds the given value to the Conditions field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Conditions field. +func (b *InternalReleaseImageStatusApplyConfiguration) WithConditions(values ...*metav1.ConditionApplyConfiguration) *InternalReleaseImageStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithConditions") + } + b.Conditions = append(b.Conditions, *values[i]) + } + return b +} + +// WithReleases adds the given value to the Releases field in the declarative configuration +// and returns the receiver, so that objects can be build by chaining "With" function invocations. +// If called multiple times, values provided by each call will be appended to the Releases field. +func (b *InternalReleaseImageStatusApplyConfiguration) WithReleases(values ...*InternalReleaseImageBundleStatusApplyConfiguration) *InternalReleaseImageStatusApplyConfiguration { + for i := range values { + if values[i] == nil { + panic("nil value passed to WithReleases") + } + b.Releases = append(b.Releases, *values[i]) + } + return b +} diff --git a/machineconfiguration/applyconfigurations/utils.go b/machineconfiguration/applyconfigurations/utils.go index 7fb4007ae4..3a08201ffb 100644 --- a/machineconfiguration/applyconfigurations/utils.go +++ b/machineconfiguration/applyconfigurations/utils.go @@ -50,6 +50,16 @@ func ForKind(kind schema.GroupVersionKind) interface{} { return &machineconfigurationv1.ImageRegistryBundleApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("ImageSecretObjectReference"): return &machineconfigurationv1.ImageSecretObjectReferenceApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("InternalReleaseImage"): + return &machineconfigurationv1.InternalReleaseImageApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("InternalReleaseImageBundleStatus"): + return &machineconfigurationv1.InternalReleaseImageBundleStatusApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("InternalReleaseImageRef"): + return &machineconfigurationv1.InternalReleaseImageRefApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("InternalReleaseImageSpec"): + return &machineconfigurationv1.InternalReleaseImageSpecApplyConfiguration{} + case v1.SchemeGroupVersion.WithKind("InternalReleaseImageStatus"): + return &machineconfigurationv1.InternalReleaseImageStatusApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("IrreconcilableChangeDiff"): return &machineconfigurationv1.IrreconcilableChangeDiffApplyConfiguration{} case v1.SchemeGroupVersion.WithKind("KubeletConfig"): diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_internalreleaseimage.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_internalreleaseimage.go new file mode 100644 index 0000000000..e4fc3ef150 --- /dev/null +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_internalreleaseimage.go @@ -0,0 +1,37 @@ +// Code generated by client-gen. DO NOT EDIT. + +package fake + +import ( + v1 "github.com/openshift/api/machineconfiguration/v1" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + typedmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1" + gentype "k8s.io/client-go/gentype" +) + +// fakeInternalReleaseImages implements InternalReleaseImageInterface +type fakeInternalReleaseImages struct { + *gentype.FakeClientWithListAndApply[*v1.InternalReleaseImage, *v1.InternalReleaseImageList, *machineconfigurationv1.InternalReleaseImageApplyConfiguration] + Fake *FakeMachineconfigurationV1 +} + +func newFakeInternalReleaseImages(fake *FakeMachineconfigurationV1) typedmachineconfigurationv1.InternalReleaseImageInterface { + return &fakeInternalReleaseImages{ + gentype.NewFakeClientWithListAndApply[*v1.InternalReleaseImage, *v1.InternalReleaseImageList, *machineconfigurationv1.InternalReleaseImageApplyConfiguration]( + fake.Fake, + "", + v1.SchemeGroupVersion.WithResource("internalreleaseimages"), + v1.SchemeGroupVersion.WithKind("InternalReleaseImage"), + func() *v1.InternalReleaseImage { return &v1.InternalReleaseImage{} }, + func() *v1.InternalReleaseImageList { return &v1.InternalReleaseImageList{} }, + func(dst, src *v1.InternalReleaseImageList) { dst.ListMeta = src.ListMeta }, + func(list *v1.InternalReleaseImageList) []*v1.InternalReleaseImage { + return gentype.ToPointerSlice(list.Items) + }, + func(list *v1.InternalReleaseImageList, items []*v1.InternalReleaseImage) { + list.Items = gentype.FromPointerSlice(items) + }, + ), + fake, + } +} diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go index 81354c417e..05c4f2d80f 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/fake/fake_machineconfiguration_client.go @@ -20,6 +20,10 @@ func (c *FakeMachineconfigurationV1) ControllerConfigs() v1.ControllerConfigInte return newFakeControllerConfigs(c) } +func (c *FakeMachineconfigurationV1) InternalReleaseImages() v1.InternalReleaseImageInterface { + return newFakeInternalReleaseImages(c) +} + func (c *FakeMachineconfigurationV1) KubeletConfigs() v1.KubeletConfigInterface { return newFakeKubeletConfigs(c) } diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go index bd8ab6e162..fa409d9fbb 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/generated_expansion.go @@ -6,6 +6,8 @@ type ContainerRuntimeConfigExpansion interface{} type ControllerConfigExpansion interface{} +type InternalReleaseImageExpansion interface{} + type KubeletConfigExpansion interface{} type MachineConfigExpansion interface{} diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/internalreleaseimage.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/internalreleaseimage.go new file mode 100644 index 0000000000..c0deae9ac4 --- /dev/null +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/internalreleaseimage.go @@ -0,0 +1,62 @@ +// Code generated by client-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + applyconfigurationsmachineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/applyconfigurations/machineconfiguration/v1" + scheme "github.com/openshift/client-go/machineconfiguration/clientset/versioned/scheme" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + types "k8s.io/apimachinery/pkg/types" + watch "k8s.io/apimachinery/pkg/watch" + gentype "k8s.io/client-go/gentype" +) + +// InternalReleaseImagesGetter has a method to return a InternalReleaseImageInterface. +// A group's client should implement this interface. +type InternalReleaseImagesGetter interface { + InternalReleaseImages() InternalReleaseImageInterface +} + +// InternalReleaseImageInterface has methods to work with InternalReleaseImage resources. +type InternalReleaseImageInterface interface { + Create(ctx context.Context, internalReleaseImage *machineconfigurationv1.InternalReleaseImage, opts metav1.CreateOptions) (*machineconfigurationv1.InternalReleaseImage, error) + Update(ctx context.Context, internalReleaseImage *machineconfigurationv1.InternalReleaseImage, opts metav1.UpdateOptions) (*machineconfigurationv1.InternalReleaseImage, error) + // Add a +genclient:noStatus comment above the type to avoid generating UpdateStatus(). + UpdateStatus(ctx context.Context, internalReleaseImage *machineconfigurationv1.InternalReleaseImage, opts metav1.UpdateOptions) (*machineconfigurationv1.InternalReleaseImage, error) + Delete(ctx context.Context, name string, opts metav1.DeleteOptions) error + DeleteCollection(ctx context.Context, opts metav1.DeleteOptions, listOpts metav1.ListOptions) error + Get(ctx context.Context, name string, opts metav1.GetOptions) (*machineconfigurationv1.InternalReleaseImage, error) + List(ctx context.Context, opts metav1.ListOptions) (*machineconfigurationv1.InternalReleaseImageList, error) + Watch(ctx context.Context, opts metav1.ListOptions) (watch.Interface, error) + Patch(ctx context.Context, name string, pt types.PatchType, data []byte, opts metav1.PatchOptions, subresources ...string) (result *machineconfigurationv1.InternalReleaseImage, err error) + Apply(ctx context.Context, internalReleaseImage *applyconfigurationsmachineconfigurationv1.InternalReleaseImageApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.InternalReleaseImage, err error) + // Add a +genclient:noStatus comment above the type to avoid generating ApplyStatus(). + ApplyStatus(ctx context.Context, internalReleaseImage *applyconfigurationsmachineconfigurationv1.InternalReleaseImageApplyConfiguration, opts metav1.ApplyOptions) (result *machineconfigurationv1.InternalReleaseImage, err error) + InternalReleaseImageExpansion +} + +// internalReleaseImages implements InternalReleaseImageInterface +type internalReleaseImages struct { + *gentype.ClientWithListAndApply[*machineconfigurationv1.InternalReleaseImage, *machineconfigurationv1.InternalReleaseImageList, *applyconfigurationsmachineconfigurationv1.InternalReleaseImageApplyConfiguration] +} + +// newInternalReleaseImages returns a InternalReleaseImages +func newInternalReleaseImages(c *MachineconfigurationV1Client) *internalReleaseImages { + return &internalReleaseImages{ + gentype.NewClientWithListAndApply[*machineconfigurationv1.InternalReleaseImage, *machineconfigurationv1.InternalReleaseImageList, *applyconfigurationsmachineconfigurationv1.InternalReleaseImageApplyConfiguration]( + "internalreleaseimages", + c.RESTClient(), + scheme.ParameterCodec, + "", + func() *machineconfigurationv1.InternalReleaseImage { + return &machineconfigurationv1.InternalReleaseImage{} + }, + func() *machineconfigurationv1.InternalReleaseImageList { + return &machineconfigurationv1.InternalReleaseImageList{} + }, + ), + } +} diff --git a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go index 8d661ff173..458b52ca97 100644 --- a/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go +++ b/machineconfiguration/clientset/versioned/typed/machineconfiguration/v1/machineconfiguration_client.go @@ -14,6 +14,7 @@ type MachineconfigurationV1Interface interface { RESTClient() rest.Interface ContainerRuntimeConfigsGetter ControllerConfigsGetter + InternalReleaseImagesGetter KubeletConfigsGetter MachineConfigsGetter MachineConfigNodesGetter @@ -37,6 +38,10 @@ func (c *MachineconfigurationV1Client) ControllerConfigs() ControllerConfigInter return newControllerConfigs(c) } +func (c *MachineconfigurationV1Client) InternalReleaseImages() InternalReleaseImageInterface { + return newInternalReleaseImages(c) +} + func (c *MachineconfigurationV1Client) KubeletConfigs() KubeletConfigInterface { return newKubeletConfigs(c) } diff --git a/machineconfiguration/informers/externalversions/generic.go b/machineconfiguration/informers/externalversions/generic.go index d82e58acfb..a6365dde64 100644 --- a/machineconfiguration/informers/externalversions/generic.go +++ b/machineconfiguration/informers/externalversions/generic.go @@ -42,6 +42,8 @@ func (f *sharedInformerFactory) ForResource(resource schema.GroupVersionResource return &genericInformer{resource: resource.GroupResource(), informer: f.Machineconfiguration().V1().ContainerRuntimeConfigs().Informer()}, nil case v1.SchemeGroupVersion.WithResource("controllerconfigs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Machineconfiguration().V1().ControllerConfigs().Informer()}, nil + case v1.SchemeGroupVersion.WithResource("internalreleaseimages"): + return &genericInformer{resource: resource.GroupResource(), informer: f.Machineconfiguration().V1().InternalReleaseImages().Informer()}, nil case v1.SchemeGroupVersion.WithResource("kubeletconfigs"): return &genericInformer{resource: resource.GroupResource(), informer: f.Machineconfiguration().V1().KubeletConfigs().Informer()}, nil case v1.SchemeGroupVersion.WithResource("machineconfigs"): diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/interface.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/interface.go index c947034b69..9638a47ffe 100644 --- a/machineconfiguration/informers/externalversions/machineconfiguration/v1/interface.go +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/interface.go @@ -12,6 +12,8 @@ type Interface interface { ContainerRuntimeConfigs() ContainerRuntimeConfigInformer // ControllerConfigs returns a ControllerConfigInformer. ControllerConfigs() ControllerConfigInformer + // InternalReleaseImages returns a InternalReleaseImageInformer. + InternalReleaseImages() InternalReleaseImageInformer // KubeletConfigs returns a KubeletConfigInformer. KubeletConfigs() KubeletConfigInformer // MachineConfigs returns a MachineConfigInformer. @@ -51,6 +53,11 @@ func (v *version) ControllerConfigs() ControllerConfigInformer { return &controllerConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} } +// InternalReleaseImages returns a InternalReleaseImageInformer. +func (v *version) InternalReleaseImages() InternalReleaseImageInformer { + return &internalReleaseImageInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} +} + // KubeletConfigs returns a KubeletConfigInformer. func (v *version) KubeletConfigs() KubeletConfigInformer { return &kubeletConfigInformer{factory: v.factory, tweakListOptions: v.tweakListOptions} diff --git a/machineconfiguration/informers/externalversions/machineconfiguration/v1/internalreleaseimage.go b/machineconfiguration/informers/externalversions/machineconfiguration/v1/internalreleaseimage.go new file mode 100644 index 0000000000..0316261249 --- /dev/null +++ b/machineconfiguration/informers/externalversions/machineconfiguration/v1/internalreleaseimage.go @@ -0,0 +1,85 @@ +// Code generated by informer-gen. DO NOT EDIT. + +package v1 + +import ( + context "context" + time "time" + + apimachineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + versioned "github.com/openshift/client-go/machineconfiguration/clientset/versioned" + internalinterfaces "github.com/openshift/client-go/machineconfiguration/informers/externalversions/internalinterfaces" + machineconfigurationv1 "github.com/openshift/client-go/machineconfiguration/listers/machineconfiguration/v1" + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" + runtime "k8s.io/apimachinery/pkg/runtime" + watch "k8s.io/apimachinery/pkg/watch" + cache "k8s.io/client-go/tools/cache" +) + +// InternalReleaseImageInformer provides access to a shared informer and lister for +// InternalReleaseImages. +type InternalReleaseImageInformer interface { + Informer() cache.SharedIndexInformer + Lister() machineconfigurationv1.InternalReleaseImageLister +} + +type internalReleaseImageInformer struct { + factory internalinterfaces.SharedInformerFactory + tweakListOptions internalinterfaces.TweakListOptionsFunc +} + +// NewInternalReleaseImageInformer constructs a new informer for InternalReleaseImage type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewInternalReleaseImageInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers) cache.SharedIndexInformer { + return NewFilteredInternalReleaseImageInformer(client, resyncPeriod, indexers, nil) +} + +// NewFilteredInternalReleaseImageInformer constructs a new informer for InternalReleaseImage type. +// Always prefer using an informer factory to get a shared informer instead of getting an independent +// one. This reduces memory footprint and number of connections to the server. +func NewFilteredInternalReleaseImageInformer(client versioned.Interface, resyncPeriod time.Duration, indexers cache.Indexers, tweakListOptions internalinterfaces.TweakListOptionsFunc) cache.SharedIndexInformer { + return cache.NewSharedIndexInformer( + cache.ToListWatcherWithWatchListSemantics(&cache.ListWatch{ + ListFunc: func(options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.MachineconfigurationV1().InternalReleaseImages().List(context.Background(), options) + }, + WatchFunc: func(options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.MachineconfigurationV1().InternalReleaseImages().Watch(context.Background(), options) + }, + ListWithContextFunc: func(ctx context.Context, options metav1.ListOptions) (runtime.Object, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.MachineconfigurationV1().InternalReleaseImages().List(ctx, options) + }, + WatchFuncWithContext: func(ctx context.Context, options metav1.ListOptions) (watch.Interface, error) { + if tweakListOptions != nil { + tweakListOptions(&options) + } + return client.MachineconfigurationV1().InternalReleaseImages().Watch(ctx, options) + }, + }, client), + &apimachineconfigurationv1.InternalReleaseImage{}, + resyncPeriod, + indexers, + ) +} + +func (f *internalReleaseImageInformer) defaultInformer(client versioned.Interface, resyncPeriod time.Duration) cache.SharedIndexInformer { + return NewFilteredInternalReleaseImageInformer(client, resyncPeriod, cache.Indexers{cache.NamespaceIndex: cache.MetaNamespaceIndexFunc}, f.tweakListOptions) +} + +func (f *internalReleaseImageInformer) Informer() cache.SharedIndexInformer { + return f.factory.InformerFor(&apimachineconfigurationv1.InternalReleaseImage{}, f.defaultInformer) +} + +func (f *internalReleaseImageInformer) Lister() machineconfigurationv1.InternalReleaseImageLister { + return machineconfigurationv1.NewInternalReleaseImageLister(f.Informer().GetIndexer()) +} diff --git a/machineconfiguration/listers/machineconfiguration/v1/expansion_generated.go b/machineconfiguration/listers/machineconfiguration/v1/expansion_generated.go index e3489b5515..39cd1db0e7 100644 --- a/machineconfiguration/listers/machineconfiguration/v1/expansion_generated.go +++ b/machineconfiguration/listers/machineconfiguration/v1/expansion_generated.go @@ -10,6 +10,10 @@ type ContainerRuntimeConfigListerExpansion interface{} // ControllerConfigLister. type ControllerConfigListerExpansion interface{} +// InternalReleaseImageListerExpansion allows custom methods to be added to +// InternalReleaseImageLister. +type InternalReleaseImageListerExpansion interface{} + // KubeletConfigListerExpansion allows custom methods to be added to // KubeletConfigLister. type KubeletConfigListerExpansion interface{} diff --git a/machineconfiguration/listers/machineconfiguration/v1/internalreleaseimage.go b/machineconfiguration/listers/machineconfiguration/v1/internalreleaseimage.go new file mode 100644 index 0000000000..69e48052e3 --- /dev/null +++ b/machineconfiguration/listers/machineconfiguration/v1/internalreleaseimage.go @@ -0,0 +1,32 @@ +// Code generated by lister-gen. DO NOT EDIT. + +package v1 + +import ( + machineconfigurationv1 "github.com/openshift/api/machineconfiguration/v1" + labels "k8s.io/apimachinery/pkg/labels" + listers "k8s.io/client-go/listers" + cache "k8s.io/client-go/tools/cache" +) + +// InternalReleaseImageLister helps list InternalReleaseImages. +// All objects returned here must be treated as read-only. +type InternalReleaseImageLister interface { + // List lists all InternalReleaseImages in the indexer. + // Objects returned here must be treated as read-only. + List(selector labels.Selector) (ret []*machineconfigurationv1.InternalReleaseImage, err error) + // Get retrieves the InternalReleaseImage from the index for a given name. + // Objects returned here must be treated as read-only. + Get(name string) (*machineconfigurationv1.InternalReleaseImage, error) + InternalReleaseImageListerExpansion +} + +// internalReleaseImageLister implements the InternalReleaseImageLister interface. +type internalReleaseImageLister struct { + listers.ResourceIndexer[*machineconfigurationv1.InternalReleaseImage] +} + +// NewInternalReleaseImageLister returns a new InternalReleaseImageLister. +func NewInternalReleaseImageLister(indexer cache.Indexer) InternalReleaseImageLister { + return &internalReleaseImageLister{listers.New[*machineconfigurationv1.InternalReleaseImage](indexer, machineconfigurationv1.Resource("internalreleaseimage"))} +} diff --git a/vendor/github.com/openshift/api/apps/.codegen.yaml b/vendor/github.com/openshift/api/apps/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/apps/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/authorization/.codegen.yaml b/vendor/github.com/openshift/api/authorization/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/authorization/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/build/.codegen.yaml b/vendor/github.com/openshift/api/build/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/build/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml b/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml index e69de29bb2..f7a37129a0 100644 --- a/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml +++ b/vendor/github.com/openshift/api/cloudnetwork/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/config/v1/types_network.go b/vendor/github.com/openshift/api/config/v1/types_network.go index 5e2eb93372..80b022de9f 100644 --- a/vendor/github.com/openshift/api/config/v1/types_network.go +++ b/vendor/github.com/openshift/api/config/v1/types_network.go @@ -331,6 +331,9 @@ type NetworkObservabilitySpec struct { // Valid values are "InstallAndEnable" and "NoAction". // When set to "InstallAndEnable", ensure that network observability will be installed and enabled on the cluster. If already installed, no action taken, but if it gets uninstalled, it will install it again. // When set to "NoAction", nothing will be done regarding Network observability. + // During the installation of NetworkObservability, the platform checks for any existing manual installations. + // If a successful installation using the OLMv0 or OLMv1 API is detected, it will be used. + // If the platform cannot determine how the current version was installed, or if the existing installation is incomplete, the installation process will stop. // +required InstallationPolicy NetworkObservabilityInstallationPolicy `json:"installationPolicy,omitempty"` } diff --git a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go index b321d3d7e1..e853db9793 100644 --- a/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1/zz_generated.swagger_doc_generated.go @@ -2645,7 +2645,7 @@ func (NetworkMigration) SwaggerDoc() map[string]string { var map_NetworkObservabilitySpec = map[string]string{ "": "NetworkObservabilitySpec defines the configuration for network observability installation", - "installationPolicy": "installationPolicy controls whether network observability is installed during cluster deployment. Valid values are \"InstallAndEnable\" and \"NoAction\". When set to \"InstallAndEnable\", ensure that network observability will be installed and enabled on the cluster. If already installed, no action taken, but if it gets uninstalled, it will install it again. When set to \"NoAction\", nothing will be done regarding Network observability.", + "installationPolicy": "installationPolicy controls whether network observability is installed during cluster deployment. Valid values are \"InstallAndEnable\" and \"NoAction\". When set to \"InstallAndEnable\", ensure that network observability will be installed and enabled on the cluster. If already installed, no action taken, but if it gets uninstalled, it will install it again. When set to \"NoAction\", nothing will be done regarding Network observability. During the installation of NetworkObservability, the platform checks for any existing manual installations. If a successful installation using the OLMv0 or OLMv1 API is detected, it will be used. If the platform cannot determine how the current version was installed, or if the existing installation is incomplete, the installation process will stop.", } func (NetworkObservabilitySpec) SwaggerDoc() map[string]string { diff --git a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go index ca2f0216a9..d4846fd1cd 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/types_cluster_monitoring.go @@ -1552,7 +1552,7 @@ type RemoteWriteSpec struct { Name string `json:"name,omitempty"` // authorization defines the authorization method for the remote write endpoint. // When omitted, no authorization is performed. - // When set, type must be one of BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). + // When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config). // +optional AuthorizationConfig RemoteWriteAuthorization `json:"authorization,omitzero"` // headers specifies the custom HTTP headers to be sent along with each remote write request. @@ -1654,39 +1654,49 @@ type BasicAuth struct { } // RemoteWriteAuthorizationType defines the authorization method for remote write endpoints. -// +kubebuilder:validation:Enum=BearerToken;BasicAuth;OAuth2;SigV4;SafeAuthorization;ServiceAccount +// +kubebuilder:validation:Enum=Authorization;BasicAuth;OAuth2;SigV4;ServiceAccount type RemoteWriteAuthorizationType string const ( - // RemoteWriteAuthorizationTypeBearerToken indicates bearer token from a secret. - RemoteWriteAuthorizationTypeBearerToken RemoteWriteAuthorizationType = "BearerToken" + // RemoteWriteAuthorizationTypeAuthorization indicates authorization credentials from a secret. + // The secret key contains the credentials (e.g. a Bearer token). Use the authorization field. + RemoteWriteAuthorizationTypeAuthorization RemoteWriteAuthorizationType = "Authorization" // RemoteWriteAuthorizationTypeBasicAuth indicates HTTP basic authentication. RemoteWriteAuthorizationTypeBasicAuth RemoteWriteAuthorizationType = "BasicAuth" // RemoteWriteAuthorizationTypeOAuth2 indicates OAuth2 client credentials. RemoteWriteAuthorizationTypeOAuth2 RemoteWriteAuthorizationType = "OAuth2" // RemoteWriteAuthorizationTypeSigV4 indicates AWS Signature Version 4. RemoteWriteAuthorizationTypeSigV4 RemoteWriteAuthorizationType = "SigV4" - // RemoteWriteAuthorizationTypeSafeAuthorization indicates authorization from a secret (Prometheus SafeAuthorization pattern). - // The secret key contains the credentials (e.g. a Bearer token). Use the safeAuthorization field. - RemoteWriteAuthorizationTypeSafeAuthorization RemoteWriteAuthorizationType = "SafeAuthorization" // RemoteWriteAuthorizationTypeServiceAccount indicates use of the pod's service account token for machine identity. // No additional field is required; the operator configures the token path. RemoteWriteAuthorizationTypeServiceAccount RemoteWriteAuthorizationType = "ServiceAccount" + + // --- TOMBSTONE --- + // RemoteWriteAuthorizationTypeBearerToken was a constant for bearer token authentication from a secret. + // It has been removed in favor of RemoteWriteAuthorizationTypeAuthorization. The constant name is reserved to prevent reuse. + // + // RemoteWriteAuthorizationTypeBearerToken RemoteWriteAuthorizationType = "BearerToken" + + // --- TOMBSTONE --- + // RemoteWriteAuthorizationTypeSafeAuthorization was a constant for authorization credentials from a secret (Prometheus SafeAuthorization pattern). + // It has been removed in favor of RemoteWriteAuthorizationTypeAuthorization. The constant name is reserved to prevent reuse. + // + // RemoteWriteAuthorizationTypeSafeAuthorization RemoteWriteAuthorizationType = "SafeAuthorization" ) // RemoteWriteAuthorization defines the authorization method for a remote write endpoint. -// Exactly one of the nested configs must be set according to the type discriminator. -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'BearerToken' ? has(self.bearerToken) : !has(self.bearerToken)",message="bearerToken is required when type is BearerToken, and forbidden otherwise" +// Nested config requirements depend on the type discriminator: Authorization requires authorization, +// BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs. +// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'Authorization' ? has(self.authorization) : !has(self.authorization)",message="authorization is required when type is Authorization, and forbidden otherwise" // +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'BasicAuth' ? has(self.basicAuth) : !has(self.basicAuth)",message="basicAuth is required when type is BasicAuth, and forbidden otherwise" // +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'OAuth2' ? has(self.oauth2) : !has(self.oauth2)",message="oauth2 is required when type is OAuth2, and forbidden otherwise" // +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'SigV4' ? has(self.sigv4) : !has(self.sigv4)",message="sigv4 is required when type is SigV4, and forbidden otherwise" -// +kubebuilder:validation:XValidation:rule="has(self.type) && self.type == 'SafeAuthorization' ? has(self.safeAuthorization) : !has(self.safeAuthorization)",message="safeAuthorization is required when type is SafeAuthorization, and forbidden otherwise" // +union type RemoteWriteAuthorization struct { // type specifies the authorization method to use. - // Allowed values are BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, ServiceAccount. + // Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount. // - // When set to BearerToken, the bearer token is read from a Secret referenced by the bearerToken field. + // When set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field. // // When set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set. // @@ -1694,22 +1704,16 @@ type RemoteWriteAuthorization struct { // // When set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set. // - // When set to SafeAuthorization, credentials are read from a single Secret key (Prometheus SafeAuthorization pattern). The secret key typically contains a Bearer token. Use the safeAuthorization field. - // // When set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path. // +unionDiscriminator // +required Type RemoteWriteAuthorizationType `json:"type,omitempty"` - // safeAuthorization defines the secret reference containing the credentials for authentication (e.g. Bearer token). - // Required when type is "SafeAuthorization", and forbidden otherwise. Maps to Prometheus SafeAuthorization. The secret must exist in the openshift-monitoring namespace. - // +unionMember - // +optional - SafeAuthorization *v1.SecretKeySelector `json:"safeAuthorization,omitempty"` - // bearerToken defines the secret reference containing the bearer token. - // Required when type is "BearerToken", and forbidden otherwise. - // +unionMember + // authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). + // Required when type is "Authorization", and forbidden otherwise. + // The secret must exist in the openshift-monitoring namespace. + // +unionMember=Authorization // +optional - BearerToken SecretKeySelector `json:"bearerToken,omitempty,omitzero"` + Authorization SecretKeySelector `json:"authorization,omitempty,omitzero"` // basicAuth defines HTTP basic authentication credentials. // Required when type is "BasicAuth", and forbidden otherwise. // +unionMember @@ -1725,6 +1729,22 @@ type RemoteWriteAuthorization struct { // +unionMember // +optional Sigv4 Sigv4 `json:"sigv4,omitempty,omitzero"` + + // --- TOMBSTONE --- + // bearerToken was a field for bearer token authentication from a secret. + // It has been removed in favor of authorization. The field name is reserved to prevent reuse. + // + // +unionMember + // +optional + // BearerToken SecretKeySelector `json:"bearerToken,omitempty,omitzero"` + + // --- TOMBSTONE --- + // safeAuthorization was a field for authorization credentials from a secret (Prometheus SafeAuthorization pattern). + // It has been removed in favor of authorization. The field name is reserved to prevent reuse. + // + // +unionMember + // +optional + // SafeAuthorization *v1.SecretKeySelector `json:"safeAuthorization,omitempty"` } // MetadataConfigSendPolicy defines whether to send metadata with platform defaults or with custom settings. diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go index 7313338a3b..12dd0cd312 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.deepcopy.go @@ -1755,12 +1755,7 @@ func (in *RelabelConfig) DeepCopy() *RelabelConfig { // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *RemoteWriteAuthorization) DeepCopyInto(out *RemoteWriteAuthorization) { *out = *in - if in.SafeAuthorization != nil { - in, out := &in.SafeAuthorization, &out.SafeAuthorization - *out = new(v1.SecretKeySelector) - (*in).DeepCopyInto(*out) - } - out.BearerToken = in.BearerToken + out.Authorization = in.Authorization out.BasicAuth = in.BasicAuth in.OAuth2.DeepCopyInto(&out.OAuth2) out.Sigv4 = in.Sigv4 diff --git a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go index 2194d79def..8f6cda1915 100644 --- a/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/config/v1alpha1/zz_generated.swagger_doc_generated.go @@ -619,13 +619,12 @@ func (RelabelConfig) SwaggerDoc() map[string]string { } var map_RemoteWriteAuthorization = map[string]string{ - "": "RemoteWriteAuthorization defines the authorization method for a remote write endpoint. Exactly one of the nested configs must be set according to the type discriminator.", - "type": "type specifies the authorization method to use. Allowed values are BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, ServiceAccount.\n\nWhen set to BearerToken, the bearer token is read from a Secret referenced by the bearerToken field.\n\nWhen set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set.\n\nWhen set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set.\n\nWhen set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set.\n\nWhen set to SafeAuthorization, credentials are read from a single Secret key (Prometheus SafeAuthorization pattern). The secret key typically contains a Bearer token. Use the safeAuthorization field.\n\nWhen set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path.", - "safeAuthorization": "safeAuthorization defines the secret reference containing the credentials for authentication (e.g. Bearer token). Required when type is \"SafeAuthorization\", and forbidden otherwise. Maps to Prometheus SafeAuthorization. The secret must exist in the openshift-monitoring namespace.", - "bearerToken": "bearerToken defines the secret reference containing the bearer token. Required when type is \"BearerToken\", and forbidden otherwise.", - "basicAuth": "basicAuth defines HTTP basic authentication credentials. Required when type is \"BasicAuth\", and forbidden otherwise.", - "oauth2": "oauth2 defines OAuth2 client credentials authentication. Required when type is \"OAuth2\", and forbidden otherwise.", - "sigv4": "sigv4 defines AWS Signature Version 4 authentication. Required when type is \"SigV4\", and forbidden otherwise.", + "": "RemoteWriteAuthorization defines the authorization method for a remote write endpoint. Nested config requirements depend on the type discriminator: Authorization requires authorization, BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs.", + "type": "type specifies the authorization method to use. Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount.\n\nWhen set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field.\n\nWhen set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set.\n\nWhen set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set.\n\nWhen set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set.\n\nWhen set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path.", + "authorization": "authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). Required when type is \"Authorization\", and forbidden otherwise. The secret must exist in the openshift-monitoring namespace.", + "basicAuth": "basicAuth defines HTTP basic authentication credentials. Required when type is \"BasicAuth\", and forbidden otherwise.", + "oauth2": "oauth2 defines OAuth2 client credentials authentication. Required when type is \"OAuth2\", and forbidden otherwise.", + "sigv4": "sigv4 defines AWS Signature Version 4 authentication. Required when type is \"SigV4\", and forbidden otherwise.", } func (RemoteWriteAuthorization) SwaggerDoc() map[string]string { @@ -636,7 +635,7 @@ var map_RemoteWriteSpec = map[string]string{ "": "RemoteWriteSpec represents configuration for remote write endpoints.", "url": "url is the URL of the remote write endpoint. Must be a valid URL with http or https scheme and a non-empty hostname. Query parameters, fragments, and user information (e.g. user:password@host) are not allowed. Empty string is invalid. Must be between 1 and 2048 characters in length.", "name": "name is a required identifier for this remote write configuration (name is the list key for the remoteWrite list). This name is used in metrics and logging to differentiate remote write queues. Must contain only alphanumeric characters, hyphens, and underscores. Must be between 1 and 63 characters in length.", - "authorization": "authorization defines the authorization method for the remote write endpoint. When omitted, no authorization is performed. When set, type must be one of BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config).", + "authorization": "authorization defines the authorization method for the remote write endpoint. When omitted, no authorization is performed. When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config).", "headers": "headers specifies the custom HTTP headers to be sent along with each remote write request. Sending custom headers makes the configuration of a proxy in between optional and helps the receiver recognize the given source better. Clients MAY allow users to send custom HTTP headers; they MUST NOT allow users to configure them in such a way as to send reserved headers. Headers set by Prometheus cannot be overwritten. When omitted, no custom headers are sent. Maximum of 50 headers can be specified. Each header name must be unique. Each header name must contain only alphanumeric characters, hyphens, and underscores, and must not be a reserved Prometheus header (Host, Authorization, Content-Encoding, Content-Type, X-Prometheus-Remote-Write-Version, User-Agent, Connection, Keep-Alive, Proxy-Authenticate, Proxy-Authorization, WWW-Authenticate).", "metadataConfig": "metadataConfig configures the sending of series metadata to remote storage. When omitted, no metadata is sent. When set to sendPolicy: Default, metadata is sent using platform-chosen defaults (e.g. send interval 30 seconds). When set to sendPolicy: Custom, metadata is sent using the settings in the custom field (e.g. custom.sendIntervalSeconds).", "proxyUrl": "proxyUrl defines an optional proxy URL. If the cluster-wide proxy is enabled, it replaces the proxyUrl setting. The cluster-wide proxy supports both HTTP and HTTPS proxies, with HTTPS taking precedence. When omitted, no proxy is used. Must be a valid URL with http or https scheme. Must be between 1 and 2048 characters in length.", diff --git a/vendor/github.com/openshift/api/features.md b/vendor/github.com/openshift/api/features.md index 2959484d4e..43c2d694b0 100644 --- a/vendor/github.com/openshift/api/features.md +++ b/vendor/github.com/openshift/api/features.md @@ -10,6 +10,7 @@ | MachineAPIOperatorDisableMachineHealthCheckController| | | | | | | | | | MultiArchInstallAzure| | | | | | | | | | ShortCertRotation| | | | | | | | | +| KarpenterOperator| | | | Enabled | | | | | | MutableTopology| | | | Enabled | | | | | | ClusterAPIComputeInstall| | | Enabled | Enabled | | | | | | ClusterAPIControlPlaneInstall| | | Enabled | Enabled | | | | | @@ -66,6 +67,7 @@ | HyperShiftOnlyDynamicResourceAllocation| Enabled | | Enabled | | Enabled | | Enabled | | | ImageModeStatusReporting| | | Enabled | Enabled | | | Enabled | Enabled | | IngressControllerDynamicConfigurationManager| | | Enabled | Enabled | | | Enabled | Enabled | +| IngressControllerMultipleHAProxyVersions| | | Enabled | Enabled | | | Enabled | Enabled | | IrreconcilableMachineConfig| | | Enabled | Enabled | | | Enabled | Enabled | | KMSEncryption| | | Enabled | Enabled | | | Enabled | Enabled | | MachineAPIMigration| | | Enabled | Enabled | | | Enabled | Enabled | @@ -88,12 +90,11 @@ | TLSAdherence| | | Enabled | Enabled | | | Enabled | Enabled | | TLSGroupPreferences| | | Enabled | Enabled | | | Enabled | Enabled | | VSphereConfigurableMaxAllowedBlockVolumesPerNode| | | Enabled | Enabled | | | Enabled | Enabled | -| VSphereMixedNodeEnv| | | Enabled | Enabled | | | Enabled | Enabled | | VSphereMultiVCenterDay2| | | Enabled | Enabled | | | Enabled | Enabled | | VolumeGroupSnapshot| | | Enabled | Enabled | | | Enabled | Enabled | -| AWSServiceLBNetworkSecurityGroup| | Enabled | Enabled | Enabled | | Enabled | Enabled | Enabled | | OSStreams| | Enabled | Enabled | Enabled | | Enabled | Enabled | Enabled | | AWSClusterHostedDNSInstall| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| AWSServiceLBNetworkSecurityGroup| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AzureClusterHostedDNSInstall| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | AzureWorkloadIdentity| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | BootImageSkewEnforcement| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | @@ -120,5 +121,6 @@ | StoragePerformantSecurityPolicy| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | UpgradeStatus| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereHostVMGroupZonal| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | +| VSphereMixedNodeEnv| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereMultiDisk| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | | VSphereMultiNetworks| Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | Enabled | diff --git a/vendor/github.com/openshift/api/image/.codegen.yaml b/vendor/github.com/openshift/api/image/.codegen.yaml index ffa2c8d9b2..a2d9bd2000 100644 --- a/vendor/github.com/openshift/api/image/.codegen.yaml +++ b/vendor/github.com/openshift/api/image/.codegen.yaml @@ -1,2 +1,7 @@ swaggerdocs: commentPolicy: Warn +protobuf: + disabled: false + disabledVersions: + - "1.0" + - pre012 diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/register.go b/vendor/github.com/openshift/api/machineconfiguration/v1/register.go index d52f6480e8..1a7252834b 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/register.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/register.go @@ -28,6 +28,8 @@ func addKnownTypes(scheme *runtime.Scheme) error { &ContainerRuntimeConfigList{}, &ControllerConfig{}, &ControllerConfigList{}, + &InternalReleaseImage{}, + &InternalReleaseImageList{}, &KubeletConfig{}, &KubeletConfigList{}, &MachineConfig{}, diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/types_internalreleaseimage.go b/vendor/github.com/openshift/api/machineconfiguration/v1/types_internalreleaseimage.go new file mode 100644 index 0000000000..261d313337 --- /dev/null +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/types_internalreleaseimage.go @@ -0,0 +1,159 @@ +package v1 + +import ( + metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" +) + +// +genclient +// +genclient:nonNamespaced +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object +// +kubebuilder:object:root=true +// +kubebuilder:resource:path=internalreleaseimages,scope=Cluster +// +kubebuilder:subresource:status +// +openshift:api-approved.openshift.io=https://github.com/openshift/api/pull/2510 +// +openshift:file-pattern=cvoRunLevel=0000_80,operatorName=machine-config,operatorOrdering=01 +// +openshift:enable:FeatureGate=NoRegistryClusterInstall +// +kubebuilder:metadata:labels=openshift.io/operator-managed= +// +kubebuilder:validation:XValidation:rule="self.metadata.name == 'cluster'",message="internalreleaseimage is a singleton, .metadata.name must be 'cluster'" + +// InternalReleaseImage is used to keep track and manage a set +// of release bundles (OCP and OLM operators images) that are stored +// into the control planes nodes. +// This is a singleton resource with 'cluster' as the only valid name. +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type InternalReleaseImage struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard object's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + // +required + metav1.ObjectMeta `json:"metadata,omitempty"` + + // spec describes the configuration of this internal release image. + // +required + Spec InternalReleaseImageSpec `json:"spec,omitzero"` + + // status describes the last observed state of this internal release image. + // +optional + Status InternalReleaseImageStatus `json:"status,omitzero"` +} + +// InternalReleaseImageSpec defines the desired state of a InternalReleaseImage. +type InternalReleaseImageSpec struct { + // releases is a list of release bundle identifiers that the user wants to + // add/remove to/from the control plane nodes. + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 16 entries. + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=16 + // +listType=map + // +listMapKey=name + // +required + Releases []InternalReleaseImageRef `json:"releases,omitempty"` +} + +// InternalReleaseImageRef is used to provide a simple reference for a release +// bundle. Currently it contains only the name field. +type InternalReleaseImageRef struct { + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. + // +required + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=64 + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" + Name string `json:"name,omitempty"` +} + +// InternalReleaseImageStatus describes the current state of a InternalReleaseImage. +type InternalReleaseImageStatus struct { + // conditions represent the observations of the InternalReleaseImage controller current state. + // Valid types are: Degraded. + // If Degraded is true, that means something has gone wrong in the controller. + // The conditions list must contain at most 5 entries. + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=5 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + // releases is a list of the release bundles currently owned and managed by the + // cluster. + // A release bundle content could be safely pulled only when its Conditions field + // contains at least an Available entry set to "True" and Degraded to "False". + // Entries must be unique, keyed on the name field. + // releases must contain at least one entry and must not exceed 32 entries. + // +listType=map + // +listMapKey=name + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=32 + // +required + Releases []InternalReleaseImageBundleStatus `json:"releases,omitempty"` +} + +// InternalReleaseImageStatusConditionType describes the possible states for InternalReleaseImageStatus. +// +enum +type InternalReleaseImageStatusConditionType string + +const ( + // InternalReleaseImageStatusConditionTypeDegraded describes a failure in the controller. + InternalReleaseImageStatusConditionTypeDegraded InternalReleaseImageStatusConditionType = "Degraded" +) + +// InternalReleaseImageBundleStatus describes the observed state of a single release bundle managed by the cluster. +type InternalReleaseImageBundleStatus struct { + // conditions represent the observations of an internal release image current state. Valid types are: + // Mounted, Installing, Available, Removing and Degraded. + // + // If Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. + // If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. + // If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. + // If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. + // If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes). + // + // In general, after installing a new release bundle, it is required to wait for the Conditions "Available" to become "True" (and all + // the other conditions to be equal to "False") before being able to pull its content. + // When present, conditions must contain at least 1 entry and must not exceed 5 entries. + // + // +listType=map + // +listMapKey=type + // +kubebuilder:validation:MinItems=1 + // +kubebuilder:validation:MaxItems=5 + // +optional + Conditions []metav1.Condition `json:"conditions,omitempty"` + // name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. + // The expected name format is ocp-release-bundle--. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=64 + // +kubebuilder:validation:XValidation:rule=`self.matches('^ocp-release-bundle-[0-9]+\\.[0-9]+\\.[0-9]+-[A-Za-z0-9._-]+$')`,message="must be ocp-release-bundle-- and <= 64 chars" + // +required + Name string `json:"name,omitempty"` + // image is an OCP release image referenced by digest. + // The format of the image pull spec is: host[:port][/namespace]/name@sha256:, + // where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. + // The length of the whole spec must be between 1 to 447 characters. + // The field is optional, and it will be provided after a release has been successfully installed. + // +kubebuilder:validation:MinLength=1 + // +kubebuilder:validation:MaxLength=447 + // +kubebuilder:validation:XValidation:rule=`(self.split('@').size() == 2 && self.split('@')[1].matches('^sha256:[a-f0-9]{64}$'))`,message="the OCI Image reference must end with a valid '@sha256:' suffix, where '' is 64 characters long" + // +kubebuilder:validation:XValidation:rule=`(self.split('@')[0].matches('^([a-zA-Z0-9-]+\\.)+[a-zA-Z0-9-]+(:[0-9]{2,5})?/([a-zA-Z0-9-_]{0,61}/)?[a-zA-Z0-9-_.]*?$'))`,message="the OCI Image name should follow the host[:port][/namespace]/name format, resembling a valid URL without the scheme" + // +optional + Image string `json:"image,omitempty"` +} + +// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object + +// InternalReleaseImageList is a list of InternalReleaseImage resources +// +// Compatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer). +// +openshift:compatibility-gen:level=1 +type InternalReleaseImageList struct { + metav1.TypeMeta `json:",inline"` + + // metadata is the standard list's metadata. + // More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata + metav1.ListMeta `json:"metadata"` + + Items []InternalReleaseImage `json:"items"` +} diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go index 9b738f8622..4a69ea1e9d 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.deepcopy.go @@ -510,6 +510,157 @@ func (in *ImageSecretObjectReference) DeepCopy() *ImageSecretObjectReference { return out } +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImage) DeepCopyInto(out *InternalReleaseImage) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ObjectMeta.DeepCopyInto(&out.ObjectMeta) + in.Spec.DeepCopyInto(&out.Spec) + in.Status.DeepCopyInto(&out.Status) + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImage. +func (in *InternalReleaseImage) DeepCopy() *InternalReleaseImage { + if in == nil { + return nil + } + out := new(InternalReleaseImage) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InternalReleaseImage) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageBundleStatus) DeepCopyInto(out *InternalReleaseImageBundleStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageBundleStatus. +func (in *InternalReleaseImageBundleStatus) DeepCopy() *InternalReleaseImageBundleStatus { + if in == nil { + return nil + } + out := new(InternalReleaseImageBundleStatus) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageList) DeepCopyInto(out *InternalReleaseImageList) { + *out = *in + out.TypeMeta = in.TypeMeta + in.ListMeta.DeepCopyInto(&out.ListMeta) + if in.Items != nil { + in, out := &in.Items, &out.Items + *out = make([]InternalReleaseImage, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageList. +func (in *InternalReleaseImageList) DeepCopy() *InternalReleaseImageList { + if in == nil { + return nil + } + out := new(InternalReleaseImageList) + in.DeepCopyInto(out) + return out +} + +// DeepCopyObject is an autogenerated deepcopy function, copying the receiver, creating a new runtime.Object. +func (in *InternalReleaseImageList) DeepCopyObject() runtime.Object { + if c := in.DeepCopy(); c != nil { + return c + } + return nil +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageRef) DeepCopyInto(out *InternalReleaseImageRef) { + *out = *in + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageRef. +func (in *InternalReleaseImageRef) DeepCopy() *InternalReleaseImageRef { + if in == nil { + return nil + } + out := new(InternalReleaseImageRef) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageSpec) DeepCopyInto(out *InternalReleaseImageSpec) { + *out = *in + if in.Releases != nil { + in, out := &in.Releases, &out.Releases + *out = make([]InternalReleaseImageRef, len(*in)) + copy(*out, *in) + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageSpec. +func (in *InternalReleaseImageSpec) DeepCopy() *InternalReleaseImageSpec { + if in == nil { + return nil + } + out := new(InternalReleaseImageSpec) + in.DeepCopyInto(out) + return out +} + +// DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. +func (in *InternalReleaseImageStatus) DeepCopyInto(out *InternalReleaseImageStatus) { + *out = *in + if in.Conditions != nil { + in, out := &in.Conditions, &out.Conditions + *out = make([]metav1.Condition, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + if in.Releases != nil { + in, out := &in.Releases, &out.Releases + *out = make([]InternalReleaseImageBundleStatus, len(*in)) + for i := range *in { + (*in)[i].DeepCopyInto(&(*out)[i]) + } + } + return +} + +// DeepCopy is an autogenerated deepcopy function, copying the receiver, creating a new InternalReleaseImageStatus. +func (in *InternalReleaseImageStatus) DeepCopy() *InternalReleaseImageStatus { + if in == nil { + return nil + } + out := new(InternalReleaseImageStatus) + in.DeepCopyInto(out) + return out +} + // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *IrreconcilableChangeDiff) DeepCopyInto(out *IrreconcilableChangeDiff) { *out = *in diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml index b22dc29f5d..4baab07508 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.featuregated-crd-manifests.yaml @@ -57,6 +57,30 @@ controllerconfigs.machineconfiguration.openshift.io: TopLevelFeatureGates: [] Version: v1 +internalreleaseimages.machineconfiguration.openshift.io: + Annotations: {} + ApprovedPRNumber: https://github.com/openshift/api/pull/2510 + CRDName: internalreleaseimages.machineconfiguration.openshift.io + Capability: "" + Category: "" + FeatureGates: + - NoRegistryClusterInstall + FilenameOperatorName: machine-config + FilenameOperatorOrdering: "01" + FilenameRunLevel: "0000_80" + GroupName: machineconfiguration.openshift.io + HasStatus: true + KindName: InternalReleaseImage + Labels: + openshift.io/operator-managed: "" + PluralName: internalreleaseimages + PrinterColumns: [] + Scope: Cluster + ShortNames: null + TopLevelFeatureGates: + - NoRegistryClusterInstall + Version: v1 + kubeletconfigs.machineconfiguration.openshift.io: Annotations: {} ApprovedPRNumber: https://github.com/openshift/api/pull/1453 diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.model_name.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.model_name.go index 1315ccb99e..8ee36a9e96 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.model_name.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.model_name.go @@ -95,6 +95,36 @@ func (in ImageSecretObjectReference) OpenAPIModelName() string { return "com.github.openshift.api.machineconfiguration.v1.ImageSecretObjectReference" } +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalReleaseImage) OpenAPIModelName() string { + return "com.github.openshift.api.machineconfiguration.v1.InternalReleaseImage" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalReleaseImageBundleStatus) OpenAPIModelName() string { + return "com.github.openshift.api.machineconfiguration.v1.InternalReleaseImageBundleStatus" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalReleaseImageList) OpenAPIModelName() string { + return "com.github.openshift.api.machineconfiguration.v1.InternalReleaseImageList" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalReleaseImageRef) OpenAPIModelName() string { + return "com.github.openshift.api.machineconfiguration.v1.InternalReleaseImageRef" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalReleaseImageSpec) OpenAPIModelName() string { + return "com.github.openshift.api.machineconfiguration.v1.InternalReleaseImageSpec" +} + +// OpenAPIModelName returns the OpenAPI model name for this type. +func (in InternalReleaseImageStatus) OpenAPIModelName() string { + return "com.github.openshift.api.machineconfiguration.v1.InternalReleaseImageStatus" +} + // OpenAPIModelName returns the OpenAPI model name for this type. func (in IrreconcilableChangeDiff) OpenAPIModelName() string { return "com.github.openshift.api.machineconfiguration.v1.IrreconcilableChangeDiff" diff --git a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go index 7369c02db0..aac65c9acb 100644 --- a/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go +++ b/vendor/github.com/openshift/api/machineconfiguration/v1/zz_generated.swagger_doc_generated.go @@ -410,6 +410,65 @@ func (PoolSynchronizerStatus) SwaggerDoc() map[string]string { return map_PoolSynchronizerStatus } +var map_InternalReleaseImage = map[string]string{ + "": "InternalReleaseImage is used to keep track and manage a set of release bundles (OCP and OLM operators images) that are stored into the control planes nodes. This is a singleton resource with 'cluster' as the only valid name.\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "metadata": "metadata is the standard object's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", + "spec": "spec describes the configuration of this internal release image.", + "status": "status describes the last observed state of this internal release image.", +} + +func (InternalReleaseImage) SwaggerDoc() map[string]string { + return map_InternalReleaseImage +} + +var map_InternalReleaseImageBundleStatus = map[string]string{ + "": "InternalReleaseImageBundleStatus describes the observed state of a single release bundle managed by the cluster.", + "conditions": "conditions represent the observations of an internal release image current state. Valid types are: Mounted, Installing, Available, Removing and Degraded.\n\nIf Mounted is true, that means that a valid ISO has been discovered and mounted on one of the cluster nodes. If Installing is true, that means that a new release bundle is currently being copied on one (or more) cluster nodes, and not yet completed. If Available is true, it means that the release has been previously installed on all the cluster nodes, and it can be used. If Removing is true, it means that a release deletion is in progress on one (or more) cluster nodes, and not yet completed. If Degraded is true, that means something has gone wrong (possibly on one or more cluster nodes).\n\nIn general, after installing a new release bundle, it is required to wait for the Conditions \"Available\" to become \"True\" (and all the other conditions to be equal to \"False\") before being able to pull its content. When present, conditions must contain at least 1 entry and must not exceed 5 entries.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", + "image": "image is an OCP release image referenced by digest. The format of the image pull spec is: host[:port][/namespace]/name@sha256:, where the digest must be 64 characters long, and consist only of lowercase hexadecimal characters, a-f and 0-9. The length of the whole spec must be between 1 to 447 characters. The field is optional, and it will be provided after a release has been successfully installed.", +} + +func (InternalReleaseImageBundleStatus) SwaggerDoc() map[string]string { + return map_InternalReleaseImageBundleStatus +} + +var map_InternalReleaseImageList = map[string]string{ + "": "InternalReleaseImageList is a list of InternalReleaseImage resources\n\nCompatibility level 1: Stable within a major release for a minimum of 12 months or 3 minor releases (whichever is longer).", + "metadata": "metadata is the standard list's metadata. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#metadata", +} + +func (InternalReleaseImageList) SwaggerDoc() map[string]string { + return map_InternalReleaseImageList +} + +var map_InternalReleaseImageRef = map[string]string{ + "": "InternalReleaseImageRef is used to provide a simple reference for a release bundle. Currently it contains only the name field.", + "name": "name indicates the desired release bundle identifier. This field is required and must be between 1 and 64 characters long. The expected name format is ocp-release-bundle--.", +} + +func (InternalReleaseImageRef) SwaggerDoc() map[string]string { + return map_InternalReleaseImageRef +} + +var map_InternalReleaseImageSpec = map[string]string{ + "": "InternalReleaseImageSpec defines the desired state of a InternalReleaseImage.", + "releases": "releases is a list of release bundle identifiers that the user wants to add/remove to/from the control plane nodes. Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 16 entries.", +} + +func (InternalReleaseImageSpec) SwaggerDoc() map[string]string { + return map_InternalReleaseImageSpec +} + +var map_InternalReleaseImageStatus = map[string]string{ + "": "InternalReleaseImageStatus describes the current state of a InternalReleaseImage.", + "conditions": "conditions represent the observations of the InternalReleaseImage controller current state. Valid types are: Degraded. If Degraded is true, that means something has gone wrong in the controller. The conditions list must contain at most 5 entries.", + "releases": "releases is a list of the release bundles currently owned and managed by the cluster. A release bundle content could be safely pulled only when its Conditions field contains at least an Available entry set to \"True\" and Degraded to \"False\". Entries must be unique, keyed on the name field. releases must contain at least one entry and must not exceed 32 entries.", +} + +func (InternalReleaseImageStatus) SwaggerDoc() map[string]string { + return map_InternalReleaseImageStatus +} + var map_IrreconcilableChangeDiff = map[string]string{ "": "IrreconcilableChangeDiff holds an individual diff between the initial install-time MachineConfig and the latest applied one caused by the presence of irreconcilable changes.", "fieldPath": "fieldPath is a required reference to the path in the latest rendered MachineConfig that differs from this nodes configuration. Must not be empty and must not exceed 70 characters in length. Must begin with the prefix 'spec.' and only contain alphanumeric characters, square brackets ('[]'), or dots ('.').", diff --git a/vendor/github.com/openshift/api/network/.codegen.yaml b/vendor/github.com/openshift/api/network/.codegen.yaml index ab56605cdc..e9a0f18976 100644 --- a/vendor/github.com/openshift/api/network/.codegen.yaml +++ b/vendor/github.com/openshift/api/network/.codegen.yaml @@ -1 +1,4 @@ -schemapatch: +protobuf: + disabled: false + disabledVersions: + - v1alpha1 diff --git a/vendor/github.com/openshift/api/networkoperator/.codegen.yaml b/vendor/github.com/openshift/api/networkoperator/.codegen.yaml index ffa2c8d9b2..f10357951b 100644 --- a/vendor/github.com/openshift/api/networkoperator/.codegen.yaml +++ b/vendor/github.com/openshift/api/networkoperator/.codegen.yaml @@ -1,2 +1,4 @@ swaggerdocs: commentPolicy: Warn +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/oauth/.codegen.yaml b/vendor/github.com/openshift/api/oauth/.codegen.yaml index ffa2c8d9b2..f10357951b 100644 --- a/vendor/github.com/openshift/api/oauth/.codegen.yaml +++ b/vendor/github.com/openshift/api/oauth/.codegen.yaml @@ -1,2 +1,4 @@ swaggerdocs: commentPolicy: Warn +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/openapi/openapi.json b/vendor/github.com/openshift/api/openapi/openapi.json index b3a2453c2d..ba5b0ebd89 100644 --- a/vendor/github.com/openshift/api/openapi/openapi.json +++ b/vendor/github.com/openshift/api/openapi/openapi.json @@ -14571,38 +14571,34 @@ } }, "com.github.openshift.api.config.v1alpha1.RemoteWriteAuthorization": { - "description": "RemoteWriteAuthorization defines the authorization method for a remote write endpoint. Exactly one of the nested configs must be set according to the type discriminator.", + "description": "RemoteWriteAuthorization defines the authorization method for a remote write endpoint. Nested config requirements depend on the type discriminator: Authorization requires authorization, BasicAuth requires basicAuth, OAuth2 requires oauth2, SigV4 requires sigv4, and ServiceAccount forbids all nested configs.", "type": "object", "required": [ "type" ], "properties": { + "authorization": { + "description": "authorization defines the secret reference containing the authorization credentials (e.g. Bearer token). Required when type is \"Authorization\", and forbidden otherwise. The secret must exist in the openshift-monitoring namespace.", + "default": {}, + "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.SecretKeySelector" + }, "basicAuth": { "description": "basicAuth defines HTTP basic authentication credentials. Required when type is \"BasicAuth\", and forbidden otherwise.", "default": {}, "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.BasicAuth" }, - "bearerToken": { - "description": "bearerToken defines the secret reference containing the bearer token. Required when type is \"BearerToken\", and forbidden otherwise.", - "default": {}, - "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.SecretKeySelector" - }, "oauth2": { "description": "oauth2 defines OAuth2 client credentials authentication. Required when type is \"OAuth2\", and forbidden otherwise.", "default": {}, "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.OAuth2" }, - "safeAuthorization": { - "description": "safeAuthorization defines the secret reference containing the credentials for authentication (e.g. Bearer token). Required when type is \"SafeAuthorization\", and forbidden otherwise. Maps to Prometheus SafeAuthorization. The secret must exist in the openshift-monitoring namespace.", - "$ref": "#/definitions/io.k8s.api.core.v1.SecretKeySelector" - }, "sigv4": { "description": "sigv4 defines AWS Signature Version 4 authentication. Required when type is \"SigV4\", and forbidden otherwise.", "default": {}, "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.Sigv4" }, "type": { - "description": "type specifies the authorization method to use. Allowed values are BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, ServiceAccount.\n\nWhen set to BearerToken, the bearer token is read from a Secret referenced by the bearerToken field.\n\nWhen set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set.\n\nWhen set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set.\n\nWhen set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set.\n\nWhen set to SafeAuthorization, credentials are read from a single Secret key (Prometheus SafeAuthorization pattern). The secret key typically contains a Bearer token. Use the safeAuthorization field.\n\nWhen set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path.", + "description": "type specifies the authorization method to use. Allowed values are Authorization, BasicAuth, OAuth2, SigV4, and ServiceAccount.\n\nWhen set to Authorization, credentials are read from a single Secret key. The secret key typically contains a Bearer token. Use the authorization field.\n\nWhen set to BasicAuth, HTTP basic authentication is used; the basicAuth field (username and password from Secrets) must be set.\n\nWhen set to OAuth2, OAuth2 client credentials flow is used; the oauth2 field (clientId, clientSecret, tokenUrl) must be set.\n\nWhen set to SigV4, AWS Signature Version 4 is used for authentication; the sigv4 field must be set.\n\nWhen set to ServiceAccount, the pod's service account token is used for machine identity. No additional field is required; the operator configures the token path.", "type": "string" } }, @@ -14610,10 +14606,9 @@ { "discriminator": "type", "fields-to-discriminateBy": { + "authorization": "Authorization", "basicAuth": "BasicAuth", - "bearerToken": "BearerToken", "oauth2": "OAuth2", - "safeAuthorization": "SafeAuthorization", "sigv4": "Sigv4" } } @@ -14628,7 +14623,7 @@ ], "properties": { "authorization": { - "description": "authorization defines the authorization method for the remote write endpoint. When omitted, no authorization is performed. When set, type must be one of BearerToken, BasicAuth, OAuth2, SigV4, SafeAuthorization, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config).", + "description": "authorization defines the authorization method for the remote write endpoint. When omitted, no authorization is performed. When set, type must be one of Authorization, BasicAuth, OAuth2, SigV4, or ServiceAccount; the corresponding nested config must be set (ServiceAccount has no config).", "default": {}, "$ref": "#/definitions/com.github.openshift.api.config.v1alpha1.RemoteWriteAuthorization" }, diff --git a/vendor/github.com/openshift/api/project/.codegen.yaml b/vendor/github.com/openshift/api/project/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/project/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/quota/.codegen.yaml b/vendor/github.com/openshift/api/quota/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/quota/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/route/.codegen.yaml b/vendor/github.com/openshift/api/route/.codegen.yaml index 65cf5d814b..b003a5d6c9 100644 --- a/vendor/github.com/openshift/api/route/.codegen.yaml +++ b/vendor/github.com/openshift/api/route/.codegen.yaml @@ -1,3 +1,5 @@ schemapatch: swaggerdocs: commentPolicy: Warn +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/samples/.codegen.yaml b/vendor/github.com/openshift/api/samples/.codegen.yaml index ffa2c8d9b2..f10357951b 100644 --- a/vendor/github.com/openshift/api/samples/.codegen.yaml +++ b/vendor/github.com/openshift/api/samples/.codegen.yaml @@ -1,2 +1,4 @@ swaggerdocs: commentPolicy: Warn +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/security/.codegen.yaml b/vendor/github.com/openshift/api/security/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/security/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/template/.codegen.yaml b/vendor/github.com/openshift/api/template/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/template/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/github.com/openshift/api/user/.codegen.yaml b/vendor/github.com/openshift/api/user/.codegen.yaml new file mode 100644 index 0000000000..f7a37129a0 --- /dev/null +++ b/vendor/github.com/openshift/api/user/.codegen.yaml @@ -0,0 +1,2 @@ +protobuf: + disabled: false diff --git a/vendor/modules.txt b/vendor/modules.txt index e7af0d047c..8700593c5e 100644 --- a/vendor/modules.txt +++ b/vendor/modules.txt @@ -86,7 +86,7 @@ github.com/modern-go/reflect2 # github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 ## explicit github.com/munnerz/goautoneg -# github.com/openshift/api v0.0.0-20260626094904-39631f42b31b +# github.com/openshift/api v0.0.0-20260702202555-ef71f942ef6c ## explicit; go 1.25.0 github.com/openshift/api github.com/openshift/api/apiextensions