James Kelleher
09/14/2022, 6:05 PMapiVersion: v1
kind: ConfigMap
metadata:
name: test-dmp-with-json-config-map
namespace: pinot
data:
test_dmp_realtime_table_config.json: |-
{
...
"streamConfigs": {
...
"stream.kafka.broker.list": "${CONFLUENT_BOOTSTRAP_SERVER}",
"sasl.mechanism": "PLAIN",
"sasl.jaas.config": "${CONFLUENT_JAAS_CONFIG}",
"security.protocol": "SASL_SSL",
...
}
},
...
}
test_dmp_realtime_schema.json: |-
{
...
}
---
apiVersion: batch/v1
kind: Job
metadata:
name: test-dmp-with-json-job
namespace: pinot
spec:
template:
spec:
containers:
- name: pinot-add-test-dmp-json
image: apachepinot/pinot:latest
args: [ "AddTable", "-schemaFile", "/var/pinot/test-dmp-with-json/test_dmp_realtime_schema.json", "-tableConfigFile", "/var/pinot/test-dmp-with-json/test_dmp_realtime_table_config.json", "-controllerHost", "pinot-controller", "-controllerPort", "9000", "-exec" ]
env:
- name: JAVA_OPTS
value: "-Xms4G -Xmx4G -Dpinot.admin.system.exit=true"
- name: CONFLUENT_BOOTSTRAP_SERVER
valueFrom:
secretKeyRef:
name: confluent-credentials
key: confluent-bootstrap-server-sandbox
optional: false
- name: CONFLUENT_JAAS_CONFIG
valueFrom:
secretKeyRef:
name: confluent-credentials
key: confluent-jaas-config-sandbox
optional: false
volumeMounts:
- name: test-dmp-with-json
mountPath: /var/pinot/test-dmp-with-json
restartPolicy: OnFailure
volumes:
- name: test-dmp-with-json
configMap:
name: test-dmp-with-json-config-map
backoffLimit: 100
The error I’m getting in the created Pod is {"code":500,"error":"Unable to apply environment variables on json config class [org.apache.pinot.spi.config.table.TableConfig]."}
I’m confident it has nothing to do with pulling the environment variables from a Secret, since I also tried hardcoding the credentials.
Does anyone know what’s going wrong? Am I not putting the environment variables in the correct space?James Kelleher
09/14/2022, 6:59 PMEnvironment variables used without default value in table config have to be available to all Pinot components - Controller, Broker, Server, and Minion. Otherwise, querying/consumption will be affected depending on the service to which these variables are not available.
James Kelleher
09/14/2022, 9:08 PMMayank
Nagendra Gautham Gondi
09/16/2022, 11:11 PM