Presto Catalogs can be added as part of YAML as key value pairs. Also, if a catalog contains credentials, the catalog can be pre-added as a secret in the Kubernetes and then the secret name can be specified in the YAML. The secrets and catalogs that are specified as key value in YAML will automatically be mounted in the catalog folder of the Presto server and workers. By default, operator adds jmx, tpch and tpcds catalogs.
Catalog contents can be specified as key value pairs in the YAML. This will be converted to a file. The name of the catalog file in the Presto cluster is the name specified in the yaml file suffixed with .properties
spec:
catalogs:
catalogSpec:
- name: newtpch
content:
connector.name: tpch
- name: newtpcds
content:
connector.name: tpcds
Creating a secret for the catalog
kubectl create secret generic tpchsecret --from-literal=mytpch='connector.name=tpch' --from-literal=myjmx='connector.name=jmx'
Adding the secret to the YAML file so that it gets mounted.
spec:
catalogs:
catalogSecrets:
- secretName: tpchsecret
secretKey: mytpch
- secretName: tpchsecret
secretKey: myjmx