-
Notifications
You must be signed in to change notification settings - Fork 158
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Update for Grafana v5 from non-maintained v4 * Update apiVersion for Grafana * Change boolean types to string * Fix kind name * Use new instanceSelector * Change datasources to datasource * Update for new SA * Remove unused name field * Update sync-waves * Patch env into the right spot * Fix service name in route * Modify route object * Use grafana-proxy for secret name * Add back route configuration * Fix route name * Fix SA name * Change to ClusterRoleBinding * Change back to RoleBinding * Fix service account reference in proxy * Update user example patches
- Loading branch information
Showing
13 changed files
with
151 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,74 +1,101 @@ | ||
apiVersion: integreatly.org/v1alpha1 | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: Grafana | ||
metadata: | ||
annotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
argocd.argoproj.io/sync-wave: "1" | ||
name: grafana | ||
labels: | ||
instance: "grafana" | ||
spec: | ||
serviceAccount: | ||
metadata: | ||
annotations: | ||
serviceaccounts.openshift.io/oauth-redirectreference.primary: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"grafana-route"}}' | ||
route: | ||
spec: | ||
port: | ||
targetPort: https | ||
tls: | ||
termination: reencrypt | ||
to: | ||
kind: Service | ||
name: grafana-service | ||
weight: 100 | ||
wildcardPolicy: None | ||
deployment: | ||
spec: | ||
template: | ||
spec: | ||
volumes: | ||
- name: grafana-tls | ||
secret: | ||
secretName: grafana-tls | ||
- name: grafana-proxy | ||
secret: | ||
secretName: grafana-proxy | ||
- name: ocp-injected-certs | ||
configMap: | ||
name: ocp-injected-certs | ||
containers: | ||
- args: | ||
- '-provider=openshift' | ||
- '-pass-basic-auth=false' | ||
- '-https-address=:9091' | ||
- '-http-address=' | ||
- '-email-domain=*' | ||
- '-upstream=http://localhost:3000' | ||
- '-openshift-sar={"resource": "namespaces", "verb": "get"}' | ||
- '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get"}}' | ||
- '-tls-cert=/etc/tls/private/tls.crt' | ||
- '-tls-key=/etc/tls/private/tls.key' | ||
- '-client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token' | ||
- '-cookie-secret-file=/etc/proxy/secrets/session_secret' | ||
- '-openshift-service-account=grafana-sa' | ||
- '-openshift-ca=/etc/pki/tls/cert.pem' | ||
- '-openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt' | ||
- '-openshift-ca=/etc/proxy/certs/ca-bundle.crt' | ||
- '-skip-auth-regex=^/metrics' | ||
image: 'quay.io/openshift/origin-oauth-proxy' | ||
name: grafana-proxy | ||
ports: | ||
- containerPort: 9091 | ||
name: https | ||
resources: { } | ||
volumeMounts: | ||
- mountPath: /etc/tls/private | ||
name: grafana-tls | ||
readOnly: false | ||
- mountPath: /etc/proxy/secrets | ||
name: grafana-proxy | ||
readOnly: false | ||
- mountPath: /etc/proxy/certs | ||
name: ocp-injected-certs | ||
readOnly: false | ||
service: | ||
metadata: | ||
annotations: | ||
service.beta.openshift.io/serving-cert-secret-name: grafana-tls | ||
spec: | ||
ports: | ||
- name: https | ||
port: 9091 | ||
protocol: TCP | ||
targetPort: https | ||
client: | ||
preferIngress: false | ||
config: | ||
log: | ||
mode: "console" | ||
level: "warn" | ||
auth.anonymous: | ||
enabled: "True" | ||
auth: | ||
disable_login_form: false | ||
disable_signout_menu: true | ||
disable_login_form: "False" | ||
disable_signout_menu: "True" | ||
auth.basic: | ||
enabled: true | ||
auth.anonymous: | ||
enabled: true | ||
containers: | ||
- env: | ||
- name: SAR | ||
value: '-openshift-sar={"resource": "namespaces", "verb": "get"}' | ||
args: | ||
- '-provider=openshift' | ||
- '-pass-basic-auth=false' | ||
- '-https-address=:9091' | ||
- '-http-address=' | ||
- '-email-domain=*' | ||
- '-upstream=http://localhost:3000' | ||
- "$(SAR)" | ||
- '-openshift-delegate-urls={"/": {"resource": "namespaces", "verb": "get"}}' | ||
- '-tls-cert=/etc/tls/private/tls.crt' | ||
- '-tls-key=/etc/tls/private/tls.key' | ||
- '-client-secret-file=/var/run/secrets/kubernetes.io/serviceaccount/token' | ||
- '-cookie-secret-file=/etc/proxy/secrets/session_secret' | ||
- '-openshift-service-account=grafana-serviceaccount' | ||
- '-openshift-ca=/etc/pki/tls/cert.pem' | ||
- '-openshift-ca=/var/run/secrets/kubernetes.io/serviceaccount/ca.crt' | ||
- '-skip-auth-regex=^/metrics' | ||
image: 'registry.redhat.io/openshift4/ose-oauth-proxy:v4.6' | ||
imagePullPolicy: Always | ||
name: grafana-proxy | ||
ports: | ||
- containerPort: 9091 | ||
name: grafana-proxy | ||
resources: {} | ||
volumeMounts: | ||
- mountPath: /etc/tls/private | ||
name: secret-grafana-k8s-tls | ||
readOnly: false | ||
- mountPath: /etc/proxy/secrets | ||
name: secret-grafana-k8s-proxy | ||
readOnly: false | ||
secrets: | ||
- grafana-k8s-tls | ||
- grafana-k8s-proxy | ||
service: | ||
ports: | ||
- name: grafana-proxy | ||
port: 9091 | ||
protocol: TCP | ||
targetPort: grafana-proxy | ||
annotations: | ||
service.alpha.openshift.io/serving-cert-secret-name: grafana-k8s-tls | ||
ingress: | ||
enabled: true | ||
targetPort: grafana-proxy | ||
termination: reencrypt | ||
client: | ||
preferService: true | ||
serviceAccount: | ||
annotations: | ||
serviceaccounts.openshift.io/oauth-redirectreference.primary: '{"kind":"OAuthRedirectReference","apiVersion":"v1","reference":{"kind":"Route","name":"grafana-route"}}' | ||
dashboardLabelSelector: | ||
- matchExpressions: | ||
- { key: "app", operator: In, values: ['grafana'] } | ||
enabled: "True" | ||
auth.proxy: | ||
enabled: "True" | ||
enable_login_token: "True" | ||
header_property: "username" | ||
header_name: "X-Forwarded-User" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
labels: | ||
config.openshift.io/inject-trusted-cabundle: "true" | ||
name: ocp-injected-certs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 0 additions & 6 deletions
6
grafana-operator/overlays/user-app-example/patch-cluster-monitoring-view.yaml
This file was deleted.
Oops, something went wrong.
3 changes: 0 additions & 3 deletions
3
grafana-operator/overlays/user-app-example/patch-grafana-sar.yaml
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,24 @@ | ||
apiVersion: integreatly.org/v1alpha1 | ||
kind: GrafanaDataSource | ||
apiVersion: grafana.integreatly.org/v1beta1 | ||
kind: GrafanaDatasource | ||
metadata: | ||
annotations: | ||
argocd.argoproj.io/sync-options: SkipDryRunOnMissingResource=true | ||
argocd.argoproj.io/sync-wave: "1" | ||
name: prometheus | ||
spec: | ||
datasources: | ||
- access: proxy | ||
editable: true | ||
isDefault: true | ||
jsonData: | ||
httpHeaderName1: 'Authorization' | ||
timeInterval: 5s | ||
tlsSkipVerify: true | ||
name: Prometheus | ||
secureJsonData: | ||
httpHeaderValue1: 'Bearer ${GRAFANA_TOKEN}' | ||
type: prometheus | ||
url: 'https://thanos-querier.openshift-monitoring.svc.cluster.local:9091' | ||
name: prometheus.yaml | ||
datasource: | ||
access: proxy | ||
editable: true | ||
isDefault: true | ||
jsonData: | ||
httpHeaderName1: 'Authorization' | ||
timeInterval: 5s | ||
tlsSkipVerify: true | ||
name: Prometheus | ||
secureJsonData: | ||
httpHeaderValue1: 'Bearer ${GRAFANA_TOKEN}' | ||
type: prometheus | ||
url: 'https://thanos-querier.openshift-monitoring.svc.cluster.local:9091' | ||
instanceSelector: | ||
matchLabels: | ||
instance: "grafana" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters