Skip to content

Commit

Permalink
MGDAPI-4863 CRO 0.42.0 release
Browse files Browse the repository at this point in the history
  • Loading branch information
MStokluska committed Nov 4, 2022
1 parent 5e905a6 commit e0b3882
Show file tree
Hide file tree
Showing 18 changed files with 891 additions and 22 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,12 @@ IMAGE_NAME ?= cloud-resource-operator
OPERATOR_IMG = $(IMAGE_REG)/$(IMAGE_ORG)/$(IMAGE_NAME):v$(VERSION)
MANIFEST_NAME ?= cloud-resources
NAMESPACE=cloud-resource-operator
PREV_VERSION=0.40.0
VERSION=0.41.0
PREV_VERSION=0.41.0
VERSION=0.42.0
COMPILE_TARGET=./tmp/_output/bin/$(IMAGE_NAME)
UPGRADE ?= true
CHANNEL ?= rhmi

PREVIOUS_OPERATOR_VERSIONS="0.39.0,0.38.0,0.37.1,0.37.0,0.36.0,0.35.2,0.35.1,0.35.0,0.34.0,0.33.0,0.32.1,0.32.0,0.31.0,0.30.0,0.29.0,0.28.0,0.27.1,0.27.0,0.26.0,0.25.0,0.24.1,0.24.0,0.23.0"

SHELL=/bin/bash

# If the _correct_ version of operator-sdk is on the path, use that (faster);
Expand Down Expand Up @@ -229,7 +227,7 @@ setup/moq:

.PHONY: create/olm/bundle
create/olm/bundle:
@PREV_VERSION=$(PREV_VERSION) PREVIOUS_OPERATOR_VERSIONS=$(PREVIOUS_OPERATOR_VERSIONS) ./scripts/create-olm-bundle.sh
@PREV_VERSION=$(PREV_VERSION) ./scripts/create-olm-bundle.sh

.PHONY: release/prepare
release/prepare: gen/csv image/push create/olm/bundle
Expand Down
9 changes: 1 addition & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ Cut a release on Github you need to be an [owner](OWNERS)

Update the operator version in the following files:

* Update `VERSION`, `PREV_VERSION` and `PREVIOUS_OPERATOR_VERSIONS` in the [Makefile](Makefile)
* Update `VERSION` and `PREV_VERSION` in the [Makefile](Makefile)

* Generate a new cluster service version:
```sh
Expand All @@ -190,17 +190,13 @@ make gen/csv
```sh
make create/olm/bundle
```
NOTE: Make sure that the `VERSION`, `PREV_VERSION` and `PREVIOUS_OPERATOR_VERSIONS` in the [Makefile](Makefile) are updated correctly.

* Generate and push new image, bundle and index
```sh
make release/prepare
```
NOTE: Make sure that the `VERSION`, `PREV_VERSION` and `PREVIOUS_OPERATOR_VERSIONS` in the [Makefile](Makefile) are updated correctly.

Example:
Starting image for the bundles is 0.23.0, if you are releasing version 0.24.0, ensure that the `PREV_VERSION` is set to `0.23.0`, `VERSION` is set to `0.24.0`
and `PREVIOUS_OPERATOR_VERSIONS` contain coma seperated list of all previous bundles, in this example it would contain only `0.23.0`.

### Deploy with OLM

Expand All @@ -213,7 +209,6 @@ To deploy a new development release through OLM, we need a bundle, index, and op

The [Makefile](Makefile) automates the creation and tagging of these images, but some of the variables should be adjusted first:
* `VERSION`: this should be set to the value for your development release - in this example we have set it to `10.0.0`
* `PREVIOUS_OPERATOR_VERSIONS`: this variable determines which bundles to include in the index. As we do not plan to upgrade to this version it can be set to an empty string
* `IMAGE_ORG`: this should be set to the quay organisation where the images will be pushed
* `UPGRADE`: set to `false` as this version will not replace a previous version

Expand Down Expand Up @@ -274,7 +269,6 @@ To perform a side-by-side upgrade of CRO through OLM, we must create bundle, ind
First you must checkout the code for the version you would like to upgrade from. For the purposes of this guide we assume that you are upgrading from a tagged previous release. However, if you would like to test an upgrade from the current state of the master branch, follow the first part of the [Deploy with OLM](#deploy-with-olm) guide to create the initial version images. In this example we assume that the latest release is `v0.34.0`.

The [Makefile](Makefile) provides an automated method of creating and pushing the index and bundle images for the latest version of CRO. It uses the latest version number from the [bundles](bundles/) to determine which version is newest. Some of the variables within the [Makefile](Makefile) should also be adjusted:
* `PREVIOUS_OPERATOR_VERSIONS`: this variable determines which bundles to include in the index. As we do not plan to upgrade to this version it can be set to an empty string
* `IMAGE_ORG`: this should be set to the quay organisation where the images will be pushed
* `UPGRADE`: set to `false` as this version will not replace a previous version

Expand All @@ -292,7 +286,6 @@ The development release must now be created that we will upgrade to - checkout t
Adjust the [Makefile](Makefile) variables for the new development release:
* `VERSION`: set this to the chosen version - `10.0.0`
* `PREV_VERSION`: this is set to the version we are upgrading from - `0.34.0`
* `PREVIOUS_OPERATOR_VERSIONS`: this contains a list of previous versions that the index will refer to. For our upgrade we only need the single previous version - `0.34.0`
* `IMAGE_ORG`: this should be set to the quay organisation where the images will be pushed

```sh
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
labels:
name: cloud-resource-operator
name: cloud-resource-operator-metrics
spec:
endpoints:
- path: /metrics
port: http-metrics
selector:
matchLabels:
name: cloud-resource-operator

Large diffs are not rendered by default.

94 changes: 94 additions & 0 deletions bundles/0.42.0/manifests/integreatly.org_blobstorages.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: blobstorages.integreatly.org
spec:
group: integreatly.org
names:
kind: BlobStorage
listKind: BlobStorageList
plural: blobstorages
singular: blobstorage
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: BlobStorage is the Schema for the blobstorages API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
applyImmediately:
description: ApplyImmediately is only available to Postgres cr, for
blobstorage and redis cr's currently does nothing
type: boolean
maintenanceWindow:
type: boolean
secretRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
type: object
skipCreate:
type: boolean
tier:
type: string
type:
type: string
required:
- secretRef
- tier
- type
type: object
status:
properties:
message:
type: string
phase:
type: string
provider:
type: string
secretRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
type: object
strategy:
type: string
version:
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
94 changes: 94 additions & 0 deletions bundles/0.42.0/manifests/integreatly.org_postgres.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: postgres.integreatly.org
spec:
group: integreatly.org
names:
kind: Postgres
listKind: PostgresList
plural: postgres
singular: postgres
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: Postgres is the Schema for the postgres API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
properties:
applyImmediately:
description: ApplyImmediately is only available to Postgres cr, for
blobstorage and redis cr's currently does nothing
type: boolean
maintenanceWindow:
type: boolean
secretRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
type: object
skipCreate:
type: boolean
tier:
type: string
type:
type: string
required:
- secretRef
- tier
- type
type: object
status:
properties:
message:
type: string
phase:
type: string
provider:
type: string
secretRef:
properties:
name:
type: string
namespace:
type: string
required:
- name
type: object
strategy:
type: string
version:
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
65 changes: 65 additions & 0 deletions bundles/0.42.0/manifests/integreatly.org_postgressnapshots.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: postgressnapshots.integreatly.org
spec:
group: integreatly.org
names:
kind: PostgresSnapshot
listKind: PostgresSnapshotList
plural: postgressnapshots
singular: postgressnapshot
scope: Namespaced
versions:
- name: v1alpha1
schema:
openAPIV3Schema:
description: PostgresSnapshot is the Schema for the postgressnapshots API
properties:
apiVersion:
description: 'APIVersion defines the versioned schema of this representation
of an object. Servers should convert recognized schemas to the latest
internal value, and may reject unrecognized values. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#resources'
type: string
kind:
description: 'Kind is a string value representing the REST resource this
object represents. Servers may infer this from the endpoint the client
submits requests to. Cannot be updated. In CamelCase. More info: https://git.k8s.io/community/contributors/devel/sig-architecture/api-conventions.md#types-kinds'
type: string
metadata:
type: object
spec:
description: PostgresSnapshotSpec defines the desired state of PostgresSnapshot
properties:
resourceName:
description: 'INSERT ADDITIONAL SPEC FIELDS - desired state of cluster
Important: Run "operator-sdk generate k8s" to regenerate code after
modifying this file Add custom validation using kubebuilder tags:
https://book-v1.book.kubebuilder.io/beyond_basics/generating_crd.html'
type: string
required:
- resourceName
type: object
status:
properties:
message:
type: string
phase:
type: string
snapshotID:
type: string
type: object
type: object
served: true
storage: true
subresources:
status: {}
status:
acceptedNames:
kind: ""
plural: ""
conditions: null
storedVersions: null
Loading

0 comments on commit e0b3882

Please sign in to comment.