Details:
Operator Version 1.13.0 (Deployed with kubectl apply)
Kustomize strategic merge patch omit properties when applied over percona mongofb operator CRD.
For example base/percona-mongo:
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDB
metadata:
name: db-platform-mongo
spec:
replsets:
- name: rs0
size: 1
affinity:
antiAffinityTopologyKey: "kubernetes.io/hostname"
volumeSpec:
persistentVolumeClaim:
storageClassName: standard
overlay/qa/percona-mongo:
apiVersion: psmdb.percona.com/v1
kind: PerconaServerMongoDB
metadata:
name: db-platform-mongo
spec:
replsets:
- name: rs0
size: 1
volumeSpec:
persistentVolumeClaim:
storageClassName: rook-cephfs-replica-3
kustomization result misses:
affinity:
antiAffinityTopologyKey: "kubernetes.io/hostname"
It seems to be caused by kustomize not knowing which openapi schema the operator CRD follows, as described in this article: https://blog.argoproj.io/argo-crds-and-kustomize-the-problem-of-patching-lists-5cfc43da288c.
In this forum post I found a reference to a migration to openapi schema. Would you mind providing me a url to that resource? So I can apply it in a kustomization file like this:
...
openapi:
path: https://github.com/argoproj/argo-schema-generator/raw/main/schema/argo_all_k8s_kustomize_schema.json