此内容没有您所选择的语言版本。
Chapter 2. API concepts
The Streams for Apache Kafka Proxy Operator uses a declarative API based on OpenShift custom resources to manage proxy deployments.
The operator takes custom resources and core OpenShift resources as inputs:
KafkaProxy- Defines an instance of the proxy.
VirtualKafkaCluster- Represents a logical Kafka cluster that will be exposed to Kafka clients.
KafkaProxyIngress- Configures how a virtual cluster is exposed on the network to Kafka clients.
KafkaService- Specifies a backend Kafka cluster for a virtual cluster.
KafkaProtocolFilter- Specifies filter mechanisms for use with a virtual cluster.
Secret-
KafkaServiceandKafkaProtocolFilterresources may reference aSecretto provide security-sensitive data such as TLS certificates or passwords. ConfigMap-
KafkaServiceandKafkaProtocolFilterresources may reference aConfigMapto provide non-sensitive configuration such as trusted CA certificates.
Figure 2.1. Example input resources and the references between them
Based on the input resources, the operator generates the core OpenShift resources needed to deploy the Streams for Apache Kafka Proxy, such as the following:
ConfigMap- Provides the proxy configuration file mounted into the proxy container.
Deployment-
Manages the proxy
Podand container. Service- Exposes the proxy over the network to other workloads in the same OpenShift cluster.
The API is decomposed into multiple custom resources in a similar way to the OpenShift Gateway API, and for similar reasons. You can make use of Kubernete’s Role-Based Access Control (RBAC) to divide responsibility for different aspects of the overall proxy functionality to different roles (people) in your organization.
For example, you might grant networking engineers the ability to configure KafkaProxy and KafkaProxyIngress, while giving application developers the ability to configure VirtualKafkaCluster, KafkaService, and KafkaProtocolFilter resources.
Figure 2.2. Generated OpenShift resources and the relationships between them
2.2. Custom resource API compatibility 复制链接链接已复制到粘贴板!
Streams for Apache Kafka Proxy custom resource definitions are packaged and deployed alongside the operator. Currently, there’s only a single version of the custom resource APIs: v1alpha1.
Future updates to the operator may introduce new versions of the custom resource APIs. At that time the operator will be backwards compatible with older versions of those APIs and an upgrade procedure will be used to upgrade existing custom resources to the new API version.