How do you define the sync gateway sync function in a values.yaml to configure a Helm release? I get an error like Error: failed to parse values.yaml: error converting YAML to JSON: yaml: line 112: could not find expected ':'.
@jeff.lockhart looks like your indentation is messed up and that is critical when using .yaml
Here’s an example
syncGateway:
# name of the sync gatway pod.
# defaults to name of chart
name: sync-gateway-helm
exposeServiceType: LoadBalancer
config:
databases:
db:
# bucket replicated to sync gateway
bucket: travel-sample
# server to connect db to, defaults to cluster server
server: couchbases://cb-example-srv
# username of db admin, defaults to cluster admin username
username: admin
# password of db admin, defaults to cluster admin password
password: password
#cacertpath: /etc/sync_gateway/ca.pem
sync: |-
function sync(doc, oldDoc) {
console.log("in sync");
}
Also, is it possible to store the Helm sync gateway configuration as a secret, as described in the tutorial ?
There is a configSecret that you can use in your helm specification
I know exactly how to specify it outside of helm when you define your own Deployment but I am not as familiar with helm charts so I will have to defer to @tommie on that one.
That said, once you have your sync gateway running you can scale (up/down) your deployment on demand using the following command
@priya.rajagopal yes, I’m doing this. But the problem is that the replicas value in the deployment yaml in the helm chart is hardcoded to 1. So I’m asking if this can be made a variable value that can be overridden.