Created
October 10, 2019 07:58
-
-
Save kanedafromparis/5b5b22889ca4673a06e70295108be4fd to your computer and use it in GitHub Desktop.
Create operator grafana (exemple)
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
oc get packagemanifests -n openshift-marketplace | grep grafana | |
oc create -f CatalogSourceConfig.yaml | |
-- | |
apiVersion: operators.coreos.com/v1 | |
kind: CatalogSourceConfig | |
metadata: | |
name: test-cas-grafana-operator-csc | |
namespace: openshift-marketplace | |
spec: | |
csDisplayName: Community Operators | |
csPublisher: Community | |
packages: grafana-operator | |
targetNamespace: test-create-grafana-operator-template-001 | |
-- | |
oc create -f operatorgroup-grafana-template.yaml | |
-- | |
apiVersion: operators.coreos.com/v1 | |
kind: OperatorGroup | |
metadata: | |
name: operatorgroup-grafana | |
namespace: test-create-grafana-operator-template-001 | |
spec: | |
targetNamespaces: | |
- test-create-grafana-operator-template-001 | |
-- | |
oc create -f subscription-grafana-template.yaml | |
-- | |
apiVersion: operators.coreos.com/v1alpha1 | |
kind: Subscription | |
metadata: | |
generation: 1 | |
labels: | |
csc-owner-name: installed-community-team1-app-monitoring | |
csc-owner-namespace: openshift-marketplace | |
name: grafana-operator | |
namespace: test-create-grafana-operator-template-001 | |
spec: | |
channel: alpha | |
installPlanApproval: Automatic | |
name: grafana-operator | |
# from oc get catalogsource.operators.coreos.com | |
source: test-cas-grafana-operator-csc | |
sourceNamespace: test-create-grafana-operator-template-001 | |
startingCSV: grafana-operator.v1.3.0 | |
-- | |
oc create -f grafana-example-grafana.yaml | |
-- | |
metadata: | |
name: example-grafana | |
namespace: test-create-grafana-operator-template-001 | |
spec: | |
config: | |
auth: | |
disable_signout_menu: true | |
auth.anonymous: | |
enabled: true | |
log: | |
level: warn | |
mode: console | |
security: | |
admin_password: secret | |
admin_user: root | |
dashboardLabelSelector: | |
- matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- grafana | |
-- | |
oc create -f simple-dashboard.yaml | |
-- | |
metadata: | |
labels: | |
app: grafana | |
name: simple-dashboard | |
namespace: team1-app-monitoring | |
spec: | |
json: | | |
{ | |
"id": null, | |
"title": "Simple Dashboard", | |
"tags": [], | |
"style": "dark", | |
"timezone": "browser", | |
"editable": true, | |
"hideControls": false, | |
"graphTooltip": 1, | |
"panels": [], | |
"time": { | |
"from": "now-6h", | |
"to": "now" | |
}, | |
"timepicker": { | |
"time_options": [], | |
"refresh_intervals": [] | |
}, | |
"templating": { | |
"list": [] | |
}, | |
"annotations": { | |
"list": [] | |
}, | |
"refresh": "5s", | |
"schemaVersion": 17, | |
"version": 0, | |
"links": [] | |
} | |
name: simple-dashboard.json | |
-- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment