Skip to content

Commit b055503

Browse files
committed
added schema example with kutomize configmap generator
1 parent 2a04034 commit b055503

File tree

4 files changed

+42
-0
lines changed

4 files changed

+42
-0
lines changed

stable/schema/kustomization.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: sandbox
4+
resources:
5+
- namespace.yaml
6+
- ../../base/cfk-components/confluent-no-auth-tls
7+
- ../../base/cfk-components/confluent-no-auth-tls/schmea-registry
8+
- ./schema-config.yaml
9+
- ./schema.yaml
10+
11+
configMapGenerator:
12+
- name: oso-schema-config
13+
files:
14+
- schema=new_customer.avsc
15+
options:
16+
disableNameSuffixHash: true

stable/schema/namespace.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
apiVersion: v1
2+
kind: Namespace
3+
metadata:
4+
name: sandbox

stable/schema/new_customer.avsc

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
{
2+
"type": "record",
3+
"namespace": "sh.oso.examples.customer",
4+
"name": "Customer",
5+
"doc": "OSO customer event format 1_0",
6+
"version": "1",
7+
"fields": [
8+
{"name": "name", "type": "string"},
9+
{"name": "email", "type": "string", "default": "NONE"},
10+
{"name": "eventID", "type": "string", "default": "NONE"},
11+
{"name": "eventDateTime", "type":"long", "logicalType": "timestamp-millis"},
12+
{"name": "publishedDateTime", "type":"long", "logicalType": "timestamp-millis"}
13+
]
14+
}

stable/schema/schema.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
apiVersion: platform.confluent.io/v1beta1
2+
kind: Schema
3+
metadata:
4+
name: customer-schema
5+
spec:
6+
data:
7+
configRef: oso-schema-config
8+
format: avro

0 commit comments

Comments
 (0)