Created
March 30, 2022 15:54
-
-
Save renatocron/466a11d4f0a5f8cd34748f2867fa2faf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: "druid.apache.org/v1alpha1" | |
kind: "Druid" | |
metadata: | |
name: druid-cluster | |
spec: | |
image: apache/druid:0.21.1 | |
# Optionally specify image for all nodes. Can be specify on nodes also | |
# imagePullSecrets: | |
# - name: tutu | |
startScript: /druid.sh | |
podLabels: | |
environment: stage | |
release: alpha | |
podAnnotations: | |
annotation: "precisa existir um podAnnotations e label para o plugin do k8s funcionar" | |
readinessProbe: | |
httpGet: | |
path: /status/health | |
port: 8088 | |
securityContext: | |
fsGroup: 1000 | |
runAsUser: 1000 | |
runAsGroup: 1000 | |
services: | |
- spec: | |
type: ClusterIP | |
clusterIP: None | |
commonConfigMountPath: "/opt/druid/conf/druid/cluster/_common" | |
jvm.options: |- | |
-server | |
-XX:MaxDirectMemorySize=10240g | |
-Duser.timezone=UTC | |
-Dfile.encoding=UTF-8 | |
-Dlog4j.trace | |
-Djava.util.logging.manager=org.apache.logging.log4j.jul.LogManager | |
-Djava.io.tmpdir=/druid/data | |
log4j.config: |- | |
<?xml version="1.0" encoding="UTF-8" ?> | |
<Configuration status="WARN"> | |
<Appenders> | |
<Console name="Console" target="SYSTEM_OUT"> | |
<PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/> | |
</Console> | |
</Appenders> | |
<Loggers> | |
<Root level="trace"> | |
<AppenderRef ref="Console"/> | |
</Root> | |
</Loggers> | |
</Configuration> | |
common.runtime.properties: | | |
# Metadata Store | |
druid.metadata.storage.type=postgresql | |
druid.metadata.storage.connector.connectURI=jdbc:postgresql://druid-pg.pgo.svc.cluster.local:5432/druid-pg | |
druid.metadata.storage.connector.host=druid-pg.pgo.svc.cluster.local | |
druid.metadata.storage.connector.port=5432 | |
# only at first run = true, otherwise some errors appears | |
druid.metadata.storage.connector.createTables=false | |
druid.metadata.storage.connector.user=testuser | |
druid.metadata.storage.connector.password=pgopass | |
# protections | |
druid.server.http.maxSubqueryRows=1000000 | |
# Deep Storage | |
druid.storage.type=s3 | |
druid.storage.bucket=bucket-name | |
druid.storage.baseKey=druid/segments | |
# s3 config | |
druid.storage.disableAcl=true | |
druid.s3.enablePathStyleAccess=true | |
druid.s3.endpoint.url=s3.us-west-004.backblazeb2.com | |
druid.s3.protocol=https | |
druid.s3.endpoint.signingRegion=us-west-004 | |
# | |
# Extensions | |
# | |
druid.extensions.loadList=["druid-kafka-indexing-service", "druid-s3-extensions", "postgresql-metadata-storage", "druid-kubernetes-extensions", "druid-histogram", "druid-datasketches", "druid-avro-extensions", "druid-bloom-filter"] | |
druid.discovery.k8s.clusterIdentifier=us-west-prod-druid | |
# | |
# Service discovery | |
# | |
druid.selectors.indexing.serviceName=druid/overlord | |
druid.selectors.coordinator.serviceName=druid/coordinator | |
druid.indexer.logs.type=s3 | |
druid.indexer.logs.s3Bucket=bucket-name | |
druid.indexer.logs.s3Prefix=druid/indexing-logs | |
druid.segmentCache.locations=[{"path":"/druid/data/segment-cache","maxSize":10737418240}] | |
druid.indexer.logs.directory=/druid/data/indexing-logs | |
druid.lookup.enableLookupSyncOnStartup=false | |
volumeMounts: | |
- mountPath: /druid/data | |
name: data-volume | |
volumes: | |
- name: data-volume | |
emptyDir: {} | |
env: | |
- name: POD_NAME | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.name | |
- name: POD_NAMESPACE | |
valueFrom: | |
fieldRef: | |
fieldPath: metadata.namespace | |
- name: AWS_REGION | |
value: "us-west-004" | |
- name: AWS_ACCESS_KEY_ID | |
value: "000000000000000000000000" | |
- name: AWS_SECRET_ACCESS_KEY | |
value: "K0000000000000000000000000" | |
nodes: | |
brokers: | |
# Optionally specify for running broker as Deployment | |
# kind: Deployment | |
nodeType: "broker" | |
# Optionally specify for broker nodes | |
# imagePullSecrets: | |
# - name: tutu | |
druid.port: 8088 | |
nodeConfigMountPath: "/opt/druid/conf/druid/cluster/query/broker" | |
replicas: 1 | |
resources: | |
requests: | |
cpu: "1" | |
memory: 1Gi | |
runtime.properties: | | |
druid.service=druid/broker | |
# HTTP server threads | |
druid.broker.http.numConnections=50 | |
druid.server.http.numThreads=60 | |
# disable zk | |
druid.zk.service.enabled=false | |
druid.serverview.type=http | |
druid.coordinator.loadqueuepeon.type=http | |
druid.indexer.runner.type=httpRemote | |
druid.discovery.type=k8s | |
# Processing threads and buffers | |
druid.processing.buffer.sizeBytes=500MiB | |
druid.processing.numMergeBuffers=4 | |
druid.processing.numThreads=2 | |
druid.sql.enable=true | |
druid.server.http.defaultQueryTimeout=3000000 | |
extra.jvm.options: |- | |
-Xmx1G | |
-Xms1G | |
coordinators: | |
# Optionally specify for running coordinator as Deployment | |
# kind: Deployment | |
nodeType: "coordinator" | |
druid.port: 8088 | |
nodeConfigMountPath: "/opt/druid/conf/druid/cluster/master/coordinator-overlord" | |
replicas: 1 | |
resources: | |
requests: | |
cpu: "0.1" | |
memory: 512Mi | |
runtime.properties: | | |
druid.service=druid/coordinator | |
# HTTP server threads | |
druid.coordinator.startDelay=PT30S | |
druid.coordinator.period=PT30S | |
# disable zk | |
druid.zk.service.enabled=false | |
druid.serverview.type=http | |
druid.coordinator.loadqueuepeon.type=http | |
druid.indexer.runner.type=httpRemote | |
druid.discovery.type=k8s | |
# Configure this coordinator to also run as Overlord | |
druid.coordinator.asOverlord.enabled=true | |
druid.coordinator.asOverlord.overlordService=druid/overlord | |
druid.indexer.queue.startDelay=PT30S | |
druid.indexer.runner.type=local | |
extra.jvm.options: |- | |
-Xmx512M | |
-Xms512M | |
historicals: | |
nodeType: "historical" | |
druid.port: 8088 | |
nodeConfigMountPath: "/opt/druid/conf/druid/cluster/data/historical" | |
replicas: 1 | |
resources: | |
requests: | |
cpu: "0.1" | |
memory: 1000Mi | |
runtime.properties: | | |
# Segment storage | |
druid.segmentCache.locations=[{\"path\":\"/druid/data/segment-cache\",\"maxSize\":10737418240}] | |
druid.server.maxSize=10737418240 | |
druid.service=druid/historical | |
druid.server.http.numThreads=5 | |
druid.processing.buffer.sizeBytes=536870912 | |
druid.processing.numMergeBuffers=1 | |
druid.processing.numThreads=1 | |
# disable zk | |
druid.zk.service.enabled=false | |
druid.serverview.type=http | |
druid.coordinator.loadqueuepeon.type=http | |
druid.indexer.runner.type=httpRemote | |
druid.discovery.type=k8s | |
druid.historical.cache.useCache=false | |
druid.historical.cache.populateCache=false | |
druid.server.http.defaultQueryTimeout=3000000 | |
extra.jvm.options: |- | |
-Xmx1000M | |
-Xms1000M | |
routers: | |
nodeType: "router" | |
druid.port: 8088 | |
nodeConfigMountPath: "/opt/druid/conf/druid/cluster/query/router" | |
replicas: 1 | |
resources: | |
requests: | |
cpu: "0.1" | |
memory: 512Mi | |
runtime.properties: | | |
druid.service=druid/router | |
# HTTP proxy | |
druid.router.http.numConnections=10 | |
druid.router.http.readTimeout=PT5M | |
druid.router.http.numMaxThreads=10 | |
druid.server.http.numThreads=10 | |
# Service discovery | |
druid.router.defaultBrokerServiceName=druid/broker | |
druid.router.coordinatorServiceName=druid/coordinator | |
# Management proxy to coordinator / overlord: required for unified web console. | |
druid.router.managementProxy.enabled=true | |
# disable zk | |
druid.zk.service.enabled=false | |
druid.serverview.type=http | |
druid.coordinator.loadqueuepeon.type=http | |
druid.indexer.runner.type=httpRemote | |
druid.discovery.type=k8s | |
extra.jvm.options: |- | |
-Xmx512M | |
-Xms512M |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment