Skip to content
This repository has been archived by the owner on Feb 12, 2024. It is now read-only.

Ability to include additional libraries in the Nifi containers #5

Closed
banzo opened this issue Aug 6, 2019 · 6 comments
Closed

Ability to include additional libraries in the Nifi containers #5

banzo opened this issue Aug 6, 2019 · 6 comments
Assignees
Labels
enhancement New feature or request

Comments

@banzo
Copy link
Contributor

banzo commented Aug 6, 2019

Database processors need database drivers libraries in the Nifi containers.

The current hack is:

wget https://jdbc.postgresql.org/download/postgresql-42.2.6.jar
kubectl cp ./postgresql-42.2.6.jar fadi/fadi-nifi-0:/opt/nifi/postgresql-42.2.6.jar
rm postgresql-42.2.6.jar

It would be nice to be able to specify a list of libraries that would be downloaded and put in nifi_home/lib as an additional option.

@banzo banzo added the enhancement New feature or request label Aug 6, 2019
@alexnuttinck
Copy link
Contributor

Sure, it would be nice.

Another solution is to create and publish a new Docker image from apache/nifi with these librairies. Than, you can use this image in the Helm Chart. Adding preloaded workflow would be nice too!

I will look how it can be achieved with helm.

@alexnuttinck
Copy link
Contributor

I propose to use a postStart as explained here: https://kubernetes.io/docs/tasks/configure-pod-container/attach-handler-lifecycle-event/

We will have something like:

lifecycle:
  postStart:
    exec:
      command: ["/bin/sh", "-c", "your command to add the lib to the container"]

If you have a better idea, don't hesitate.

@alexnuttinck alexnuttinck self-assigned this Aug 27, 2019
@LeeByungwoo
Copy link

LeeByungwoo commented Aug 27, 2019

I'm having the same issue

https://github.com/compose-ex/nifi-compose-bundle <- this library

How do I solve this which should not be the above method?

@alexnuttinck
Copy link
Contributor

The feature is present in Chart v0.1.6 now.

@LeeByungwoo I think you should publish your artefact, then you can make a wget in the folder you want. See the postStart from values.yaml for an example.

I close this issue, but don't hesitate to open a new one.

@terence-bigtt
Copy link

terence-bigtt commented Aug 27, 2019 via email

@alexnuttinck
Copy link
Contributor

@terence-bigtt yes, we could have an extra volumeMount to give the possibility to create other volume mounts , something like this:

          volumeMounts:
          {{- range .Values.extraVolumeMounts }}
            - name: {{ .name }}
              mountPath: {{ .mountPath }}
              subPath: {{ .subPath | default "" }}
          {{- end }}

      volumes:
      {{- range .Values.extraVolumeMounts }}
        - name: {{ .name }}
          persistentVolumeClaim:
            claimName: {{ .existingClaim }}
      {{- end }}

for the values.yaml

# Defines additional volume mounts.
extraVolumeMounts: []
  # - name: extra-volume
  #   mountPath: /mnt/volume
  #   existingClaim: volume-claim

banzo added a commit to cetic/fadi that referenced this issue Aug 27, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants