diff --git a/imageregistry/v1/00-crd.yaml b/imageregistry/v1/00-crd.yaml index 9afd80176a9..6cfdc571af6 100644 --- a/imageregistry/v1/00-crd.yaml +++ b/imageregistry/v1/00-crd.yaml @@ -628,15 +628,21 @@ spec: description: httpSecret is the value needed by the registry to secure uploads, generated by default. type: string + logLevel: + description: "logLevel is an intent based logging for an overall component. + \ It does not give fine grained control, but it is a simple way to + manage coarse grained logging choices that operators have to interpret + for their operands. \n Valid values are: \"Normal\", \"Debug\", \"Trace\", + \"TraceAll\". Defaults to \"Normal\"." + type: string + default: Normal logging: - description: logging determines the level of logging enabled in the - registry. + description: logging is deprecated, use logLevel instead. type: integer format: int64 managementState: - description: managementState indicates whether the registry instance - represented by this config instance is under operator management or - not. Valid values are Managed, Unmanaged, and Removed. + description: managementState indicates whether and how the operator + should manage the component type: string pattern: ^(Managed|Unmanaged|Force|Removed)$ nodeSelector: @@ -645,6 +651,19 @@ spec: type: object additionalProperties: type: string + observedConfig: + description: observedConfig holds a sparse config that controller has + observed from the cluster state. It exists in spec because it is + an input to the level for the operator + type: object + nullable: true + x-kubernetes-preserve-unknown-fields: true + operatorLogLevel: + description: operatorLogLevel is an intent based logging for the operator + itself. It does not give fine grained control, but it is a simple + way to manage coarse grained logging choices that operators have to + interpret for themselves. + type: string proxy: description: proxy defines the proxy to be used when calling master api, upstream registries, etc. @@ -981,6 +1000,14 @@ spec: If the operator is Exists, the value should be empty, otherwise just a regular string. type: string + unsupportedConfigOverrides: + description: 'unsupportedConfigOverrides holds a sparse config that + will override any previously set options. It only needs to be the + fields to override it will end up overlaying in the following order: + 1. hardcoded defaults 2. observedConfig 3. unsupportedConfigOverrides' + type: object + nullable: true + x-kubernetes-preserve-unknown-fields: true status: description: ImageRegistryStatus reports image registry operational status. type: object diff --git a/imageregistry/v1/types.go b/imageregistry/v1/types.go index 9992bc12f5a..69be006a26d 100644 --- a/imageregistry/v1/types.go +++ b/imageregistry/v1/types.go @@ -41,6 +41,8 @@ type Config struct { // ImageRegistrySpec defines the specs for the running registry. type ImageRegistrySpec struct { + // operatorSpec allows operator specific configuration to be made. + operatorv1.OperatorSpec `json:",inline"` // managementState indicates whether the registry instance represented // by this config instance is under operator management or not. Valid // values are Managed, Unmanaged, and Removed. @@ -78,8 +80,8 @@ type ImageRegistrySpec struct { Routes []ImageRegistryConfigRoute `json:"routes,omitempty"` // replicas determines the number of registry instances to run. Replicas int32 `json:"replicas"` - // logging determines the level of logging enabled in the registry. - LogLevel int64 `json:"logging"` + // logging is deprecated, use logLevel instead. + Logging int64 `json:"logging"` // resources defines the resource requests+limits for the registry pod. // +optional Resources *corev1.ResourceRequirements `json:"resources,omitempty"` diff --git a/imageregistry/v1/zz_generated.deepcopy.go b/imageregistry/v1/zz_generated.deepcopy.go index a58aa3bc6dc..87074c50c07 100644 --- a/imageregistry/v1/zz_generated.deepcopy.go +++ b/imageregistry/v1/zz_generated.deepcopy.go @@ -463,6 +463,7 @@ func (in *ImageRegistryConfigStorageSwift) DeepCopy() *ImageRegistryConfigStorag // DeepCopyInto is an autogenerated deepcopy function, copying the receiver, writing into out. in must be non-nil. func (in *ImageRegistrySpec) DeepCopyInto(out *ImageRegistrySpec) { *out = *in + in.OperatorSpec.DeepCopyInto(&out.OperatorSpec) out.Proxy = in.Proxy in.Storage.DeepCopyInto(&out.Storage) out.Requests = in.Requests diff --git a/imageregistry/v1/zz_generated.swagger_doc_generated.go b/imageregistry/v1/zz_generated.swagger_doc_generated.go index 5955424e5d6..0084cc3669a 100644 --- a/imageregistry/v1/zz_generated.swagger_doc_generated.go +++ b/imageregistry/v1/zz_generated.swagger_doc_generated.go @@ -180,7 +180,7 @@ var map_ImageRegistrySpec = map[string]string{ "defaultRoute": "defaultRoute indicates whether an external facing route for the registry should be created using the default generated hostname.", "routes": "routes defines additional external facing routes which should be created for the registry.", "replicas": "replicas determines the number of registry instances to run.", - "logging": "logging determines the level of logging enabled in the registry.", + "logging": "logging is deprecated, use logLevel instead.", "resources": "resources defines the resource requests+limits for the registry pod.", "nodeSelector": "nodeSelector defines the node selection constraints for the registry pod.", "tolerations": "tolerations defines the tolerations for the registry pod.",