Skip to content

Commit 1872daa

Browse files
authored
Merge pull request #30 from osodevops/schema-linking
Schema linking
2 parents 727a080 + 3949a9e commit 1872daa

File tree

102 files changed

+906
-294
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

102 files changed

+906
-294
lines changed

base/cfk-components/confluent-rbac/connect/kafka-connect.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,5 @@ spec:
2828
type: bearer
2929
bearer:
3030
secretRef: credential
31+
tls:
32+
enabled: true

base/cfk-components/confluent-rbac/connect/rolebindings/connect-base.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ spec:
88
principal:
99
name: kafka
1010
type: user
11-
role: SecurityAdmin
11+
role: ClusterAdmin
1212
---
1313
apiVersion: platform.confluent.io/v1beta1
1414
kind: ConfluentRolebinding

base/cfk-components/confluent-rbac/rest-class.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,5 +6,5 @@ spec:
66
kafkaRest:
77
authentication:
88
type: bearer
9-
bearer:
9+
basic:
1010
secretRef: credential

base/cfk-components/confluent-rbac/secrets/credential.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
apiVersion: v1
22
data:
33
bearer.txt: dXNlcm5hbWU9a2Fma2EKcGFzc3dvcmQ9a2Fma2Etc2VjcmV0Cg==
4+
basic.txt: dXNlcm5hbWU9a2Fma2EKcGFzc3dvcmQ9a2Fma2Etc2VjcmV0Cg==
45
digest.txt: dXNlcm5hbWU9ImthZmthIgpwYXNzd29yZD0ia2Fma2Etc2VjcmV0Ig==
56
plain.txt: dXNlcm5hbWU9ImthZmthIgpwYXNzd29yZD0ia2Fma2Etc2VjcmV0Ig==
67
ldap.txt: dXNlcm5hbWU9Y249bWRzLGRjPXRlc3QsZGM9Y29tCnBhc3N3b3JkPURldmVsb3BlciEK
Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Basic Deployment
2+
This example deploys a basic deployment. No RBAC/LDAP. Just a single topic 'foobar' is added as part of the pipeline.
3+
4+
5+
| Feature | Enabled | Note |
6+
|:-----------------|:-------:|:-------------------------|
7+
| Kafka/Zookeeper || |
8+
| Control Center || |
9+
| Connect || |
10+
| Schema Registry || |
11+
| KSQL || |
12+
| TLS Encryption || Self-signed certificates |
13+
| Authentication || |
14+
| Authorization || via LDAP |
15+
16+
17+
### Deploy CRDs
18+
Deploy the CRDS using the standard way:
19+
```shell
20+
kubectl apply -k ../../base/crds
21+
```
22+
### Deploy Confluent Operator and Confluent Services
23+
Deploy the confluent operator and services:
24+
```shell
25+
kubectl apply -k .
26+
```
27+
28+
### Forward ports locally.
29+
#### Source Kafka
30+
Minikube:source:kafka:9071 -> localhost:9071
31+
#### Source SchemaRegistry
32+
Minikube:source:schemaregistry:9081 -> localhost:9081
33+
#### Source Kafka
34+
Minikube:destination:kafka:9071 -> localhost:9072
35+
#### Source Kafka
36+
Minikube:source:schemaregistry:9081 -> localhost:9082
37+
38+
```shell
39+
40+
nohup kubectl port-forward schemaregistry-0 8081:8081 --namespace master \
41+
&& \
42+
nohup kubectl port-forward schemaregistry-0 8082:8081 --namespace dogs \
43+
&& \
44+
nohup kubectl port-forward schemaregistry-0 8083:8081 --namespace cats
45+
46+
```
47+
kubectl port-forward \
48+
$(kubectl get pods -n source -l statefulset.kubernetes.io/pod-name:kafka-0 -o name) \
49+
:9071 -n source \
50+
&& \
51+
kubectl port-forward \
52+
$(kubectl get pods -n source -l app.kubernetes.io/component=grafana -o name) \
53+
:9071 -n source \
54+
&& \
55+
kubectl port-forward \
56+
$(kubectl get pods -n source -l app.kubernetes.io/component=grafana -o name) \
57+
9071 -n source
58+
&& \
59+
kubectl port-forward \
60+
$(kubectl get pods -n source -l app.kubernetes.io/component=grafana -o name) \
61+
9071 -n source
62+
63+
```
64+
65+
### Query schema Registry
66+
67+
[//]: # (TODO Port forward Production Schema Registry - 8081)
68+
[//]: # (TODO Port forward Production Kafka Broker - 9092)
69+
70+
```
71+
curl -k -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
72+
--data '{"schema": "{\"type\": \"string\"}"}' \
73+
https://localhost:8081/subjects/im-a-source-schema/versions
74+
```
75+
76+
77+
78+
```
79+
curl -k -X POST -H "Content-Type: application/vnd.schemaregistry.v1+json" \
80+
--data '{"schema": "{\"type\": \"string\"}"}' \
81+
https://localhost:8082/subjects/im-a-desgination-schema/versions
82+
```10.109.90.121
83+
84+
`curl -k -X GET https://10.109.90.121:8081/subjects`
85+
86+
`curl -k -X GET https://localhost:8082/subjects`
87+
88+
#TODO - how will
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
apiVersion: platform.confluent.io/v1beta1
22
kind: KafkaRestClass
33
metadata:
4-
name: source-kafka-rest
4+
name: cats-kafka-rest
55
spec:
66
kafkaClusterRef:
77
name: kafka
88
kafkaRest:
9-
endpoint: http://kafka.source.svc.cluster.local:8090
9+
endpoint: http://kafka.cats.svc.cluster.local:8090

0 commit comments

Comments
 (0)