Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue 122: Deprecate operator upgrade script #123

Merged
merged 6 commits into from
Apr 8, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 22 additions & 20 deletions charts/bookkeeper-operator/templates/version_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,17 @@ data:
0.3.1:0.3.1,0.3.2
0.3.2:0.3.2
0.4.0:0.4.0
0.5.0:0.5.0,0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.5.1:0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.6.0:0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.6.1:0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.6.2:0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.7.0:0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.7.1:0.7.1,0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.7.2:0.7.2,0.7.3,0.8.0,0.9.0,{{ $version }}
0.7.3:0.7.3,0.8.0,0.9.0,{{ $version }}
0.8.0:0.8.0,0.9.0,{{ $version }}
0.5.0:0.5.0,0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.5.1:0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.6.0:0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.6.1:0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.6.2:0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.7.0:0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.7.1:0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.7.2:0.7.2,0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.7.3:0.7.3,0.8.0,0.8.1,0.9.0,{{ $version }}
0.8.0:0.8.0,0.8.1,0.9.0,{{ $version }}
0.8.1:0.8.1,0.9.0,{{ $version }}
0.9.0:0.9.0,{{ $version }}
{{ $version }}:{{ $version }}
{{- if $fromVersion }}
Expand All @@ -38,15 +39,16 @@ data:
0.3.1:0.3.1,0.3.2
0.3.2:0.3.2
0.4.0:0.4.0
0.5.0:0.5.0,0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.5.1:0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.6.0:0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.6.1:0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.6.2:0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.7.0:0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.7.1:0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.7.2:0.7.2,0.7.3,0.8.0,0.9.0
0.7.3:0.7.3,0.8.0,0.9.0
0.8.0:0.8.0,0.9.0
0.5.0:0.5.0,0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.5.1:0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.6.0:0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.6.1:0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.6.2:0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.0:0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.1:0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.2:0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.3:0.7.3,0.8.0,0.8.1,0.9.0
0.8.0:0.8.0,0.8.1,0.9.0
0.8.1:0.8.1,0.9.0
0.9.0:0.9.0
{{- end }}
2 changes: 1 addition & 1 deletion charts/bookkeeper/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ The following table lists the configurable parameters of the Bookkeeper chart an
| `image.repository` | Image repository | `pravega/bookkeeper` |
| `image.pullPolicy` | Image pull policy | `IfNotPresent` |
| `replicas` | Number of bookkeeper replicas | `3` |
| `maxUnavailableBookkeeperReplicas` | Number of maxUnavailableBookkeeperReplicas for bookkeeper PDB | `1` |
| `maxUnavailableReplicas` | Maximum number of unavailable replicas for bookkeeper PDB | |
| `zookeeperUri` | Zookeeper client service URI | `zookeeper-client:2181` |
| `pravegaClusterName` | Name of the pravega cluster | `pravega` |
| `autoRecovery`| Enable bookkeeper auto-recovery | `true` |
Expand Down
4 changes: 3 additions & 1 deletion charts/bookkeeper/templates/bookkeeper.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ metadata:
{{ include "bookkeeper.commonLabels" . | indent 4 }}
spec:
replicas: {{ .Values.replicas }}
maxUnavailableBookkeeperReplicas: {{ .Values.maxUnavailableBookkeeperReplicas }}
{{- if .Values.maxUnavailableReplicas }}
maxUnavailableBookkeeperReplicas: {{ .Values.maxUnavailableReplicas }}
{{- end }}
image:
imageSpec:
repository: {{ .Values.image.repository }}
Expand Down
2 changes: 1 addition & 1 deletion charts/bookkeeper/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ hooks:
backoffLimit: 10

replicas: 3
maxUnavailableBookkeeperReplicas: 1
maxUnavailableReplicas:
zookeeperUri: zookeeper-client:2181
pravegaClusterName: pravega
autoRecovery: true
Expand Down
21 changes: 11 additions & 10 deletions deploy/version_map.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,15 @@ data:
0.3.1:0.3.1,0.3.2
0.3.2:0.3.2
0.4.0:0.4.0
0.5.0:0.5.0,0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.5.1:0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.6.0:0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.6.1:0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.6.2:0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.7.0:0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.7.1:0.7.1,0.7.2,0.7.3,0.8.0,0.9.0
0.7.2:0.7.2,0.7.3,0.8.0,0.9.0
0.7.3:0.7.3,0.8.0,0.9.0
0.8.0:0.8.0,0.9.0
0.5.0:0.5.0,0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.5.1:0.5.1,0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.6.0:0.6.0,0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.6.1:0.6.1,0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.6.2:0.6.2,0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.0:0.7.0,0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.1:0.7.1,0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.2:0.7.2,0.7.3,0.8.0,0.8.1,0.9.0
0.7.3:0.7.3,0.8.0,0.8.1,0.9.0
0.8.0:0.8.0,0.8.1,0.9.0
0.8.1:0.8.1,0.9.0
0.9.0:0.9.0
1 change: 0 additions & 1 deletion doc/bookkeeper-options.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ Default gcOpts:
"-XX:+UseG1GC",
"-XX:MaxGCPauseMillis=10",
"-XX:+ParallelRefProcEnabled",
"-XX:+AggressiveOpts",
"-XX:+DoEscapeAnalysis",
"-XX:ParallelGCThreads=32",
"-XX:ConcGCThreads=32",
Expand Down
14 changes: 7 additions & 7 deletions doc/development.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
## Development

## Contents
### Contents

* [Requirements](#requirements)
* [Build the operator image](#build-the-operator-image)
* [Run the Operator locally](#run-the-operator-locally)
* [Installation on Google Kubernetes Engine](#installation-on-google-kubernetes-engine)
* [Install the Operator in Test Mode](#install-the-operator-in-test-mode)

### Requirements
#### Requirements
- Go 1.13+

#### Install Go
##### Install Go

You can install go directly or use gvm ( go version manager)

Expand Down Expand Up @@ -55,7 +55,7 @@ For pulling the dependencies we are using go modules for more details on go modu

https://blog.golang.org/using-go-modules

### Build the operator image
#### Build the operator image

Use the `make` command to build the Bookkeeper operator image, it will also automatically get all the dependencies by using the go.mod file.

Expand Down Expand Up @@ -93,7 +93,7 @@ where:
- `[REGISTRY_HOST]` is your registry host or IP (e.g. `registry.example.com`)
- `[REGISTRY_PORT]` is your registry port (e.g. `5000`)

### Run the Operator locally
#### Run the Operator locally

You can run the Operator locally to help with development, testing, and debugging tasks.

Expand All @@ -103,7 +103,7 @@ The following command will run the Operator locally with the default Kubernetes
$ make run-local
```

### Installation on Google Kubernetes Engine
#### Installation on Google Kubernetes Engine

The Operator requires elevated privileges in order to watch for the custom resources.

Expand All @@ -121,5 +121,5 @@ On GKE, the following command must be run before installing the Operator, replac
$ kubectl create clusterrolebinding your-user-cluster-admin-binding --clusterrole=cluster-admin [email protected]
```

### Install the Operator in Test Mode
#### Install the Operator in Test Mode
The Operator can be run in `test mode` if we want to deploy the Bookkeeper Cluster on minikube or on a cluster with very limited resources by setting `testmode: true` in `values.yaml` file. Operator running in test mode skips the minimum replica requirement checks. Test mode provides a bare minimum setup and is not recommended to be used in production environments.
6 changes: 0 additions & 6 deletions doc/operator-upgrade.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,10 @@ where:

### Triggering the upgrade

#### Upgrade via helm

The upgrade to Operator 0.1.3 can be triggered using the following command
```
helm upgrade [BOOKKEEPER_OPERATOR_RELEASE_NAME] pravega/bookkeeper-operator --version=0.1.3 --set webhookCert.certName=[CERT_NAME] --set webhookCert.secretName=[SECRET_NAME]
```
where:
- `[CERT_NAME]` is the name of the certificate that has been created
- `[SECRET_NAME]` is the name of the secret created by the above certificate

#### Upgrade manually

To manually trigger the upgrade to Operator 0.1.3, run the script `operatorUpgrade.sh` under [tools](https://github.com/pravega/bookkeeper-operator/blob/master/tools) folder. This script installs the certificate, patches and creates necessary K8s artifacts, needed by 0.1.3 Operator, prior to triggering the upgrade by updating the image tag in Operator deployment.
10 changes: 5 additions & 5 deletions doc/release_process.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Pravega Operator Release Process
# Bookkeeper Operator Release Process

## Release Versioning
Pravega Operator follows the [Semantic Versioning](https://semver.org/) model for numbering releases.
Bookkeeper Operator follows the [Semantic Versioning](https://semver.org/) model for numbering releases.

## Introduction
This page documents the tagging, branching and release process followed for Bookkeeper Operator.
Expand All @@ -13,7 +13,7 @@ This page documents the tagging, branching and release process followed for Book
This is a minor release with backward compatible changes and bug fixes.

1. Create a new branch with last number bumped up from the existing release branch.
For example, if the existing release branch is 0.1.2, the new branch will be named 0.1.2.
For example, if the existing release branch is 0.1.2, the new branch will be named 0.1.3.

`$ git clone --branch <tag-name> [email protected]:pravega/bookkeeper-operator.git `

Expand All @@ -34,7 +34,7 @@ This is a minor release with backward compatible changes and bug fixes.

5. Create a new release candidate tag on this branch.
Tag name should correspond to release-branch-name-<release-candidate-version>.
For example: `0.1.2-rc1` for the first release candidate.
For example: `0.1.3-rc1` for the first release candidate.

`$ git tag -a <tag-name> -m "<description>"`

Expand All @@ -50,7 +50,7 @@ This is a minor release with backward compatible changes and bug fixes.

`$ docker push pravega/bookkeeper-operator:<tag-name>`

7. Once a release candidate is tested and there are no more changes needed, push a final release tag and image (like `0.1.2`)
7. Once a release candidate is tested and there are no more changes needed, push a final release tag and image (like `0.1.3`)

8. Release Notes

Expand Down
16 changes: 16 additions & 0 deletions doc/troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
* [Unsupported Bookkeeper cluster version](#unsupported-bookkeeper-cluster-version)
* [Unsupported upgrade from version](#unsupported-upgrade-from-version)
* [Invalid Cookie Exception](#invalid-cookie-exception)
* [Unrecognized VM option](#unrecognized-vm-option)

## Bookkeeper operator Issues
* [Operator pod in container creating state](#operator-pod-in-container-creating-state)
Expand Down Expand Up @@ -77,6 +78,21 @@ org.apache.bookkeeper.bookie.BookieException$InvalidCookieException:

we need to ensure that znode entries are cleaned up from previous installation. This can be done by either cleaning up znode entries from zookeeper nodes or by completely reinstalling zookeeper.

## Unrecognized VM option

While installing bookkeeper, if the pods don't come up to ready state and the logs contain the error shown below

```
Unrecognized VM option 'PrintGCDateStamps'
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
```
This is happening because some of default JVM options added by the operator are not supported by Java version used by bookkeeper. This issue can therefore be resolved by setting an additional JVM option `IgnoreUnrecognizedVMOptions` while installing the bookkeeper cluster as shown below.

```
helm install [RELEASE_NAME] pravega/bookkeeper --version=[VERSION] --set zookeeperUri=[ZOOKEEPER_HOST] --set 'jvmOptions.extraOpts={-XX:+IgnoreUnrecognizedVMOptions}'
```

## Operator pod in container creating state

While installing operator, if the operator pod goes in `ContainerCreating` state for long time, make sure certificates are installed correctly. Please refer [prerequisite](../charts/bookkeeper-operator/README.md#Prerequisites)
22 changes: 0 additions & 22 deletions tools/manifest_files/certificate.yaml

This file was deleted.

38 changes: 0 additions & 38 deletions tools/manifest_files/patch.yaml

This file was deleted.

42 changes: 0 additions & 42 deletions tools/manifest_files/webhook.yaml

This file was deleted.

Loading