November 16, 2022, 6:55am
First of all, I would like to thank Percona for the fantastic Kubernetes Operator for PSMDB !
What is the best way to manage cr.yaml ?
I’d like to use some tool or method (Kustomize ?) that allows to:
have one base config for all my clusters
include extra for some clusters (monitoring, backups)
have different number of shards
If this can be done with Kustomize then is there any examples how to do it ?
November 16, 2022, 1:08pm
We use kustomize and sops and split the mongodb cluster>s< in namespaces. So you have an operator and a cluster per namespace. For ex. dev-psmdb01, dev-psmdb02 etc and they all get accessed from dev.
cr.yaml and all the other yamls
stuff (patches to overwrite cpu, memory, disk size) you want to inject for each namespace
encryption key !!!
Unfort. the new 1.13 crd is a show stopper unless you update your installation at the same speed as percona releases (which is a no go)
November 16, 2022, 7:05pm
We also have cluster and operator per namespace and that’s fine for us, but having 10+ clusters with 10+ shards leads to crazy amount of .yaml and duplication.
I’m sorry, I’m new to Kustomize. As far as I understand then Kustomize needs a crd OpenAPI schema in .json format. Should I extract the right version of openAPIV3Schema from crd.yaml and convert it into json ? Or is there a json version of crd available somewhere to download ?
And please could you provide some examples of kustomization.yaml file ?
November 17, 2022, 9:15am
I’m new to Kustomize
This forum is not to educate someone in kustomize …
November 17, 2022, 9:36am
Thank you very much! Now I know
November 17, 2022, 11:02am
for ex. →
Kustomize Tutorial With Instructions & Examples | Densify
If you understand it, then it’s straight forward how to organize the Percona yaml’s
=> important to understand is, how >patching< works (means how you adjust the values of the “leaves” of the yaml)
my 2 cents - use whatever you are comfortable with.
I saw the following that worked pretty well.
Custom helm charts (now they are adding OLM to simplify the management)
Various Infra-as-a-code tools. The most seen - Terraform + Ansible/Chef.
Gitops through yaml
Obviously there is no best way of doing things
November 29, 2022, 9:10pm
Thank you !
A few days ago I decided to go Ansible way. I think it is good enough for starting.
ytt to wrangle yaml.