-
Notifications
You must be signed in to change notification settings - Fork 1k
Description
- Which image of the operator are you using? registry.opensource.zalan.do/acid/postgres-operator:v1.6.3
- Where do you run it - cloud or metal? Kubernetes or OpenShift? Bare Metal K8s
- Are you running Postgres Operator in production? yes
- Type of issue? Bug report
We are trying to configure the pod tolerations as described in here: https://postgres-operator.readthedocs.io/en/latest/administrator/#use-taints-and-tolerations-for-dedicated-postgresql-nodes, but we can't get it to work. Our deployment is using the OperatorConfiguration Resource rather than the configmap.
Below the lines in our operator logs that shows null for the PodToleration. If we inspect the pod manifest, there is no trace of tolerations either.
time="2021-10-05T09:55:43Z" level=info msg=" \"PodToleration\": null," pkg=controller
And the configuration (relevant part) for the toleration:
apiVersion: acid.zalan.do/v1
kind: OperatorConfiguration
configuration:
kubernetes:
toleration:
postgres: "key:db-only,operator:Exists,effect:NoSchedule"
I am not really familiar with the go language, but I tried to check a bit, and it seems that the values isn't mapped at all in the configuration object when the operator start.
If I check in this file/line:
if configObjectName := os.Getenv("POSTGRES_OPERATOR_CONFIGURATION_OBJECT"); configObjectName != "" { |
I understand that if the environment variable is defined, it is a Configuration from CRD (my pod does indeed show that env variable set) and the importConfigurationFromCRD function is used.
If I then follow the importConfigurationFromCRD function here:
func (c *Controller) importConfigurationFromCRD(fromCRD *acidv1.OperatorConfigurationData) *config.Config { |
Could you let me know if we are doing something wrong? Or if there is indeed an issue there and we should use the cluster manifest for now to workaround this issue?
Kr,