Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ All Examples will require the steps mentioned in [GETTING_STARTED.md](https://gi
* [Monitoring Kakfa CFK with JMX Prometheus and Grafana](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/grafana-prometheus)
* [User provided mTLS for Kafka in CFK](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/external-mtls)
* [Vault enabled secrets store for Kafka](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/vault-key-value)
* [Confluent Schema CRD to declaratively create, read, and delete schemas](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/schema)

### Broken / WIP Deployments
* [Vault PKI integration with dynamic SSL](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/broken/pki-vault--waiting-for-kafka-2.7)
Expand Down
1 change: 1 addition & 0 deletions README.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ examples: |-
* [Monitoring Kakfa CFK with JMX Prometheus and Grafana](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/grafana-prometheus)
* [User provided mTLS for Kafka in CFK](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/external-mtls)
* [Vault enabled secrets store for Kafka](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/vault-key-value)
* [Confluent Schema CRD to declaratively create, read, and delete schemas](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/stable/schema)

### Broken / WIP Deployments
* [Vault PKI integration with dynamic SSL](https://github.com/osodevops/confluent-kubernetes-playground/tree/main/broken/pki-vault--waiting-for-kafka-2.7)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ resources:
- secrets
- zookeeper.yaml
- kafka.yaml
- control-centre.yaml
# - control-centre.yaml
# - rest-class.yaml
63 changes: 63 additions & 0 deletions stable/schema/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Schema CRD Deployment
A working example of the new Schema CRD, you can declaratively create, read, and delete schemas as Schema custom resources (CRs) in Kubernetes.

The example uses an Avro schema which is loaded into a ConfigMap and referenced in the Schema CRD.

## Features

| Feature | Enabled | Note |
|:----------------|:-------:|-------:|
| Kafka/Zookeeper | ✅ | |
| Control Center | ✅ | |
| Connect | ❌ | |
| Schema Registry | ✅ | |
| KSQL | ❌ | |
| TLS Encryption | ❌ | |
| Authentication | ❌ | |


### Output
CRD sample:
```shell
apiVersion: platform.confluent.io/v1beta1
kind: Schema
metadata:
annotations:
kubectl.kubernetes.io/last-applied-configuration: |
{"apiVersion":"platform.confluent.io/v1beta1","kind":"Schema","metadata":{"annotations":{},"name":"customer-schema","namespace":"sandbox"},"spec":{"data":{"configRef":"oso-schema-config","format":"avro"}}}
platform.confluent.io/config-revision-hash: 9kg4kgmch4
creationTimestamp: "2022-05-03T16:48:42Z"
finalizers:
- schema.finalizers.platform.confluent.io
generation: 1
name: customer-schema
namespace: sandbox
ownerReferences:
- apiVersion: platform.confluent.io/v1beta1
blockOwnerDeletion: true
controller: true
kind: SchemaRegistry
name: schemaregistry
uid: a7714a0e-6e5d-4950-b3b0-8b5f427a78f7
resourceVersion: "6627"
uid: 2ccb3eb6-1581-4710-9ab4-834f6ffc1419
spec:
data:
configRef: oso-schema-config
format: avro
status:
conditions:
- lastProbeTime: "2022-05-03T16:48:42Z"
lastTransitionTime: "2022-05-03T16:48:42Z"
message: Schema version create successful
reason: successfully created schema version 1
status: "False"
type: platform.confluent.io/failed-create-version
format: avro
id: 3
schemaRegistryEndpoint: https://schemaregistry.sandbox.svc.cluster.local:8081
schemaRegistryTLS: true
state: SUCCEEDED
subject: customer-schema
version: 1
```
16 changes: 16 additions & 0 deletions stable/schema/kustomization.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: sandbox
resources:
- namespace.yaml
- ../../base/cfk-components/confluent-no-auth-tls
- ../../base/cfk-components/confluent-no-auth-tls/schmea-registry
- ./schema-config.yaml
- ./schema.yaml

configMapGenerator:
- name: oso-schema-config
files:
- schema=new_customer.avsc
options:
disableNameSuffixHash: true
4 changes: 4 additions & 0 deletions stable/schema/namespace.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
apiVersion: v1
kind: Namespace
metadata:
name: sandbox
14 changes: 14 additions & 0 deletions stable/schema/new_customer.avsc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"type": "record",
"namespace": "sh.oso.examples.customer",
"name": "Customer",
"doc": "OSO customer event format 1_0",
"version": "1",
"fields": [
{"name": "name", "type": "string"},
{"name": "email", "type": "string", "default": "NONE"},
{"name": "eventID", "type": "string", "default": "NONE"},
{"name": "eventDateTime", "type":"long", "logicalType": "timestamp-millis"},
{"name": "publishedDateTime", "type":"long", "logicalType": "timestamp-millis"}
]
}
8 changes: 8 additions & 0 deletions stable/schema/schema.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: platform.confluent.io/v1beta1
kind: Schema
metadata:
name: customer-schema
spec:
data:
configRef: oso-schema-config
format: avro