Custom Version and Images
It’s possible to overwrite the default Grafana image in multiple ways.
When applying a new Grafana
CR, if .spec.version
is absent, the operator will populate the field with the current default.
This prevents unplanned restarts of Grafana instances when the operator is upgraded and the default is updated.
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: versioned
spec:
version: 11.6.0 # grafana/grafana:11.6.0
config:
security:
admin_user: root
admin_password: secret
The .spec.version
field supports setting image names allowing the use of private registries or use alternate images.
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: custom-image
spec:
version: grafana/grafana-enterprise:12.2.0
config:
security:
admin_user: root
admin_password: secret
Additionally, it’s possible to lock images with sha256
hashes to ensure the same OCI Artifact is retrieved.
apiVersion: grafana.integreatly.org/v1beta1
kind: Grafana
metadata:
name: sha-locked
spec:
version: docker.io/grafana/grafana@sha256:b7fcb534f7b3512801bb3f4e658238846435804deb479d105b5cdc680847c272
config:
security:
admin_user: root
admin_password: secret