Open bugslifesolutions opened 2 years ago
https://github.com/konpyutaika/nifikop/blob/b9f6cec46568e1ea6a3243f9b0c0565ffea93050/api/v1alpha1/nificluster_types.go#L711
Seems to have a work-around via setting Spec.NifiControllerTemplate
to a value.
I'll give it a try...
The override worked as expected..
I0327 23:01:31.775293 1 trigger_controller.go:181] cert-manager/certificates-trigger "msg"="Certificate must be re-issued" "key"="nifi/tlsnifi.c2.bugslifesolutions.com" "message"="Issuing certificate as Secret does not contain a private key" "reason"="MissingData"
I0327 23:01:31.775286 1 conditions.go:201] Setting lastTransitionTime for Certificate "tlsnifi.c2.bugslifesolutions.com" condition "Ready" to 2022-03-27 23:01:31.775224688 +0000 UTC m=+17552.109900271
I0327 23:01:31.775427 1 conditions.go:201] Setting lastTransitionTime for Certificate "tlsnifi.c2.bugslifesolutions.com" condition "Issuing" to 2022-03-27 23:01:31.775418876 +0000 UTC m=+17552.110094455
I0327 23:01:32.196356 1 controller.go:161] cert-manager/certificates-readiness "msg"="re-queuing item due to optimistic locking on resource" "key"="nifi/tlsnifi.c2.bugslifesolutions.com" "error"="Operation cannot be fulfilled on certificates.cert-manager.io \"tlsnifi.c2.bugslifesolutions.com\": the object has been modified; please apply your changes to the latest version and try again"
I0327 23:01:32.196503 1 conditions.go:201] Setting lastTransitionTime for Certificate "tlsnifi.c2.bugslifesolutions.com" condition "Ready" to 2022-03-27 23:01:32.19649708 +0000 UTC m=+17552.531172641
I0327 23:01:37.111923 1 controller.go:161] cert-manager/certificates-key-manager "msg"="re-queuing item due to optimistic locking on resource" "key"="nifi/tlsnifi.c2.bugslifesolutions.com" "error"="Operation cannot be fulfilled on certificates.cert-manager.io \"tlsnifi.c2.bugslifesolutions.com\": the object has been modified; please apply your changes to the latest version and try again"
I0327 23:01:37.201653 1 conditions.go:261] Setting lastTransitionTime for CertificateRequest "tlsnifi.c2.bugslifesolutions.com-kq4qb" condition "Approved" to 2022-03-27 23:01:37.201638867 +0000 UTC m=+17557.536314430
I0327 23:01:37.273872 1 conditions.go:261] Setting lastTransitionTime for CertificateRequest "tlsnifi.c2.bugslifesolutions.com-kq4qb" condition "Ready" to 2022-03-27 23:01:37.273860197 +0000 UTC m=+17557.608535757
@bugslifesolutions how did you fix the problem?
@bugslifesolutions how did you fix the problem?
You can influence the identities that nifikop assigns to the controller (the identity for the operator itself) and nifi nodes via various NifiCluster
properties, all of which are documented here: https://konpyutaika.github.io/nifikop/docs/v1.9.0/5_references/1_nifi_cluster/
Sometimes the default template can result in invalid names (usually too long in my experience), so overriding these templates is how you fix that.
Specifically, see:
nifiControllerTemplate
nodeUserIdentityTemplate
Bug Report
What did you do?
namespaces
, but ran into permission errors on startup due to missing role bindings.You have to create the namespace before executing following command
HELM_EXPERIMENTAL_OCI=1 helm install nifikop \ oci://ghcr.io/konpyutaika/helm-charts/nifikop \ --namespace=${NAMESPACE} \ --version 0.10.0 \ --set image.tag=v0.10.0-release \ --set resources.requests.memory=256Mi \ --set resources.requests.cpu=250m \ --set resources.limits.memory=256Mi \ --set resources.limits.cpu=250m \ --set certManager.clusterScoped=true \ --set namespaces={"${NAMESPACE}"}
helm list NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
nifikop nifi 1 2022-03-27 17:53:38.599003529 +0000 UTC deployed nifikop-0.10.0 0.10.0-release
Applied letsencrypt staging issuer (catch all/no dns filter) - verified certificates were issued
Installed zookeeper - verified pods running
Applied NifiCluster manifest
What did you expect to see? A pod created for the NifiCluster.
What did you see instead? Under which circumstances? No pods were created for the NifiCluster and the status.state is
ClusterReconciling
:The Nifikop operator logs suggest the secrets aren't created appropriately:
The Cert-Manager pod logs indicate an issue with the
Domain
of the Nifikop tlsnifi-controller owned CertificateRequest:E0327 18:10:13.819600 1 sync.go:270] cert-manager/orders "msg"="failed to create Order resource due to bad request, marking Order as failed" "error"="400 urn:ietf:params:acme:error:rejectedIdentifier: Error creating new order :: Cannot issue for \"tlsnifi-controller\": Domain name needs at least one dot" "resource_kind"="Order" "resource_name"="tlsnifi-controller-hjpcs-2838947340" "resource_namespace"="nifi" "resource_version"="v1"
in context:
Here is the CertificateRequest:
Environment
nifikop version:
go version:
Client Version: version.Info{Major:"1", Minor:"22", GitVersion:"v1.22.2", GitCommit:"8b5a19147530eaac9476b0ab82980b4088bbc1b2", GitTreeState:"clean", BuildDate:"2021-09-15T21:38:50Z", GoVersion:"go1.16.8", Compiler:"gc", Platform:"linux/amd64"} Server Version: version.Info{Major:"1", Minor:"23", GitVersion:"v1.23.1", GitCommit:"86ec240af8cbd1b60bcc4c03c20da9b98005b92e", GitTreeState:"clean", BuildDate:"2021-12-16T11:34:54Z", GoVersion:"go1.17.5", Compiler:"gc", Platform:"linux/amd64"}
Kubernetes cluster kind:
NiFi version: apache/nifi:1.12.1
Possible Solution Suffix the auto-created controller Common Name/Domain with the NifiCluster's spec.listenersConfig.clusterDomain eg.
tlsnifi-controller.c2.bugslifesolutions.com
Pattern:<metadata.name>-controller.<listenersConfig.clusterDomain>
Additional context