-
Bug
-
Resolution: Done
-
Undefined
-
None
-
False
-
False
-
NEW
-
OBSDA-7 - Adopting Loki as an alternative to Elasticsearch to support more lightweight, easier to manage/operate storage scenarios
-
VERIFIED
-
-
Logging (LogExp) - Sprint 214
I was following `Hacking on Loki Operator on OpenShift`
https://github.com/grafana/loki/blob/main/operator/docs/hack_loki_operator.md#hacking-on-loki-operator-on-openshift
and accidentally applied `hack/lokistack_dev.yaml` rather than `hack/lokistack_gateway_dev.yaml`.
I saw the following errors in the operator's log:
{"_ts":"2022-02-13T09:33:52.200433142Z","_level":"0","_component":"loki-operator","_message":"begin building manifests","event":"createOrUpdate","lokistack":{"Namespace":"openshift-logging","Name":"lokistack-dev"}} {"_ts":"2022-02-13T09:33:52.20103425Z","_level":"0","_component":"loki-operator","_message":"failed to build manifests","_error":{"cause":{"Name":"gateway-rbac.yaml","Err":{}},"msg":"failed to create loki gateway rbac configuration"},"event":"createOrUpdate","lokistack":{"Namespace":"openshift-logging","Name":"lokistack-dev"}} {"_ts":"2022-02-13T09:33:52.201098648Z","_level":"0","_component":"loki-operator_controller-runtime_manager_controller_lokistack","_message":"Reconciler error","_error":{"cause":{"Name":"gateway-rbac.yaml","Err":{}},"msg":"failed to create loki gateway rbac configuration"},"name":"lokistack-dev","namespace":"openshift-logging"}
and the inner error cause is empty:
{"cause":{"Name":"gateway-rbac.yaml","Err":{}}
When I debugged the operator in GoLand, the actual error is revealed:
template: gateway-rbac.yaml:1:16: executing "gateway-rbac.yaml" at <.Stack.Tenants.Mode>: nil pointer evaluating *v1beta1.TenantsSpec.Mode