Skip to content

Commit f608212

Browse files
committed
add specified latest tag, add operatorMasterImage.yaml, fix makefile, update docs
1 parent f972a52 commit f608212

File tree

5 files changed

+55
-4
lines changed

5 files changed

+55
-4
lines changed

Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -77,10 +77,17 @@ cluster/cleanup: operator/stop
7777
-kubectl delete deployment grafana-deployment -n ${NAMESPACE}
7878
-kubectl delete namespace ${NAMESPACE}
7979

80+
## Deploy the latest tagged release
8081
.PHONY: operator/deploy
8182
operator/deploy: cluster/prepare/local
8283
kubectl apply -f deploy/operator.yaml -n ${NAMESPACE}
83-
@git checkout -- .
84+
@git checkout -- deploy/cluster_roles/cluster_role_binding_grafana_operator.yaml
85+
86+
## Deploy the latest master image
87+
.PHONY: operator/deploy/master
88+
operator/deploy/master: cluster/prepare/local
89+
kubectl apply -f deploy/operatorMasterImage.yaml -n ${NAMESPACE}
90+
@git checkout -- deploy/cluster_roles/cluster_role_binding_grafana_operator.yaml
8491

8592
.PHONY: operator/stop
8693
operator/stop:

deploy/operator.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ spec:
1717
serviceAccountName: grafana-operator
1818
containers:
1919
- name: grafana-operator
20-
image: quay.io/integreatly/grafana-operator:latest
20+
image: quay.io/integreatly/grafana-operator:v3.5.0
2121
ports:
2222
- containerPort: 60000
2323
name: metrics

deploy/operatorMasterImage.yaml

+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
apiVersion: apps/v1
2+
kind: Deployment
3+
metadata:
4+
name: grafana-operator
5+
spec:
6+
replicas: 1
7+
selector:
8+
matchLabels:
9+
name: grafana-operator
10+
strategy:
11+
type: Recreate
12+
template:
13+
metadata:
14+
labels:
15+
name: grafana-operator
16+
spec:
17+
serviceAccountName: grafana-operator
18+
containers:
19+
- name: grafana-operator
20+
image: quay.io/integreatly/grafana-operator:master
21+
ports:
22+
- containerPort: 60000
23+
name: metrics
24+
command:
25+
- grafana-operator
26+
imagePullPolicy: Always
27+
env:
28+
- name: TEMPLATE_PATH
29+
value: /usr/local/bin/templates
30+
- name: WATCH_NAMESPACE
31+
valueFrom:
32+
fieldRef:
33+
fieldPath: metadata.namespace
34+
- name: POD_NAME
35+
valueFrom:
36+
fieldRef:
37+
fieldPath: metadata.name
38+
- name: OPERATOR_NAME
39+
value: "grafana-operator"

documentation/deploy_grafana.md

+6-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@ The first step is to install the Grafana operator to a namespace in your cluster
99
There are two options for this procedure, automated via Ansible, or manually running kubectl/oc commands.
1010

1111
### Deploy an example grafana instance and operator
12-
Run `make operator/deploy` This uses the default operator.yaml and Grafana.yaml resources found in the `deploy` directories and subdirectories.
12+
13+
Run `make operator/deploy` To deploy the latest released image of the operator, This uses the default operator.yaml and Grafana.yaml resources found in the `deploy` directories and subdirectories.
14+
15+
***Warning:*** The following make recipe uses the latest master Image. It should only be used for testing, for production please use the tagged releases.
16+
17+
Run `make operator/deploy/master` to deploy the image from the master branch of the operator.
1318

1419
### Automated Procedure
1520

0 commit comments

Comments
 (0)