Skip to content

Commit c74ff8d

Browse files
committed
somewhat working monitoring commit
1 parent 8e90635 commit c74ff8d

File tree

86 files changed

+9042
-870
lines changed

Some content is hidden

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

86 files changed

+9042
-870
lines changed

examples/monitoring/README.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
### Deploy CRDs
4+
Deploy the CRDS using the standard way:
5+
```shell
6+
kubectl apply -k ../../kustomize/crds
7+
```
8+
### Deploy Confluent Operator and Confluent Services
9+
Deploy the confluent operator and services:
10+
```shell
11+
kubectl apply -k .
12+
```
13+
14+
15+
Portforward Grafana
16+
Login with admin/password
17+
18+
opensofttools/kafka_exporter:latest
19+
20+
kubectl port-forward \
21+
$(kubectl get pods -n default -l app.kubernetes.io/name=grafana,app.kubernetes.io/instance=grafana -o name) \
22+
3000 --namespace default
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
apiVersion: platform.confluent.io/v1beta1
2+
kind: ControlCenter
3+
metadata:
4+
name: controlcenter
5+
spec:
6+
authorization:
7+
type: rbac
8+
tls:
9+
secretRef: tls-group1
10+
dependencies:
11+
kafka:
12+
bootstrapEndpoint: kafka.sandbox.svc.cluster.local:9071
13+
authentication:
14+
type: plain
15+
jaasConfig:
16+
secretRef: mds-client-connect
17+
tls:
18+
enabled: true
19+
mds:
20+
endpoint: https://kafka.sandbox.svc.cluster.local:8090
21+
tokenKeyPair:
22+
secretRef: mds-public
23+
authentication:
24+
type: bearer
25+
bearer:
26+
secretRef: mds-client-c3
27+
tls:
28+
enabled: true
29+
connect:
30+
- name: connect
31+
url: https://connect.sandbox.svc.cluster.local:8083
32+
tls:
33+
enabled: true
34+
ksqldb:
35+
- name: ksqldb
36+
url: https://ksqldb.sandbox.svc.cluster.local:8088
37+
tls:
38+
enabled: true
39+
schemaRegistry:
40+
url: https://schemaregistry.sandbox.svc.cluster.local:8081
41+
tls:
42+
enabled: true
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
---
2+
apiVersion: platform.confluent.io/v1beta1
3+
kind: Connect
4+
metadata:
5+
name: connect
6+
spec:
7+
tls:
8+
secretRef: tls-group1
9+
authorization:
10+
type: rbac
11+
dependencies:
12+
kafka:
13+
bootstrapEndpoint: kafka.sandbox.svc.cluster.local:9071
14+
authentication:
15+
type: plain
16+
jaasConfig:
17+
secretRef: mds-client-connect
18+
tls:
19+
enabled: true
20+
mds:
21+
endpoint: https://kafka.sandbox.svc.cluster.local:8090
22+
tokenKeyPair:
23+
secretRef: mds-public
24+
authentication:
25+
type: bearer
26+
bearer:
27+
secretRef: mds-client-connect
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
---
2+
apiVersion: platform.confluent.io/v1beta1
3+
kind: Kafka
4+
metadata:
5+
name: kafka
6+
spec:
7+
configOverrides:
8+
server:
9+
- confluent.schema.registry.url=https://schemaregistry.sandbox.svc.cluster.local:8081
10+
- listener.name.internal.plain.sasl.server.callback.handler.class=io.confluent.security.auth.provider.ldap.LdapAuthenticateCallbackHandler
11+
- listener.name.external.plain.sasl.server.callback.handler.class=io.confluent.security.auth.provider.ldap.LdapAuthenticateCallbackHandler
12+
- listener.name.replication.plain.sasl.server.callback.handler.class=io.confluent.security.auth.provider.ldap.LdapAuthenticateCallbackHandler
13+
tls:
14+
secretRef: tls-group1
15+
metricReporter:
16+
enabled: true
17+
authentication:
18+
type: plain
19+
jaasConfigPassThrough:
20+
secretRef: broker-credential
21+
tls:
22+
enabled: true
23+
listeners:
24+
internal:
25+
authentication:
26+
type: plain
27+
jaasConfigPassThrough:
28+
secretRef: broker-credential
29+
tls:
30+
enabled: true
31+
external:
32+
authentication:
33+
type: plain
34+
jaasConfigPassThrough:
35+
secretRef: broker-credential
36+
tls:
37+
enabled: true
38+
authorization:
39+
type: rbac
40+
superUsers:
41+
- User:kafka
42+
services:
43+
mds:
44+
tls:
45+
enabled: true
46+
tokenKeyPair:
47+
secretRef: broker-credential
48+
provider:
49+
type: ldap
50+
ldap:
51+
address: ldap://ldap.sandbox.svc.cluster.local:389
52+
authentication:
53+
type: simple
54+
simple:
55+
secretRef: broker-credential
56+
tls:
57+
enabled: true
58+
configurations:
59+
groupNameAttribute: cn
60+
groupObjectClass: groupOfNames
61+
groupMemberAttribute: member
62+
groupMemberAttributePattern: cn=(.*),ou=users,dc=test,dc=com
63+
groupSearchBase: ou=groups,dc=test,dc=com
64+
userNameAttribute: cn
65+
userMemberOfAttributePattern: cn=(.*),ou=users,dc=test,dc=com
66+
userObjectClass: organizationalRole
67+
userSearchBase: ou=users,dc=test,dc=com
68+
dependencies:
69+
kafkaRest:
70+
authentication:
71+
type: bearer
72+
bearer:
73+
secretRef: broker-credential
74+
zookeeper:
75+
endpoint: zookeeper.sandbox.svc.cluster.local:2182
76+
authentication:
77+
type: digest
78+
jaasConfig:
79+
secretRef: broker-credential
80+
tls:
81+
enabled: true
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
apiVersion: platform.confluent.io/v1beta1
3+
kind: KsqlDB
4+
metadata:
5+
name: ksqldb
6+
spec:
7+
authorization:
8+
type: rbac
9+
tls:
10+
secretRef: tls-group1
11+
dependencies:
12+
kafka:
13+
bootstrapEndpoint: kafka.sandbox.svc.cluster.local:9071
14+
authentication:
15+
type: plain
16+
jaasConfig:
17+
secretRef: mds-client-connect
18+
tls:
19+
enabled: true
20+
mds:
21+
endpoint: https://kafka.sandbox.svc.cluster.local:8090
22+
tokenKeyPair:
23+
secretRef: mds-public
24+
authentication:
25+
type: bearer
26+
bearer:
27+
secretRef: mds-client-ksqldb
28+
tls:
29+
enabled: true
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
apiVersion: kustomize.config.k8s.io/v1beta1
2+
kind: Kustomization
3+
namespace: sandbox
4+
resources:
5+
- ldap.yaml
6+
- namespace.yaml
7+
- ../../../kustomize/base/confluent
8+
- ../../../kustomize/base/secrets-tls
9+
- ../../../kustomize/base/secrets-user
10+
patchesStrategicMerge:
11+
- zookeeper.yaml
12+
- kafka.yaml
13+
- rest-class.yaml
14+
- control-centre.yaml
15+
- kafka-connect.yaml
16+
- ksqldb.yaml
17+
- schema-registry.yaml
Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
apiVersion: v1
2+
kind: Pod
3+
metadata:
4+
name: ldap
5+
labels:
6+
role: ldap
7+
app: ldap
8+
spec:
9+
containers:
10+
- name: ldap
11+
args:
12+
- --copy-service
13+
- --loglevel=debug
14+
image: osixia/openldap:1.3.0
15+
ports:
16+
- name: ldap
17+
containerPort: 389
18+
- name: ldaps
19+
containerPort: 636
20+
livenessProbe:
21+
tcpSocket:
22+
port: 389
23+
initialDelaySeconds: 15
24+
periodSeconds: 20
25+
env:
26+
- name: LDAP_ORGANISATION
27+
value: "Test Inc."
28+
- name: LDAP_DOMAIN
29+
value: "test.com"
30+
- name: LDAP_ADMIN_PASSWORD
31+
value: "confluentrox"
32+
- name: LDAP_CONFIG_PASSWORD
33+
value: "confluentconfigrox"
34+
- name: LDAP_READONLY_USER
35+
value: "True"
36+
- name: LDAP_READONLY_USER_USERNAME
37+
value: "mds"
38+
- name: LDAP_READONLY_USER_PASSWORD
39+
value: "Developer!"
40+
- name: LDAP_TLS
41+
value: "False"
42+
volumeMounts:
43+
- mountPath: /container/service/slapd/assets/config/bootstrap/ldif/custom
44+
name: customldif
45+
- mountPath: /var/lib/ldap
46+
name: ldap-data
47+
- mountPath: /etc/ldap/slapd.d
48+
name: ldap-config
49+
volumes:
50+
- name: customldif
51+
configMap:
52+
defaultMode: 420
53+
name: ldap-ldifs
54+
- name: ldap-data
55+
emptyDir: {}
56+
- name: ldap-config
57+
emptyDir: {}
58+
restartPolicy: Always
59+
---
60+
apiVersion: v1
61+
kind: ConfigMap
62+
metadata:
63+
name: ldap-ldifs
64+
data:
65+
0_groups.ldif: |-
66+
dn: ou=groups,dc=test,dc=com
67+
objectClass: organizationalUnit
68+
objectClass: top
69+
ou: groups
70+
0_users.ldif: |-
71+
dn: ou=users,dc=test,dc=com
72+
objectClass: organizationalUnit
73+
objectClass: top
74+
ou: users
75+
1_emmy.ldif: |-
76+
dn: cn=emmy,ou=users,dc=test,dc=com
77+
userPassword: emmy-secret
78+
objectClass: simpleSecurityObject
79+
objectClass: organizationalRole
80+
description: Interested in action and conservation. If you like it, you should put a Noetherian Ring on it.
81+
cn: emmy
82+
1_alice.ldif: |-
83+
dn: cn=alice,ou=users,dc=test,dc=com
84+
userPassword: alice-secret
85+
objectClass: simpleSecurityObject
86+
objectClass: organizationalRole
87+
description: Alice is great at changing perspectives, but sometimes chases down rabbit holes
88+
cn: alice
89+
1_developers.ldif: |-
90+
dn: cn=developers,ou=groups,dc=test,dc=com
91+
objectClass: top
92+
objectClass: groupOfNames
93+
description: A group of software developers and the apps they are responsible for
94+
cn: developers
95+
member: cn=emmy,ou=users,dc=test,dc=com
96+
member: cn=alice,ou=users,dc=test,dc=com
97+
1_kafka.ldif: |-
98+
dn: cn=kafka,ou=users,dc=test,dc=com
99+
userPassword: kafka-secret
100+
description: kafka user
101+
objectClass: simpleSecurityObject
102+
objectClass: organizationalRole
103+
cn: kafka
104+
1_erp.ldif: |-
105+
dn: cn=erp,ou=users,dc=test,dc=com
106+
userPassword: erp-secret
107+
description: erp user
108+
objectClass: simpleSecurityObject
109+
objectClass: organizationalRole
110+
cn: erp
111+
1_sr.ldif: |-
112+
dn: cn=sr,ou=users,dc=test,dc=com
113+
userPassword: sr-secret
114+
description: schema registry user
115+
objectClass: simpleSecurityObject
116+
objectClass: organizationalRole
117+
cn: sr
118+
1_c3.ldif: |-
119+
dn: cn=c3,ou=users,dc=test,dc=com
120+
userPassword: c3-secret
121+
description: control center user
122+
objectClass: simpleSecurityObject
123+
objectClass: organizationalRole
124+
cn: c3
125+
1_ksql.ldif: |-
126+
dn: cn=ksql,ou=users,dc=test,dc=com
127+
userPassword: ksql-secret
128+
description: ksql user
129+
objectClass: simpleSecurityObject
130+
objectClass: organizationalRole
131+
cn: ksql
132+
1_connect.ldif: |-
133+
dn: cn=connect,ou=users,dc=test,dc=com
134+
userPassword: connect-secret
135+
description: connect user
136+
objectClass: simpleSecurityObject
137+
objectClass: organizationalRole
138+
cn: connect
139+
1_replicator.ldif: |-
140+
dn: cn=replicator,ou=users,dc=test,dc=com
141+
userPassword: replicator-secret
142+
description: replicator user
143+
objectClass: simpleSecurityObject
144+
objectClass: organizationalRole
145+
cn: replicator
146+
1_c3-test.ldif: |-
147+
dn: cn=testadmin,ou=users,dc=test,dc=com
148+
userPassword: testadmin
149+
description: testadmin user
150+
objectClass: simpleSecurityObject
151+
objectClass: organizationalRole
152+
cn: testadmin
153+
---
154+
apiVersion: v1
155+
kind: Service
156+
metadata:
157+
name: ldap
158+
labels:
159+
app: ldap
160+
spec:
161+
ports:
162+
- port: 389
163+
name: ldap
164+
- port: 636
165+
name: ldaps
166+
clusterIP: None
167+
selector:
168+
app: ldap
169+
170+
171+

0 commit comments

Comments
 (0)