konpyutaika / 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://konpyutaika.github.io/nifikop/
Apache License 2.0
123 stars 40 forks source link

singleUserConfiguration in helm template has wrong syntax #318

Closed 22RC closed 8 months ago

22RC commented 8 months ago

What steps will reproduce the bug?

  1. In case we add singleUserConfiguration, the nifiCluster resources contains wrong syntax
  2. with this config:
cluster:
  singleUserConfiguration:
      enabled: true
      authorizerEnabled: false
      secretRef: 
        name: "single-user-credentials"
        namespace: "nifi"
      secretKeys: 
        username: "username"
        password: "password"
  1. Just Run helm template to see that:
    apiVersion: nifi.konpyutaika.com/v1
    kind: NifiCluster
    metadata:
    name: release-name-nifi-central
    labels:
    helm.sh/chart: nifi-1.4.1
    app.kubernetes.io/version: "1.19.0"
    app.kubernetes.io/managed-by: Helm
    spec:
    ....
    singleUserConfiguration:
      enabled: 
      secretRef: 
      name: single-user-credentials
      namespace: nifi
      secretKeys: 
      password: password
      username: username
  2. As you can see there are several issues releated to this spec:

What is the expected behavior?

Possibility to create a nificluster without syntax errors :)

What do you see instead?

an incorrect yaml file

Possible solution

what I suggested doing in point 4

NiFiKop version

v1.4.1-release

Golang version

go 1.19

Kubernetes version

Client Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.2", GitCommit:"f66044f4361b9f1f96f0053dd46cb7dce5e990a8", GitTreeState:"clean", BuildDate:"2022-06-15T14:22:29Z", GoVersion:"go1.18.3", Compiler:"gc", Platform:"linux/amd64"} Kustomize Version: v4.5.4 Server Version: version.Info{Major:"1", Minor:"26", GitVersion:"v1.26.8+rke2r1", GitCommit:"395f0a2fdc940aeb9ab88849e8fa4321decbf6e1", GitTreeState:"clean", BuildDate:"2023-08-24T15:33:01Z", GoVersion:"go1.20.7 X:boringcrypto", Compiler:"gc", Platform:"linux/amd64"}

NiFi version

1.17.0

Additional context

This issue is releate to this PR #278, I want to ask @O-Bezimo if he can correct the above issues

juldrixx commented 8 months ago

Should be fixed now. Thanks for raising the issue.

22RC commented 8 months ago

Thanks @juldrixx, when do you plan to release this fix? For the moment is critical to our release path.

juldrixx commented 8 months ago

We're going to fix a few more issues and I'll create a new version by the end of the week.