Giter Site home page Giter Site logo

pannoi / kafka-schema-operator Goto Github PK

View Code? Open in Web Editor NEW
5.0 2.0 0.0 76 KB

Operator to provide Kafka Schema in declarative way using KubernetesCustomResources

License: MIT License

Dockerfile 1.29% Makefile 34.76% Go 58.55% Smarty 5.39%
kafka kafka-operator kubernetes kubernetes-operator operator schema-registry avro-schema confluent confluent-kafka schema

kafka-schema-operator's Introduction

Kafka Schema Operator

Artifact Hub

The Kafka Schema Operator delivers as easy way to deliver Kafka Schemas declaratively via Kubernetes CRD

Schema First approach should be implemented if you are using schema-registry according to best practices

Operator schema registry compatibility

Operator features

  • Create schemas declaratively via CRD
  • Automatic schema versions update
  • GitOps (automatic updates)

Installation

helm repo add kafka-schema-operator https://pannoi.github.io/kafka-schema-operator-helm/
helm repo update
helm upgrade --install kafka-schema-operator kafka-schema-operator/kafka-schema-operator --values values.yaml

You need to set SCHEMA_REGSITRY_HOST and SCHEMA_REGSITRY_PORT initial functionality

schemaRegistry:
  host:
  port:

If your schema registry needs API authentication add Key and Secret values in addition to host and port

schemaRegistry:
  apiKey:
  apiSecret:

You can refer from secretRef

For more values check default values

How to use

Deploy ConfigMap

apiVersion: v1
kind: ConfigMap
metadata:
  name: kafka-schema
  namespace: default
data:
  schema: |
    {
      "namespace": "testing",
      "type": "record",
      "name": "testing",
      "fields": [
        {"name": "id", "type": "string"},
        {"name": "email", "type": "string"}
      ]
    }

Refer to created ConfigMap via CustomResource KafkaSchema

apiVersion: kafka-schema-operator.pannoi/v1beta1
kind: KafkaSchema
metadata:
  name: kafka-schema
  namespace: default
spec:
  name: testing
  schemaSerializer: string
  autoReconciliation: true # true = autoUpdate schema, false = for update CR should be re-created (not set => false)
  terminationProtection: true # true = don't delete resources on CR deletion, false = when CR deleted, deletes all resource: ConfigMap, Schema from registry (not set => false)
  data:
    configRef: kafka-schema # ConfigMap
    format: avro # avro/protobuf/json
    compatibility: # BACKWARD | BACKWARD_TRANSITIVE | FORWARD | FORWARD_TRANSITIVE | FULL | FULL_TRANSITIVE | NONE

Resources (KafkaSchema & ConfigMap) should be located in same namespace

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.