diff --git a/CHANGELOG.md b/CHANGELOG.md index dd91c6aa8..24676208e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,12 @@ ### Fixed Bugs -- [PR #156](https://github.com/Orange-OpenSource/nifikop/pull/156) - **[Helm chart]** Operator metrics port configuration +## v0.7.3 + +### Fixed Bugs + +- [PR #156](https://github.com/Orange-OpenSource/nifikop/pull/156) - **[Helm chart]** Operator metrics port configuration. +- [PR #157](https://github.com/Orange-OpenSource/nifikop/pull/157) - **[Operator/NiFiParameterContext]** Support optional parametere context and empty slice. ## v0.7.2 diff --git a/config/manager/manager.yaml b/config/manager/manager.yaml index 894b86173..cb9a58712 100644 --- a/config/manager/manager.yaml +++ b/config/manager/manager.yaml @@ -29,7 +29,7 @@ spec: - /manager args: - --leader-elect - image: orangeopensource/nifikop:v0.7.2-release + image: orangeopensource/nifikop:v0.7.3-release name: nifikop securityContext: allowPrivilegeEscalation: false diff --git a/controllers/nifidataflow_controller.go b/controllers/nifidataflow_controller.go index 7c0b23bd9..cd3b52541 100644 --- a/controllers/nifidataflow_controller.go +++ b/controllers/nifidataflow_controller.go @@ -158,17 +158,23 @@ func (r *NifiDataflowReconciler) Reconcile(ctx context.Context, req ctrl.Request } // Check if cluster references are the same + var clusterRefs []v1alpha1.ClusterReference + registryClusterRef := registryClient.Spec.ClusterRef registryClusterRef.Namespace = registryClientNamespace + clusterRefs = append(clusterRefs, registryClusterRef) - parameterContextClusterRef := parameterContext.Spec.ClusterRef - parameterContextClusterRef.Namespace = parameterContextNamespace + if parameterContext !=nil { + parameterContextClusterRef := parameterContext.Spec.ClusterRef + parameterContextClusterRef.Namespace = parameterContextNamespace + clusterRefs = append(clusterRefs, parameterContextClusterRef) + } currentClusterRef := current.Spec.ClusterRef currentClusterRef.Namespace = GetClusterRefNamespace(current.Namespace, current.Spec.ClusterRef) + clusterRefs = append(clusterRefs, currentClusterRef) - if !v1alpha1.ClusterRefsEquals( - []v1alpha1.ClusterReference{registryClusterRef, parameterContextClusterRef, currentClusterRef}) { + if !v1alpha1.ClusterRefsEquals(clusterRefs) { r.Recorder.Event(instance, corev1.EventTypeWarning, "ReferenceClusterError", fmt.Sprintf("Failed to lookup reference cluster : %s in %s", diff --git a/go.mod b/go.mod index 74f6a5447..1634b6398 100644 --- a/go.mod +++ b/go.mod @@ -7,7 +7,7 @@ require ( github.com/antihax/optional v1.0.0 github.com/banzaicloud/k8s-objectmatcher v1.4.1 github.com/dgrijalva/jwt-go v3.2.0+incompatible - github.com/erdrix/nigoapi v0.0.0-20211026131235-b258e0b217af + github.com/erdrix/nigoapi v0.0.0-20211112150537-d8047033a68a github.com/go-logr/logr v0.3.0 github.com/imdario/mergo v0.3.10 github.com/jarcoal/httpmock v1.0.6 diff --git a/go.sum b/go.sum index a77db4f39..1039c57a8 100644 --- a/go.sum +++ b/go.sum @@ -161,16 +161,8 @@ github.com/emicklei/go-restful v0.0.0-20170410110728-ff4f55a20633/go.mod h1:otzb github.com/emicklei/go-restful v2.9.5+incompatible/go.mod h1:otzb+WCGbkyDHkqmQmT5YD2WR4BBwUdeQoFo8l/7tVs= github.com/envoyproxy/go-control-plane v0.9.1-0.20191026205805-5f8ba28d4473/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= github.com/envoyproxy/protoc-gen-validate v0.1.0/go.mod h1:iSmxcyjqTsJpI2R4NaDN7+kN2VEUnK/pcBlmesArF7c= -github.com/erdrix/nigoapi v0.0.0-20210420154406-e2cc6c207bc8 h1:i8dQxETjo7Dn+lkstq/0BwnQxhbuT63jrQNtvul1naI= -github.com/erdrix/nigoapi v0.0.0-20210420154406-e2cc6c207bc8/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= -github.com/erdrix/nigoapi v0.0.0-20211026102428-b2c05eaea34d h1:MZ+ZpxaWLA3kCt1T3KZPpN6TRrebDksfDhm8p2Qjvy8= -github.com/erdrix/nigoapi v0.0.0-20211026102428-b2c05eaea34d/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= -github.com/erdrix/nigoapi v0.0.0-20211026105001-8b40a035361c h1:/oOkNDKFoBcdNbEaI0VNsIjR/znibLb8zXl8AtSzjHg= -github.com/erdrix/nigoapi v0.0.0-20211026105001-8b40a035361c/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= -github.com/erdrix/nigoapi v0.0.0-20211026110358-9bf3bfa29e46 h1:KshP0euoy8R3aVWgjJg0Zuk0TsO4Lbt/k/FvfVQneTo= -github.com/erdrix/nigoapi v0.0.0-20211026110358-9bf3bfa29e46/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= -github.com/erdrix/nigoapi v0.0.0-20211026131235-b258e0b217af h1:0t7jHTzu/UDzZqpgQKiCdQJ1JADPamrl2HMlWCuxRMQ= -github.com/erdrix/nigoapi v0.0.0-20211026131235-b258e0b217af/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= +github.com/erdrix/nigoapi v0.0.0-20211112150537-d8047033a68a h1:isV4zYi8OKvV7XK4tPDJQ+i383uDZ/wTqzjqAMu/FpM= +github.com/erdrix/nigoapi v0.0.0-20211112150537-d8047033a68a/go.mod h1:owY+8fs8YXnST3ENM+ulVllYjTbzGaqKA+Y7HHJ0lZA= github.com/evanphx/json-patch v4.2.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.5.0+incompatible/go.mod h1:50XU6AFN0ol/bzJsmQLiYLvXMP4fmwYFNcr97nuDLSk= github.com/evanphx/json-patch v4.9.0+incompatible h1:kLcOMZeuLAJvL2BPWLMIj5oaZQobrkAqrL+WFZwQses= diff --git a/helm/nifikop/Chart.yaml b/helm/nifikop/Chart.yaml index 0674e14cf..cdd4e5d55 100644 --- a/helm/nifikop/Chart.yaml +++ b/helm/nifikop/Chart.yaml @@ -4,8 +4,8 @@ name: nifikop home: https://github.com/Orange-OpenSource/nifikop sources: - https://github.com/Orange-OpenSource/nifikop -version: 0.7.2 -appVersion: 0.7.2-release +version: 0.7.3 +appVersion: 0.7.3-release icon: maintainers: - name: erdrix diff --git a/helm/nifikop/README.md b/helm/nifikop/README.md index 0beb3dcce..7aed9812d 100644 --- a/helm/nifikop/README.md +++ b/helm/nifikop/README.md @@ -23,7 +23,7 @@ The following tables lists the configurable parameters of the NiFi Operator Helm | Parameter | Description | Default | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- | | `image.repository` | Image | `orangeopensource/nifikop` | -| `image.tag` | Image tag | `v0.7.2-release` | +| `image.tag` | Image tag | `v0.7.3-release` | | `image.pullPolicy` | Image pull policy | `Always` | | `image.imagePullSecrets.enabled` | Enable tue use of secret for docker image | `false` | | `image.imagePullSecrets.name` | Name of the secret to connect to docker registry | - | diff --git a/helm/nifikop/values.yaml b/helm/nifikop/values.yaml index f60b3d0aa..92f6b2af6 100644 --- a/helm/nifikop/values.yaml +++ b/helm/nifikop/values.yaml @@ -2,7 +2,7 @@ ## image: repository: orangeopensource/nifikop - tag: v0.7.2-release + tag: v0.7.3-release pullPolicy: Always imagePullSecrets: enabled: false diff --git a/pkg/clientwrappers/parametercontext/parametercontext.go b/pkg/clientwrappers/parametercontext/parametercontext.go index 18995b1a8..b3733fef9 100644 --- a/pkg/clientwrappers/parametercontext/parametercontext.go +++ b/pkg/clientwrappers/parametercontext/parametercontext.go @@ -243,7 +243,7 @@ func updateParameterContextEntity(parameterContext *v1alpha1.NifiParameterContex entity.Component = &nigoapi.ParameterContextDto{} } - var parameters []nigoapi.ParameterEntity + parameters := make([]nigoapi.ParameterEntity, 0) for _, secret := range parameterSecrets { for k, v := range secret.Data { diff --git a/site/docs/2_setup/1_getting_started.md b/site/docs/2_setup/1_getting_started.md index 1446229a4..280541dd8 100644 --- a/site/docs/2_setup/1_getting_started.md +++ b/site/docs/2_setup/1_getting_started.md @@ -116,8 +116,8 @@ Now deploy the helm chart : helm install nifikop \ orange-incubator/nifikop \ --namespace=nifi \ - --version 0.7.2 \ - --set image.tag=v0.7.2-release \ + --version 0.7.3 \ + --set image.tag=v0.7.3-release \ --set resources.requests.memory=256Mi \ --set resources.requests.cpu=250m \ --set resources.limits.memory=256Mi \ diff --git a/site/docs/2_setup/3_install/1_customizable_install_with_helm.md b/site/docs/2_setup/3_install/1_customizable_install_with_helm.md index 6e5a97b78..fe8e68c2b 100644 --- a/site/docs/2_setup/3_install/1_customizable_install_with_helm.md +++ b/site/docs/2_setup/3_install/1_customizable_install_with_helm.md @@ -33,7 +33,7 @@ The following tables lists the configurable parameters of the NiFi Operator Helm | Parameter | Description | Default | | -------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | -------------------------- | | `image.repository` | Image | `orangeopensource/nifikop` | -| `image.tag` | Image tag | `v0.7.2-release` | +| `image.tag` | Image tag | `v0.7.3-release` | | `image.pullPolicy` | Image pull policy | `Always` | | `image.imagePullSecrets.enabled` | Enable tue use of secret for docker image | `false` | | `image.imagePullSecrets.name` | Name of the secret to connect to docker registry | - | diff --git a/version/version.go b/version/version.go index 4da9f0f20..2684b0e51 100644 --- a/version/version.go +++ b/version/version.go @@ -1,5 +1,5 @@ package version var ( - Version = "0.7.2" + Version = "0.7.3" )