Skip to content

feat: Integrate listener operator #784

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ All notable changes to this project will be documented in this file.
### Added

- Add rolling upgrade support for upgrades between NiFi 2 versions ([#771]).
- Added listener support for Nifi ([#784]).
- Adds new telemetry CLI arguments and environment variables ([#782]).
- Use `--file-log-max-files` (or `FILE_LOG_MAX_FILES`) to limit the number of log files kept.
- Use `--file-log-rotation-period` (or `FILE_LOG_ROTATION_PERIOD`) to configure the frequency of rotation.
Expand Down Expand Up @@ -40,6 +41,7 @@ All notable changes to this project will be documented in this file.
[#776]: https://github.com/stackabletech/nifi-operator/pull/776
[#782]: https://github.com/stackabletech/nifi-operator/pull/782
[#787]: https://github.com/stackabletech/nifi-operator/pull/787
[#784]: https://github.com/stackabletech/nifi-operator/pull/784
[#789]: https://github.com/stackabletech/nifi-operator/pull/789

## [25.3.0] - 2025-03-21
Expand Down
30 changes: 16 additions & 14 deletions deploy/helm/nifi-operator/crds/crds.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,6 @@ spec:
description: Allow all proxy hosts by turning off host header validation. See <https://github.com/stackabletech/docker-images/pull/694>
type: boolean
type: object
listenerClass:
default: cluster-internal
description: |-
This field controls which type of Service the Operator creates for this NifiCluster:

* cluster-internal: Use a ClusterIP service

* external-unstable: Use a NodePort service

This is a temporary solution with the goal to keep yaml manifests forward compatible. In the future, this setting will control which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) will be used to expose the service, and ListenerClass names will stay the same, allowing for a non-breaking change.
enum:
- cluster-internal
- external-unstable
type: string
sensitiveProperties:
description: These settings configure the encryption of sensitive properties in NiFi processors. NiFi supports encrypting sensitive properties in processors as they are written to disk. You can configure the encryption algorithm and the key to use. You can also let the operator generate an encryption key for you.
properties:
Expand Down Expand Up @@ -274,6 +260,14 @@ spec:
description: Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose the webserver.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down Expand Up @@ -761,6 +755,14 @@ spec:
description: Time period Pods have to gracefully shut down, e.g. `30m`, `1h` or `2d`. Consult the operator documentation for details.
nullable: true
type: string
listenerClass:
description: This field controls which [ListenerClass](https://docs.stackable.tech/home/nightly/listener-operator/listenerclass.html) is used to expose the webserver.
enum:
- cluster-internal
- external-unstable
- external-stable
nullable: true
type: string
logging:
default:
containers: {}
Expand Down
6 changes: 6 additions & 0 deletions deploy/helm/nifi-operator/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,12 @@ rules:
verbs:
- create
- patch
- apiGroups:
- listeners.stackable.tech
resources:
- listeners
verbs:
- get
- apiGroups:
- {{ include "operator.name" . }}.stackable.tech
resources:
Expand Down
17 changes: 6 additions & 11 deletions docs/modules/nifi/pages/usage_guide/listenerclass.adoc
Original file line number Diff line number Diff line change
@@ -1,19 +1,14 @@
= Service exposition with ListenerClasses
:description: Configure Apache NiFi service exposure with cluster-internal or external-unstable listener classes.

Apache NiFi offers a web UI and an API.
The Operator deploys a service called `<name>` (where `<name>` is the name of the NifiCluster) through which NiFi can be reached.

This service can have either the `cluster-internal` or `external-unstable` type.
`external-stable` is not supported for NiFi at the moment.
Read more about the types in the xref:concepts:service-exposition.adoc[service exposition] documentation at platform level.

This is how the listener class is configured:
The operator deploys a xref:listener-operator:listener.adoc[Listener] for the Node pod.
The listener defaults to only being accessible from within the Kubernetes cluster, but this can be changed by setting `.spec.nodes.config.listenerClass`:

[source,yaml]
----
spec:
clusterConfig:
listenerClass: cluster-internal # <1>
nodes:
config:
listenerClass: external-unstable # <1>
----
<1> The default `cluster-internal` setting.
<1> Specify one of `external-stable`, `external-unstable`, `cluster-internal` (the default setting is `cluster-internal`).
Loading