docs icon indicating copy to clipboard operation
docs copied to clipboard

K8s Operator: Document how to use additionalArgs field

Open johnrk-zz opened this issue 4 years ago • 2 comments

Exalate commented:

the additionalArgs field gives Operator a lot of flexibility in configuring their deployments.

the syntax is weird because it's a string array.

It will be helpful to provide an example. In addition, we should point our users to our existing cockroach start docs. This will equip users with all of the available configurations through the additionalargs field.

Jira Issue: DOC-977

johnrk-zz avatar Feb 10 '21 15:02 johnrk-zz

I'm aiming to document setting --locality with additionalArgs. @keith-mcclellan provided this example for EKS:

--locality=region=$(curl http://169.254.169.254/latest/meta-data/placement/region),zone=$(curl http://169.254.169.254/latest/meta-data/placement/availability-zone)

I have an equivalent for determining the zone on GKE, but the region doesn't seem to be part of the instance metadata.

--locality=region=$(curl <region endpoint>),zone=$(curl http://metadata.google.internal/computeMetadata/v1/instance/zone -H 'Metadata-Flavor: Google')

@keith-mcclellan @udnay any tips here? I don't suppose extracting the region name from the zone metadata (e.g., by subtracting -c from us-east4-c) would be an option?

taroface avatar Jul 07 '21 01:07 taroface

thats a perfectly reasonable option, you could use a bash trick for this, so something like:

--locality=region=${${curl http://metadata.google.internal/computeMetadata/v1/instance/zone -H 'Metadata-Flavor: Google' }::-2},zone=$(curl http://metadata.google.internal/computeMetadata/v1/instance/zone -H 'Metadata-Flavor: Google')

keith-mcclellan avatar Jul 07 '21 17:07 keith-mcclellan