diff --git a/install/config-map.yaml b/install/config-map.yaml index 7d518c8..f5cc966 100644 --- a/install/config-map.yaml +++ b/install/config-map.yaml @@ -16,7 +16,7 @@ data: accessTokenExpirationCheck = true [security] - disable_initial_admin_creation = true + disable_initial_admin_creation = false cookie_secure = true cookie_samesite = lax diff --git a/install/configure-grafana.sh b/install/configure-grafana.sh index 81e5630..8f2f333 100644 --- a/install/configure-grafana.sh +++ b/install/configure-grafana.sh @@ -132,15 +132,15 @@ if [[ "${DRY_RUN}" == true ]]; then exit 0 fi +echo "Create config-map.yaml" +kubectl -n "${GRAFANA_NAMESPACE}" apply -f ./manifests/config-map.yaml + if [[ "${INSTALL_GRAFANA}" == true ]]; then echo "Installing grafana" kubectl -n "${GRAFANA_NAMESPACE}" apply -f ./manifests/grafana.yaml + #No need to patch grafana as it will already be installed with the plugin and config + exit 0 fi -echo "Applying config-map.yaml" - -kubectl -n "${GRAFANA_NAMESPACE}" apply -f ./manifests/config-map.yaml - echo "Patching deployment/grafana with patch-grafana.yaml" - kubectl -n "${GRAFANA_NAMESPACE}" patch --patch-file ./manifests/patch-grafana.yaml deployment/grafana diff --git a/install/grafana.yaml b/install/grafana.yaml index e57c5fc..144d486 100644 --- a/install/grafana.yaml +++ b/install/grafana.yaml @@ -32,6 +32,9 @@ spec: containers: - name: grafana image: docker.io/grafana/grafana:TEMPLATE_GRAFANA_VERSION + env: + - name: GF_INSTALL_PLUGINS + value: TEMPLATE_ESP_PLUGIN_SOURCE;sasesp-plugin,volkovlabs-image-panel imagePullPolicy: IfNotPresent ports: - containerPort: 3000 @@ -62,10 +65,17 @@ spec: volumeMounts: - mountPath: /var/lib/grafana name: grafana-pv + - mountPath: /etc/grafana/grafana.ini + name: grafana-config + subPath: grafana-uaa.ini volumes: - name: grafana-pv persistentVolumeClaim: claimName: grafana-pvc + - name: grafana-config + configMap: + defaultMode: 420 + name: grafana-ini --- kind: Service apiVersion: v1