Skip to content

Commit

Permalink
Merge branch 'master' into event_patch
Browse files Browse the repository at this point in the history
  • Loading branch information
Edvin N authored Nov 30, 2021
2 parents e22770a + b2e9438 commit d1c1cc0
Show file tree
Hide file tree
Showing 11 changed files with 57 additions and 336 deletions.
11 changes: 0 additions & 11 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -166,17 +166,6 @@ code/check: fmt vet
code/golangci-lint:
golangci-lint run ./...

.PHONY: cluster/prepare/local/file
cluster/prepare/local/file:
@sed -i "s/__NAMESPACE__/${NAMESPACE}/g" deploy/cluster_roles/cluster_role_binding_grafana_operator.yaml

.PHONY: cluster/prepare/local
cluster/prepare/local: cluster/prepare/local/file
-kubectl create namespace ${NAMESPACE}
kubectl apply -f deploy/roles -n ${NAMESPACE}
kubectl apply -f deploy/cluster_roles
kubectl apply -f deploy/examples/Grafana.yaml -n ${NAMESPACE}

# Find or download gen-crd-api-reference-docs
gen-crd-api-reference-docs:
ifeq (, $(shell which crdoc))
Expand Down
48 changes: 48 additions & 0 deletions PREPARE_RELEASE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Prepare for a new release

In this repo you will need to perfrom the following tasks manually

There is a lot of information on what is needed to manage OLM [compatible operators](https://redhat-connect.gitbook.io/certified-operator-guide/ocp-deployment/operator-metadata/creating-the-csv).

- Update `version/version.go` bumping the minor or patch version. Major versions shouldn't be released without discussion and approval of the maintainers!
- Update the `Makefile`
- Update `replaces` field in `config/manifests/bases/grafana-operator.clusterserviceversion.yaml`
- Update `CreatedAt` field in `config/manifests/bases/grafana-operator.clusterserviceversion.yaml`
You will have to asses when it's going to get merged and you will be able to do a release.
You should make sure it's the same date. If not you will have to change it
manually when creating PR:s to OLM.

# This is how the time syntax should look.
$ docker inspect quay.io/grafana-operator/grafana-operator:v4.0.2 |jq '.[0].Created'
"2021-11-22T10:34:12.173861869Z"
# 2021-11-22T10:34:12Z is enough
- Run `make bundle`
- Run `make bundle-kustomization KUSTOMIZE_TAG=v4.0.2` the KUSTOMIZE_TAG should match the new tag
- Create a PR and get it merged
- Create a new release with the new tag, make sure to compile release notes (github has an option to do this for you)

To update the OLM channels you will need to create a PR in the following repos:
You will need to sign your commits, and make sure they are squashed before submitting the PR, be aware that these repos also require you to sign certain open-source agreement documents as part of the CI-checks.

- [community operators](https://github.com/k8s-operatorhub/community-operators)
- [RedHat operators](https://github.com/redhat-openshift-ecosystem/community-operators-prod/tree/main/operators)

## Community operators

Create a new version of the operator under
[https://github.com/k8s-operatorhub/community-operators/tree/main/operators/grafana-operator](https://github.com/k8s-operatorhub/community-operators/tree/main/operators/grafana-operator)
that matches the new tag.

Copy the content of `bundle/manifests/` in the grafana-operator repo from the taged version.

Update `operators/grafana-operator/grafana-operator.package.yaml` with the new tag.

## RedHat operators

Create a new version of the operator under
[https://github.com/redhat-openshift-ecosystem/community-operators-prod/tree/main/operators/grafana-operator](https://github.com/redhat-openshift-ecosystem/community-operators-prod/tree/main/operators/grafana-operator)
that matches the new tag.

Copy the content of `bundle/manifests/` in the grafana-operator repo from the taged version.

Update `grafana-operator/grafana-operator.package.yaml` with the new tag.
5 changes: 3 additions & 2 deletions deploy/cluster_roles/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ To grant those permissions the following ClusterRole and ClusterRoleBinding need
Create the `ClusterRole`

```shell
kubectl create -f cluster_role_grafana_operator.yaml
kubectl create -f deploy/cluster_roles/cluster_role_grafana_operator.yaml
```

Create the `ClusterRoleBinding` for the `ServiceAccount/grafana-operator` in the given namespace
Expand All @@ -29,5 +29,6 @@ For a cluster administrator to allow other users to be able to deploy Grafana op

```shell
kubectl create -f cluster_role_aggregate_grafana_admin_edit.yaml
kubectl create -f cluster_role_aggregate_grafana_view.yaml
kubectl create -f deploy/cluster_roles/cluster_role_aggregate_grafana_admin_edit.yaml
kubectl create -f deploy/cluster_roles/cluster_role_aggregate_grafana_view.yaml
```
77 changes: 0 additions & 77 deletions deploy/cluster_roles/cluster_role_grafana_operator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,25 +4,6 @@ metadata:
creationTimestamp: null
name: grafana-operator
rules:
- apiGroups:
- ""
resources:
- pods
- services
- endpoints
- persistentvolumeclaims
- configmaps
- secrets
- serviceaccounts
- configmaps
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
- apiGroups:
- ""
resources:
Expand All @@ -35,54 +16,9 @@ rules:
- delete
- update
- patch
- apiGroups:
- apps
resources:
- deployments
- deployments/finalizers
- daemonsets
- replicasets
- statefulsets
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
- apiGroups:
- route.openshift.io
resources:
- routes
- routes/custom-host
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
- create
- apiGroups:
- extensions
resources:
- ingresses
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
- apiGroups:
- integreatly.org
resources:
- grafanas
- grafanas/status
- grafanas/finalizers
- grafanadashboards
- grafanadatasources
- grafanadatasources/status
Expand All @@ -94,16 +30,3 @@ rules:
- delete
- deletecollection
- watch
- apiGroups:
- networking.k8s.io
resources:
- ingresses
verbs:
- get
- list
- create
- update
- delete
- deletecollection
- watch
- create
37 changes: 0 additions & 37 deletions deploy/operator.yaml

This file was deleted.

96 changes: 0 additions & 96 deletions deploy/role.yaml

This file was deleted.

Loading

0 comments on commit d1c1cc0

Please sign in to comment.