Orange-OpenSource / nifikop

The NiFiKop NiFi Kubernetes operator makes it easy to run Apache NiFi on Kubernetes. Apache NiFI is a free, open-source solution that support powerful and scalable directed graphs of data routing, transformation, and system mediation logic.
https://orange-opensource.github.io/nifikop/
Apache License 2.0
129 stars 34 forks source link

Override secret /configmap configuration files #126

Open tty47 opened 3 years ago

tty47 commented 3 years ago

Question

How can I update the config files (nifi.properties, state-management.xml, zookeeper.properties, bootstrap-notification-servces.xml, bootstrap.conf, logback.xml, login-identity-providers.xml)? I mean, with the latest update PR-87 it creates a secret with all the config files in base64, if I need to modify any value of that, how can I do it?

Question

What did you do? I need to being able to update the config files.

What did you expect to see? update the configmaps or secrets (I don't know exactly which one) and they will be update inside the pods next deploy.

What did you see instead? Under which circumstances? There is no change, it keeps the version inside the secrets.

Environment

erdrix commented 3 years ago

Take a look on this page, you have the list of configurations that you can override : https://orange-opensource.github.io/nifikop/docs/5_references/1_nifi_cluster/2_read_only_config#readonlyconfig

For example for the nifi.properties you have three options :

You can use some or all of them, they will be merged into a single nifi.properties file, if this is the case and the same property is defined several time, we will keep the one defined with the following priority Secret > ConfigMap > OverrideConfig.

tty47 commented 3 years ago

Hello @erdrix Thanks for your response.

As you said, I was using the second option (overrideConfigMap) using something like this:

  readOnlyConfig:
    nifiProperties:
      overrideConfigMap:
        data: nifi.properties
        name: nifi-config
        namespace: nifi

The thing is, I have created a ConfigMap with some data inside, one of the is nifi.properties. Once I update that configmap wih new config, I expect to have the new config reflected in the pod.

I realize that the secret which is generated: nifi-config-0 contains data in base64 but this data is not the data in the configmap...

I tried to delete the cm and created again, it has the data updated, I delete the secrets and automatically are created but, the data is not the same...

Do you know what can be the issue?

Thanks in advance