Skip to content

Commit

Permalink
nifi bundle for 23.4 (#467)
Browse files Browse the repository at this point in the history
# Description

Bundle files for the 23.4 release of the nifi operator.

Subset of tests on Openshift 4.11:

```
--- PASS: kuttl (2349.29s)
    --- PASS: kuttl/harness (0.00s)
        --- PASS: kuttl/harness/logging_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0 (170.64s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0_listener-class-cluster-internal (212.87s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0_listener-class-cluster-internal (216.18s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0_listener-class-external-unstable (231.85s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0_listener-class-external-unstable (234.57s)
        --- PASS: kuttl/harness/ldap_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0_ldap-use-tls-false_openshift-true (233.47s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0_listener-class-external-unstable (265.58s)
        --- PASS: kuttl/harness/smoke_zookeeper-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0_listener-class-cluster-internal (266.92s)
        --- PASS: kuttl/harness/orphaned_resources_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0 (163.94s)
        --- PASS: kuttl/harness/upgrade_zookeeper-latest-3.8.0-stackable23.4.0_nifi_old-1.16.3-stackable23.4.0_nifi_new-1.18.0-stackable23.4.0 (374.44s)
        --- PASS: kuttl/harness/orphaned_resources_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0 (175.10s)
        --- PASS: kuttl/harness/resources_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0 (47.35s)
        --- PASS: kuttl/harness/orphaned_resources_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0 (174.07s)
        --- PASS: kuttl/harness/ldap_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0_ldap-use-tls-true_openshift-true (213.16s)
        --- PASS: kuttl/harness/ldap_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0_ldap-use-tls-true_openshift-true (210.25s)
        --- PASS: kuttl/harness/cluster_operation_zookeeper-latest-3.8.0-stackable23.4.0_nifi-latest-1.18.0-stackable23.4.0 (278.90s)
        --- PASS: kuttl/harness/ldap_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0_ldap-use-tls-false_openshift-true (212.15s)
        --- PASS: kuttl/harness/ldap_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0_ldap-use-tls-true_openshift-true (219.84s)
        --- PASS: kuttl/harness/resources_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0 (78.56s)
        --- PASS: kuttl/harness/resources_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0 (39.59s)
        --- PASS: kuttl/harness/ldap_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.15.3-stackable23.4.0_ldap-use-tls-false_openshift-true (228.03s)
        --- PASS: kuttl/harness/logging_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.18.0-stackable23.4.0 (145.09s)
        --- PASS: kuttl/harness/logging_zookeeper-latest-3.8.0-stackable23.4.0_nifi-1.16.3-stackable23.4.0 (166.40s)

```



Co-authored-by: Razvan-Daniel Mihai <84674+razvan@users.noreply.github.com>
  • Loading branch information
adwk67 and razvan committed May 4, 2023
1 parent ca4b83e commit bc014a4
Show file tree
Hide file tree
Showing 8 changed files with 3,348 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,7 @@ crate-hashes.json
result
image.tar

tilt_options.json
tilt_options.json

**/bundle/
**/bundle.Dockerfile
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

- Added support for NiFi versions 1.20.0 and 1.21.0 ([#464]).
- Generate OLM bundle for Release 23.4.0 ([#467]).

### Changed

Expand All @@ -23,6 +24,7 @@ All notable changes to this project will be documented in this file.
[#463]: https://github.com/stackabletech/nifi-operator/pull/463
[#464]: https://github.com/stackabletech/nifi-operator/pull/464
[#466]: https://github.com/stackabletech/nifi-operator/pull/466
[#467]: https://github.com/stackabletech/nifi-operator/pull/467

## [23.4.0] - 2023-04-17

Expand Down
17 changes: 17 additions & 0 deletions deploy/olm/23.4.0/manifests/configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
---
apiVersion: v1
data:
properties.yaml: |
---
version: 0.1.0
spec:
units: []
properties: []
kind: ConfigMap
metadata:
name: nifi-operator-configmap
labels:
app.kubernetes.io/name: nifi-operator
app.kubernetes.io/instance: nifi-operator
app.kubernetes.io/version: "23.4.0"
3,026 changes: 3,026 additions & 0 deletions deploy/olm/23.4.0/manifests/nificluster.yaml

Large diffs are not rendered by default.

28 changes: 28 additions & 0 deletions deploy/olm/23.4.0/manifests/roles.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
---
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
name: nifi-clusterrole
rules:
- apiGroups:
- ""
resources:
- configmaps
- secrets
- serviceaccounts
verbs:
- get
- apiGroups:
- events.k8s.io
resources:
- events
verbs:
- create
- apiGroups:
- security.openshift.io
resources:
- securitycontextconstraints
resourceNames:
- stackable-products-scc
verbs:
- use
Original file line number Diff line number Diff line change
@@ -0,0 +1,228 @@
---
apiVersion: operators.coreos.com/v1alpha1
kind: ClusterServiceVersion
metadata:
name: nifi-operator.v23.4.0
spec:
annotations:
support: stackable.tech
olm.properties: '[]'
categories: Storage
capabilities: Full Lifecycle
description: Stackable Operator for Apache Nifi
repository: https://github.com/stackabletech/nifi-operator
containerImage: docker.stackable.tech/stackable/nifi-operator:23.4.0

displayName: Stackable Operator for Apache Nifi
description: |-
This is a Kubernetes operator to manage [Apache Nifi](https://nifi.apache.org/) ensembles. The Stackable Apache Nifi Operator
is part of the Stackable Data Platform, a curated selection of the best open source data apps like Kafka, Druid, Trino or Spark, all
working together seamlessly. Based on Kubernetes, it runs everywhere – on prem or in the cloud.
You can install the operator using [stackablectl or helm](https://docs.stackable.tech/nifi/stable/getting_started/installation.html).
See it in action in one of our [demos](https://stackable.tech/en/demos/) or follow this
[tutorial](https://docs.stackable.tech/nifi/stable/getting_started/first_steps.html).
N.B. this operator requires the following Stackable internal operators to be installed as well:
- [Commons Operator](https://github.com/stackabletech/commons-operator)
- [Secret Operator](https://github.com/stackabletech/secret-operator)
keywords:
- nifi
maintainers:
- email: info@stackable.tech
name: Stackable GmbH
maturity: stable
provider:
name: Stackable GmbH
url: https://stackable.tech
version: 23.4.0
minKubeVersion: 1.23.0

installModes:
- supported: true
type: OwnNamespace
- supported: true
type: SingleNamespace
- supported: false
type: MultiNamespace
- supported: false
type: AllNamespaces

customresourcedefinitions:
owned:
# a list of CRDs that this operator owns
# name is the metadata.name of the CRD (which is of the form <plural>.<group>)
- name: nificlusters.nifi.stackable.tech
# version is the spec.versions[].name value defined in the CRD
version: v1alpha1
# kind is the CamelCased singular value defined in spec.names.kind of the CRD.
kind: NifiCluster
# human-friendly display name of the CRD for rendering in graphical consoles (optional)
displayName: Apache Nifi Cluster
# a short description of the CRDs purpose for rendering in graphical consoles (optional)
description: Represents a Nifi Cluster

relatedImages:
- name: nifi-operator
image: docker.stackable.tech/stackable/nifi-operator:23.4.0
install:
# strategy indicates what type of deployment artifacts are used
strategy: deployment
# spec for the deployment strategy is a list of deployment specs and required permissions - similar to a pod template used in a deployment
spec:
permissions:
- serviceAccountName: nifi-operator
rules:
- apiGroups:
- ""
resources:
- pods
verbs:
- '*'
# permissions required at the cluster scope
clusterPermissions:
- serviceAccountName: nifi-operator
rules:
- apiGroups:
- ""
resources:
- nodes
verbs:
- list
- watch
- apiGroups:
- ""
resources:
- pods
- configmaps
- secrets
- services
- endpoints
- serviceaccounts
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- rolebindings
verbs:
- create
- delete
- get
- list
- patch
- update
- watch
- apiGroups:
- apps
resources:
- statefulsets
verbs:
- get
- create
- delete
- list
- patch
- update
- watch
- apiGroups:
- batch
resources:
- jobs
verbs:
- create
- get
- list
- patch
- update
- watch
- apiGroups:
- apiextensions.k8s.io
resources:
- customresourcedefinitions
verbs:
- get
- apiGroups:
- events.k8s.io
resources:
- events
verbs:
- create
- apiGroups:
- nifi.stackable.tech
resources:
- nificlusters
verbs:
- get
- list
- patch
- watch
- apiGroups:
- nifi.stackable.tech
resources:
- nificlusters/status
verbs:
- patch
- apiGroups:
- authentication.stackable.tech
resources:
- authenticationclasses
verbs:
- get
- list
- watch
- apiGroups:
- rbac.authorization.k8s.io
resources:
- clusterroles
verbs:
- bind
resourceNames:
- nifi-clusterrole
- apiGroups:
- security.openshift.io
resources:
- securitycontextconstraints
resourceNames:
- hostmount-anyuid
verbs:
- use

deployments:
- name: nifi-operator
spec:
replicas: 1
strategy:
type: Recreate
selector:
matchLabels:
app.kubernetes.io/name: nifi-operator
app.kubernetes.io/instance: nifi-operator
template:
metadata:
labels:
app.kubernetes.io/name: nifi-operator
app.kubernetes.io/instance: nifi-operator
spec:
serviceAccountName: nifi-operator
securityContext: {}
containers:
- name: nifi-operator
securityContext: {}
image: docker.stackable.tech/stackable/nifi-operator:23.4.0
imagePullPolicy: IfNotPresent
resources: {}
volumeMounts:
- mountPath: /etc/stackable/nifi-operator/config-spec
name: config-spec
volumes:
- name: config-spec
configMap:
name: nifi-operator-configmap
10 changes: 10 additions & 0 deletions deploy/olm/23.4.0/metadata/dependencies.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
---
dependencies:
- type: olm.package
value:
packageName: commons-operator-package
version: "23.4.0"
- type: olm.package
value:
packageName: secret-operator-package
version: "23.4.0"
33 changes: 33 additions & 0 deletions deploy/olm/bundle.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
#!/usr/bin/env bash
# usage: bundle.sh <release>, called from base folder:
# e.g. ./deploy/olm/bundle.sh 23.1.0

set -euo pipefail
set -x

OPERATOR_NAME="nifi-operator"

bundle-clean() {
rm -rf "deploy/olm/${VERSION}/bundle"
rm -rf "deploy/olm/${VERSION}/bundle.Dockerfile"
}


build-bundle() {
opm alpha bundle generate --directory manifests --package "${OPERATOR_NAME}-package" --output-dir bundle --channels stable --default stable
cp metadata/*.yaml bundle/metadata/
docker build -t "docker.stackable.tech/stackable/${OPERATOR_NAME}-bundle:${VERSION}" -f bundle.Dockerfile .
docker push "docker.stackable.tech/stackable/${OPERATOR_NAME}-bundle:${VERSION}"
opm alpha bundle validate --tag "docker.stackable.tech/stackable/${OPERATOR_NAME}-bundle:${VERSION}" --image-builder docker
}

main() {
VERSION="$1";

pushd "deploy/olm/${VERSION}"
bundle-clean
build-bundle
popd
}

main "$@"

0 comments on commit bc014a4

Please sign in to comment.