docs
docs copied to clipboard
K8s Operator: Document how to use additionalArgs field
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
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?
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')