// Module included in the following assemblies:
//
// assembly-upgrade-resources.adoc

[id='proc-upgrade-kafka-bridge-resources-{context}']
= Upgrading Kafka Bridge resources to {ApiVersion}

.Prerequisites

* A Cluster Operator supporting the `{ApiVersion}` API version is up and running.
* The Kafka Bridge is configured and deployed. 
See xref:deploying-kafka-bridge-{context}[].

.Procedure
Perform the following steps for each `KafkaBridge` resource in your deployment.

. Update the `KafkaBridge` custom resource in an editor.
+
[source,shell,subs="+quotes,attributes"]
----
kubectl edit kafkabridge _KAFKA-BRIDGE_
----

. If `type: external` logging is configured in `KafkaBridge.spec.logging`:
+
Replace the `name` of the ConfigMap containing the logging configuration:
+
[source,yaml,subs="attributes+"]
----
logging:
  type: external
  name: my-config-map
----
+
With the `valueFrom.configMapKeyRef` field, and specify both the ConfigMap `name` and the `key` under which the logging is stored:
+
[source,yaml,subs="attributes+"]
----
logging:
  type: external
  valueFrom:
    configMapKeyRef:
      name: my-config-map
      key: log4j2.properties
----

. Update the `apiVersion` of the `KafkaBridge` custom resource to `{ApiVersion}`:
+
Replace:
+
[source,shell,subs="attributes"]
----
apiVersion: {KafkaBridgeApiVersionPrev}
----
+
with:
+
[source,shell,subs="attributes"]
----
apiVersion: {KafkaBridgeApiVersion}
----

. Save the file, exit the editor and wait for the updated custom resource to be reconciled.