Comments (6)
@jamalaitahmed I think you get this problem simply because you're not redefining settings for grafana
container, but, instead, you're adding a test
container, where, obviously, an image must be provided, because configuration for extra containers is passed to k8s without changes from the operator side.
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
labels:
dashboards: grafana
name: test
namespace: test
spec:
config:
auth:
disable_login_form: 'false'
log:
mode: console
deployment:
spec:
template:
spec:
containers:
- env:
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
key: GF_SECURITY_ADMIN_USER
name: test
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
key: GF_SECURITY_ADMIN_PASSWORD
name: test
name: grafana # FIX IS HERE
P.S. You can see grafana
container name in the example that @NissesSenap shared, so it's already documented.
from grafana-operator.
This is not a bug with GitOps, it's very possible to create a secret using sealed-secrets.
I use custom secrets for my grafana admin user, in my own setup and I have done it ever since version 5 was released.
The issue is that you can't set GF_SECURITY_ADMIN_USER
etc. without also setting the container image.
How to do that is documented here: https://grafana.github.io/grafana-operator/docs/examples/grafana_deployment/readme/
I would argue, this isn't a huge issue, since I recommend that everyone always set a custom version of the grafana image. The main reason behind this is that grafana-operator will never be in sync with upstream grafana and minor and patches are constantly getting released by grafana.
But this is definitely a bug, and it should be able to set env variables without also setting the grafana container image.
It's a problem in our merge logic for overwriting settings.
If anyone wants to help out with this, we would love a PR.
from grafana-operator.
@NissesSenap I just discovered that the operator creates a secret grafana-admin-credentials
even if I use a custom secret with credentials. Is this a normal behavior or bug? My current config looks like this:
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: grafana
labels:
dashboards: grafana
spec:
deployment:
spec:
template:
spec:
containers:
- name: grafana
env:
- name: GF_SECURITY_ADMIN_USER
valueFrom:
secretKeyRef:
name: grafana-admin-creds
key: admin_user
- name: GF_SECURITY_ADMIN_PASSWORD
valueFrom:
secretKeyRef:
name: grafana-admin-creds
key: admin_pass
---
apiVersion: v1
kind: Secret
type: Opaque
metadata:
name: grafana-admin-creds
stringData:
admin_user: "XXX"
admin_pass: "XXX"
from grafana-operator.
It's a known issue @RusMephist , I think we have an issue with it somewhere. It won't give you any issues, it's just ugly to my knowledge.
Have you seen any issues with it other then you get an extra secret?
from grafana-operator.
@NissesSenap
Nope, just an annoying extra secret)
from grafana-operator.
As this does not cause any issues and implementing checks for possible deployment overrides is a pretty involved topic, we'll close this issue for now. If this turns out to cause any problems for anyone in the future, feel free to reopen this issue
from grafana-operator.
Related Issues (20)
- GrafanaDashboard folder handling HOT 1
- [feature] instanceSelectors should be made immutable HOT 1
- GrafanaAlertRuleGroup: Link dashboard and panel HOT 1
- ClusterRole missing for grafanacontactpoints CR HOT 5
- [Bug] noDataState enum is missing KeepLast HOT 1
- something went wrong while collecting envs [Bug] HOT 1
- Support contact points with multiple receivers
- The secret "grafana_instance_sa_token_<hash>" should be created without the hash by the Grafana Operator HOT 1
- [Bug] Grafana dashboard don't work with configmap not located in same namespace as grafana HOT 2
- Keeping RBAC definitions in sync across deployment methods HOT 1
- Allow deployment labels to use "grafana-operator.labels" instead of just "grafana-operator-labels.selectorLabels" HOT 2
- [Bug] Notifier alertmanager is not supported
- avoid multiple logins of ldap users which is integrated to grafana HOT 1
- Incorrect image version in kustomize-cluster_scoped.yaml for 5.9.1 release HOT 1
- [Bug] CRDs not included in artifact pull for 5.9.1 release HOT 4
- [Bug] CRD description fields in all CRDs lost between 5.8.1 and 5.9.0 HOT 6
- [Bug] get version does not work with Azure Managed Grafana HOT 1
- Improve logging of resource sync HOT 1
- Allow installation of plugins from arbitrary URLs HOT 3
- [Bug] Deployment Reconcile only runs at startup HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-operator.