Skip to content

Commit

Permalink
Merge branch 'master' into improvement/debug-log-assigned-node
Browse files Browse the repository at this point in the history
  • Loading branch information
nikita-vanyasin authored Oct 17, 2023
2 parents d24b569 + 58a3789 commit b2caf1d
Show file tree
Hide file tree
Showing 39 changed files with 512 additions and 566 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# Change Log

## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)

## [1.2.34](https://github.com/arangodb/kube-arangodb/tree/1.2.34) (2023-10-16
- (Bugfix) Fix make manifests-crd-file command
- (Improvement) Allow tcp:// and ssl:// protocols in endpoints for members
- (Maintenance) Reorganize package imports / move common code to separate repos
Expand Down
190 changes: 69 additions & 121 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ state for individual new features, since we expect that new
features will first be released with an "alpha" or "beta" readiness
state and over time move to full "production readiness".

Operator will supports versions supported on providers and maintained by Kubernetes.
Operator will support Kubernetes versions supported on providers and maintained by Kubernetes.
Once version is not supported anymore it will go into "Deprecating" state and will be marked as deprecated on Minor release.

Kubernetes versions starting from 1.18 are supported and tested, charts and manifests can use API Versions which are not present in older versions.
Expand Down Expand Up @@ -102,176 +102,124 @@ To upgrade to the Enterprise Edition, you need to get in touch with the ArangoDB

<!-- END(featuresEnterpriseTable) -->

## Operator Community Edition (CE)
## Installation and Usage

Image: `arangodb/kube-arangodb:1.2.33`
Docker images:
- Community Edition: `arangodb/kube-arangodb:1.2.34`
- Enterprise Edition: `arangodb/kube-arangodb-enterprise:1.2.34`

### Installation of latest CE release using Kubectl
### Installation of latest release using Kubectl

This procedure can also be used for upgrades and will not harm any
running ArangoDB deployments.

##### Community Edition
```bash
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/arango-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/arango-deployment.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/arango-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/arango-deployment.yaml
# To use `ArangoLocalStorage`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/arango-storage.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/arango-storage.yaml
# To use `ArangoDeploymentReplication`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/arango-deployment-replication.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/arango-deployment-replication.yaml
```

This procedure can also be used for upgrades and will not harm any
running ArangoDB deployments.
##### Enterprise Edition
```bash
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/enterprise-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/enterprise-deployment.yaml
# To use `ArangoLocalStorage`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/enterprise-storage.yaml
# To use `ArangoDeploymentReplication`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.34/manifests/enterprise-deployment-replication.yaml
```

### Installation of latest CE release using kustomize
### Installation of latest release using kustomize

Installation using [kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/) looks like installation from yaml files,
but user is allowed to modify namespace or resource names without yaml modifications.

IT is recommended to use kustomization instead of handcrafting namespace in yaml files - kustomization will replace not only resource namespaces,
It is recommended to use kustomization instead of handcrafting namespace in yaml files - kustomization will replace not only resource namespaces,
but also namespace references in resources like ClusterRoleBinding.

Example kustomization file:
See `manifests/kustomize` directory for available combinations of installed features.

##### Community Edition example
```
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: my-custom-namespace
bases:
- https://github.com/arangodb/kube-arangodb/manifests/kustomize/deployment/?ref=1.0.3
```

### Installation of latest CE release using Helm

Only use this procedure for a new install of the operator. See below for
upgrades.

```bash
# The following will install the operator for `ArangoDeployment` &
# `ArangoDeploymentReplication` resources.
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz
# To use `ArangoLocalStorage`, set field `operator.features.storage` to true
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz --set "operator.features.storage=true"
resources:
- https://github.com/arangodb/kube-arangodb/manifests/kustomize/crd?ref=1.2.34
- https://github.com/arangodb/kube-arangodb/manifests/kustomize/deployment?ref=1.2.34
```

### Upgrading the operator using Helm

To upgrade the operator to the latest version with Helm, you have to
delete the previous deployment and then install the latest. **HOWEVER**:
You *must not delete* the deployment of the custom resource definitions
(CRDs), or your ArangoDB deployments will be deleted!

Therefore, you have to use `helm list` to find the deployments for the
operator (`kube-arangodb`) and of the storage operator
(`kube-arangodb-storage`) and use `helm delete` to delete them using the
automatically generated deployment names. Here is an example of a `helm
list` output:

##### Enterprise Edition example
```
% helm list
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
vetoed-ladybird 1 Mon Apr 8 11:36:58 2019 DEPLOYED kube-arangodb-0.3.10-preview default
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: my-custom-namespace
resources:
- https://github.com/arangodb/kube-arangodb/manifests/kustomize-enterprise/crd?ref=1.2.34
- https://github.com/arangodb/kube-arangodb/manifests/kustomize-enterprise/deployment?ref=1.2.34
```

So here, you would have to do

```bash
helm delete vetoed-ladybird
```
### Installation of latest release using Helm

but **not delete `steely-mule`**. Then you could install the new version
with `helm install` as normal:
Only use this procedure for clean installation of the operator. For upgrades see next section

##### Community Edition
```bash
# The following will install the operator for `ArangoDeployment` &
# `ArangoDeploymentReplication` resources.
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz
# The following will install the operator and basic CRDs resources.
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz
# To use `ArangoLocalStorage`, set field `operator.features.storage` to true
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz --set "operator.features.storage=true"
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz --set "operator.features.storage=true"
```

## Operator Enterprise Edition (EE)

Image: `arangodb/kube-arangodb-enterprise:1.2.33`

### Installation of latest EE release using Kubectl

##### Enterprise Edition
```bash
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/enterprise-crd.yaml
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/enterprise-deployment.yaml
# To use `ArangoLocalStorage`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/enterprise-storage.yaml
# To use `ArangoDeploymentReplication`, also run
kubectl apply -f https://raw.githubusercontent.com/arangodb/kube-arangodb/1.2.33/manifests/enterprise-deployment-replication.yaml
```

This procedure can also be used for upgrades and will not harm any
running ArangoDB deployments.

### Installation of latest EE release using kustomize

Installation using [kustomize](https://kubernetes.io/docs/tasks/manage-kubernetes-objects/kustomization/) looks like installation from yaml files,
but user is allowed to modify namespace or resource names without yaml modifications.

IT is recommended to use kustomization instead of handcrafting namespace in yaml files - kustomization will replace not only resource namespaces,
but also namespace references in resources like ClusterRoleBinding.

Example kustomization file:
```
apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
namespace: my-custom-namespace
bases:
- https://github.com/arangodb/kube-arangodb/manifests/kustomize-enterprise/deployment/?ref=1.0.3
```

### Installation of latest EE release using Helm

Only use this procedure for a new install of the operator. See below for
upgrades.

```bash
# The following will install the operator for `ArangoDeployment` &
# `ArangoDeploymentReplication` resources.
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.33"
# The following will install the operator and basic CRDs resources.
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.34"
# To use `ArangoLocalStorage`, set field `operator.features.storage` to true
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.33" --set "operator.features.storage=true"
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.34" --set "operator.features.storage=true"
```

### Upgrading the operator using Helm

To upgrade the operator to the latest version with Helm, you have to
delete the previous deployment and then install the latest. **HOWEVER**:
You *must not delete* the deployment of the custom resource definitions
(CRDs), or your ArangoDB deployments will be deleted!
delete the previous operator deployment and then install the latest. **HOWEVER**:
You *must not delete* the custom resource definitions (CRDs),
or your ArangoDB deployments will be deleted!

Therefore, you have to use `helm list` to find the deployments for the
operator (`kube-arangodb`) and of the storage operator
(`kube-arangodb-storage`) and use `helm delete` to delete them using the
automatically generated deployment names. Here is an example of a `helm
list` output:
operator (`kube-arangodb`) and use `helm delete` to delete them using the
automatically generated deployment names. Here is an example of a `helm list` output:

```
% helm list
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
vetoed-ladybird 1 Mon Apr 8 11:36:58 2019 DEPLOYED kube-arangodb-0.3.10-preview default
NAME NAMESPACE REVISION UPDATED STATUS CHART APP VERSION
kube-arangodb-1-1696919877 default 1 2023-10-10 08:37:57.884783199 +0200 CEST deployed kube-arangodb-1.2.31
```

So here, you would have to do

```bash
helm delete vetoed-ladybird
helm delete kube-arangodb-1-1696919877
```

but **not delete `steely-mule`**. Then you could install the new version
with `helm install` as normal:
Then you can install the new version with `helm install` as normal:

##### Community Edition
```bash
# The following will install the operator and basic CRDs resources.
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz
# To use `ArangoLocalStorage`, set field `operator.features.storage` to true
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz --set "operator.features.storage=true"
```

##### Enterprise Edition
```bash
# The following will install the operator for `ArangoDeployment` &
# `ArangoDeploymentReplication` resources.
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.33"
# The following will install the operator and basic CRDs resources.
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.34"
# To use `ArangoLocalStorage`, set field `operator.features.storage` to true
helm install https://github.com/arangodb/kube-arangodb/releases/download/1.2.33/kube-arangodb-1.2.33.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.33" --set "operator.features.storage=true"
helm install --generate-name https://github.com/arangodb/kube-arangodb/releases/download/1.2.34/kube-arangodb-1.2.34.tgz --set "operator.image=arangodb/kube-arangodb-enterprise:1.2.34" --set "operator.features.storage=true"
```

## Building
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.2.34-preview-1+git
1.2.34+git
2 changes: 1 addition & 1 deletion chart/kube-arangodb-crd/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: kube-arangodb-crd
version: 1.2.33
version: 1.2.34
description: "ArangoDB Kubernetes Custom Resource Definitions (Deprecated)"
tillerVersion: ">2.7"
appVersion: 3.5.0
2 changes: 1 addition & 1 deletion chart/kube-arangodb/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# do not switch to V2 yet - we still need to support Helm 2
apiVersion: v1
name: kube-arangodb
version: 1.2.33
version: 1.2.34
description: "ArangoDB Kubernetes Operator"
2 changes: 1 addition & 1 deletion chart/kube-arangodb/values.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
operator:
image: arangodb/kube-arangodb:1.2.33
image: arangodb/kube-arangodb:1.2.34
imagePullPolicy: IfNotPresent
imagePullSecrets: []
scope: legacy
Expand Down
2 changes: 1 addition & 1 deletion examples/reboot-pod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ spec:
restartPolicy: Never
serviceAccountName: arango-deployment-operator-reboot
containers:
- image: arangodb/kube-arangodb:1.2.33
- image: arangodb/kube-arangodb:1.2.34
name: reboot
command: ["arangodb_operator", "reboot"]
args:
Expand Down
Loading

0 comments on commit b2caf1d

Please sign in to comment.