-
As part of the upgrade process from 0.20 -> 0.25, I first updated the operator version to 0.22. I was trying to use the api-conversion tool to update the CRDs but I ran into this problem.
The kafkarebalances artifact that's there in the cluster is this.... apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
creationTimestamp: "2021-10-26T23:40:45Z"
generation: 1
labels:
app: strimzi
strimzi.io/crd-install: "true"
name: kafkarebalances.kafka.strimzi.io
resourceVersion: "834430152"
uid: 5301c619-a116-441b-8faf-7b90ad712711
spec:
conversion:
strategy: None
group: kafka.strimzi.io
names:
categories:
- strimzi
kind: KafkaRebalance
listKind: KafkaRebalanceList
plural: kafkarebalances
shortNames:
- kr
singular: kafkarebalance
preserveUnknownFields: true
scope: Namespaced
versions:
- additionalPrinterColumns:
- description: The name of the Kafka cluster this resource rebalances
jsonPath: .metadata.labels.strimzi\.io/cluster
name: Cluster
type: string
name: v1alpha1
schema:
openAPIV3Schema:
properties:
spec:
description: The specification of the Kafka rebalance.
properties:
concurrentIntraBrokerPartitionMovements:
description: The upper bound of ongoing partition replica movements
between disks within each broker. Default is 2.
minimum: 0
type: integer
concurrentLeaderMovements:
description: The upper bound of ongoing partition leadership movements.
Default is 1000.
minimum: 0
type: integer
concurrentPartitionMovementsPerBroker:
description: The upper bound of ongoing partition replica movements
going into/out of each broker. Default is 5.
minimum: 0
type: integer
excludedTopics:
description: A regular expression where any matching topics will be
excluded from the calculation of optimization proposals. This expression
will be parsed by the java.util.regex.Pattern class; for more information
on the supported formar consult the documentation for that class.
type: string
goals:
description: A list of goals, ordered by decreasing priority, to use
for generating and executing the rebalance proposal. The supported
goals are available at https://github.com/linkedin/cruise-control#goals.
If an empty goals list is provided, the goals declared in the default.goals
Cruise Control configuration parameter are used.
items:
type: string
type: array
replicaMovementStrategies:
description: A list of strategy class names used to determine the
execution order for the replica movements in the generated optimization
proposal. By default BaseReplicaMovementStrategy is used, which
will execute the replica movements in the order that they were generated.
items:
type: string
type: array
replicationThrottle:
description: The upper bound, in bytes per second, on the bandwidth
used to move replicas. There is no limit by default.
minimum: 0
type: integer
skipHardGoalCheck:
description: Whether to allow the hard goals specified in the Kafka
CR to be skipped in optimization proposal generation. This can be
useful when some of those hard goals are preventing a balance solution
being found. Default is false.
type: boolean
type: object
status:
description: The status of the Kafka rebalance.
properties:
conditions:
description: List of status conditions.
items:
properties:
lastTransitionTime:
description: Last time the condition of a type changed from
one status to another. The required format is 'yyyy-MM-ddTHH:mm:ssZ',
in the UTC time zone.
type: string
message:
description: Human-readable message indicating details about
the condition's last transition.
type: string
reason:
description: The reason for the condition's last transition
(a single word in CamelCase).
type: string
status:
description: The status of the condition, either True, False
or Unknown.
type: string
type:
description: The unique identifier of a condition, used to distinguish
between other conditions in the resource.
type: string
type: object
type: array
observedGeneration:
description: The generation of the CRD that was last reconciled by
the operator.
type: integer
optimizationResult:
description: A JSON object describing the optimization result.
type: object
sessionId:
description: The session identifier for requests to Cruise Control
pertaining to this KafkaRebalance resource. This is used by the
Kafka Rebalance operator to track the status of ongoing rebalancing
operations.
type: string
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
categories:
- strimzi
kind: KafkaRebalance
listKind: KafkaRebalanceList
plural: kafkarebalances
shortNames:
- kr
singular: kafkarebalance
conditions:
- lastTransitionTime: "2021-10-26T23:40:45Z"
message: '[spec.preserveUnknownFields: Invalid value: true: must be false, spec.versions[0].schema.openAPIV3Schema.type:
Required value: must not be empty at the root]'
reason: Violations
status: "True"
type: NonStructuralSchema
- lastTransitionTime: "2021-10-26T23:40:45Z"
message: no conflicts found
reason: NoConflicts
status: "True"
type: NamesAccepted
- lastTransitionTime: "2021-10-26T23:40:45Z"
message: the initial names have been accepted
reason: InitialNamesAccepted
status: "True"
type: Established
storedVersions:
- v1alpha1 The strimzi version as I see from the deployment is Image: quay.io/strimzi/operator:0.21.1 Any insights on what should I do here? Thanks in advance. ::::UPDATE:::: I ran it a second time and saw this,
Every other time after that it was picking up a random CRD and complaining about the same thing. Please advice. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
You need to have the CRDs from 0.22 installed before running the conversion tool. If you want to upgrade from 0.20 or 0.21 to 0.25, it should be possible. But you have to first install the 0.22 CRDs, do the CRD upgrade and then upgrade the operator to 0.25 (including 0.25 CRDs). Or you can simple first upgrade to 0.22, then use the CRD upgrade tool and then upgrade to 0.25. |
Beta Was this translation helpful? Give feedback.
You need to have the CRDs from 0.22 installed before running the conversion tool. If you want to upgrade from 0.20 or 0.21 to 0.25, it should be possible. But you have to first install the 0.22 CRDs, do the CRD upgrade and then upgrade the operator to 0.25 (including 0.25 CRDs). Or you can simple first upgrade to 0.22, then use the CRD upgrade tool and then upgrade to 0.25.