Skip to content
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

Deployment not working #88

Closed
abergmeier opened this issue Dec 11, 2019 · 5 comments · Fixed by #89
Closed

Deployment not working #88

abergmeier opened this issue Dec 11, 2019 · 5 comments · Fixed by #89
Labels
bug Something isn't working

Comments

@abergmeier
Copy link

abergmeier commented Dec 11, 2019

Started changing Operator to 3.0.0 with new roles but now get:

{"level":"info","ts":1576064539.3801906,"logger":"action-runner","msg":"(    5)     FAILED create grafana deployment"}

Status is:

  message: >-
    Deployment.apps "grafana-deployment" is invalid:
    spec.template.spec.containers[0].volumeMounts[5].name: Not found:
    "configmap-grafana-ldap"

Seems strange that it would search for "configmap-grafana-ldap" and not "grafana-ldap" (<- the actual name).

@pb82
Copy link
Collaborator

pb82 commented Dec 11, 2019

I think i know what the problem is: https://github.com/integr8ly/grafana-operator/blob/master/pkg/controller/model/grafanaDeployment.go#L148

It's creating a volume for every configmap added to the Grafana CR, but it's using the wong name. (prefixed with secret instead of configmap).

I'll mark this as a bug and prepare a fix.

@pb82 pb82 added the bug Something isn't working label Dec 11, 2019
@pb82 pb82 closed this as completed in #89 Dec 12, 2019
@pb82
Copy link
Collaborator

pb82 commented Dec 12, 2019

@MastanaGuru
Copy link

@pb82 Still getting the error after upgrading to v3.0.1.

{"level":"info","ts":1577311955.4372697,"logger":"cmd","msg":"Go Version: go1.13.5"}

  | {"level":"info","ts":1577311955.4373195,"logger":"cmd","msg":"Go OS/Arch: linux/amd64"}
  | {"level":"info","ts":1577311955.4373262,"logger":"cmd","msg":"operator-sdk Version: v0.12.0"}
  | {"level":"info","ts":1577311955.437329,"logger":"cmd","msg":"operator Version: 3.0.0"}
  | {"level":"info","ts":1577311955.4375644,"logger":"leader","msg":"Trying to become the leader."}
  | {"level":"info","ts":1577311956.1987088,"logger":"leader","msg":"No pre-existing lock was found."}
  | {"level":"info","ts":1577311956.2021604,"logger":"leader","msg":"Became the leader."}
  | {"level":"info","ts":1577311956.9550147,"logger":"controller-runtime.metrics","msg":"metrics server is starting to listen","addr":"0.0.0.0:8080"}
  | {"level":"info","ts":1577311956.9552126,"logger":"cmd","msg":"Registering Components."}
  | {"level":"info","ts":1577311956.9555953,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafanadatasource-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311956.9557455,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311956.9558108,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311956.9558868,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311956.9559565,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311956.956016,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311956.9560761,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311957.7064276,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafana-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311957.7066247,"logger":"grafana-controller","msg":"added secondary watch for Route"}
  | {"level":"info","ts":1577311957.717427,"logger":"metrics","msg":"Metrics Service object created","Service.Name":"grafana-operator-metrics","Service.Namespace":"bcnc-monitoring"}
  | {"level":"info","ts":1577311957.71746,"logger":"cmd","msg":"Starting the Cmd."}
  | {"level":"info","ts":1577311958.4741461,"logger":"controller-runtime.controller","msg":"Starting EventSource","controller":"grafanadashboard-controller","source":"kind source: /, Kind="}
  | {"level":"info","ts":1577311958.4742575,"logger":"controller_grafanadashboard","msg":"Starting dashboard controller"}
  | {"level":"info","ts":1577311958.4743536,"logger":"controller-runtime.manager","msg":"starting metrics server","path":"/metrics"}
  | {"level":"info","ts":1577311958.6368072,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"grafanadashboard-controller"}
  | {"level":"info","ts":1577311958.7371724,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"grafanadashboard-controller","worker count":1}
  | {"level":"info","ts":1577311958.7744615,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"grafanadatasource-controller"}
  | {"level":"info","ts":1577311958.7744613,"logger":"controller-runtime.controller","msg":"Starting Controller","controller":"grafana-controller"}
  | {"level":"info","ts":1577311958.874607,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"grafanadatasource-controller","worker count":1}
  | {"level":"info","ts":1577311958.87467,"logger":"controller-runtime.controller","msg":"Starting workers","controller":"grafana-controller","worker count":1}
  | {"level":"info","ts":1577311958.9782884,"logger":"action-runner","msg":"( 0) SUCCESS create admin credentials secret"}
  | {"level":"info","ts":1577311958.9822037,"logger":"action-runner","msg":"( 1) SUCCESS create grafana service"}
  | {"level":"info","ts":1577311958.9864104,"logger":"action-runner","msg":"( 2) SUCCESS create grafana service account"}
  | {"level":"info","ts":1577311958.9891133,"logger":"action-runner","msg":"( 3) SUCCESS create grafana config"}
  | {"level":"info","ts":1577311958.991931,"logger":"action-runner","msg":"( 4) SUCCESS create grafanadatasource config"}
  | {"level":"info","ts":1577311958.9919534,"logger":"action-runner","msg":"( 5) SUCCESS plugins unchanged"}
  | {"level":"info","ts":1577311958.9948528,"logger":"action-runner","msg":"( 6) FAILED create grafana deployment"}
  | {"level":"info","ts":1577311959.1389256,"logger":"action-runner","msg":"( 0) SUCCESS update admin credentials secret"}
  | {"level":"info","ts":1577311959.1417875,"logger":"action-runner","msg":"( 1) SUCCESS update grafana service"}
  | {"level":"info","ts":1577311959.1432304,"logger":"action-runner","msg":"( 2) SUCCESS update grafana service account"}
  | {"level":"info","ts":1577311959.1453688,"logger":"action-runner","msg":"( 3) SUCCESS update grafana config"}
  | {"level":"info","ts":1577311959.1453881,"logger":"action-runner","msg":"( 4) SUCCESS plugins unchanged"}
  | {"level":"info","ts":1577311959.1467538,"logger":"action-runner","msg":"( 5) FAILED create grafana deployment"}
  | {"level":"info","ts":1577311959.1505737,"logger":"action-runner","msg":"( 0) SUCCESS update admin credentials secret"}
  | {"level":"info","ts":1577311959.1526132,"logger":"action-runner","msg":"( 1) SUCCESS update grafana service"}
  | {"level":"info","ts":1577311959.1539655,"logger":"action-runner","msg":"( 2) SUCCESS update grafana service account"}
  | {"level":"info","ts":1577311959.1553662,"logger":"action-runner","msg":"( 3) SUCCESS update grafana config"}
  | {"level":"info","ts":1577311959.1553843,"logger":"action-runner","msg":"( 4) SUCCESS plugins unchanged"}
  | {"level":"info","ts":1577311959.1566725,"logger":"action-runner","msg":"( 5) FAILED create grafana deployment"}
  | {"level":"info","ts":1577311968.474372,"logger":"controller_grafanadashboard","msg":"running periodic dashboard resync"}
  | {"level":"info","ts":1577311968.4744027,"logger":"controller_grafanadashboard","msg":"no grafana instance available"}

@MastanaGuru
Copy link

My bad, I was loading the secrets in the grafana resource object.

@abergmeier
Copy link
Author

This Operator has shown us great features and benefits.
Migrating however from 2 to 3 seems hard if not impossible.
So we are currently evaluating whether we fork this Operator in version 2 and apply all changes for 3 in a semantic way (e.g. increase schema version).
Honestly I think this should have been done in the first place. The whole point of CRD versioning is that you can do breaking changes without having to stop your cluster.

NissesSenap pushed a commit to NissesSenap/grafana-operator that referenced this issue Mar 14, 2023
* fix: remove command override from manifests
* feat: use ko in kuttl e2e test
NissesSenap pushed a commit that referenced this issue Mar 14, 2023
* fix: remove command override from manifests
* feat: use ko in kuttl e2e test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants