Skip to content

Commit c98be4b

Browse files
ERA-60183,ERA-60184,ERA-60186: controller 0.5.3 release (#183)
1 parent 57d8e26 commit c98be4b

File tree

5 files changed

+215
-48
lines changed

5 files changed

+215
-48
lines changed

charts/ndb-operator/Chart.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ apiVersion: v2
22
name: ndb-operator
33
description: A Helm chart for Nutanix Database Kubernetes Operator
44
type: application
5-
version: 0.5.4
6-
appVersion: v0.5.2
5+
version: 0.5.5
6+
appVersion: v0.5.3
77
maintainers:
88
- name: mazin-s
99
email: mazin.shaaeldin@nutanix.com
@@ -27,11 +27,11 @@ icon: https://www.nutanix.com/content/dam/nutanix/global/icons/products/svg/Nuta
2727
annotations:
2828
artifacthub.io/changes: |
2929
- kind: changed
30-
description: "Upgraded controller to v0.5.2 with vulnerability fixes and latest Operator SDK"
31-
- kind: fixed
32-
description: "Upgraded internal dependencies and controller image to v0.5.2."
30+
description: "Upgraded controller from v0.5.2 to v0.5.3."
3331
- kind: security
34-
description: "Upgraded kube-rbac-proxy from v0.16.0 to v0.18.0."
32+
description: "Upgraded kube-rbac-proxy from v0.18.0 to v0.21.0"
33+
- kind: changed
34+
description: "controller image v0.5.3 details : https://github.com/nutanix-cloud-native/ndb-operator/releases/tag/v0.5.3"
3535
artifacthub.io/containsSecurityUpdates: "true"
3636
artifacthub.io/license: Apache-2.0
3737
artifacthub.io/maintainers: |

charts/ndb-operator/README.md

Lines changed: 160 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,127 @@
11
# Nutanix Database Service Operator for Kubernetes
2+
23
The NDB operator automates and simplifies database administration, provisioning, and life-cycle management of NDB on Kubernetes.
34

45
NDB operator supports these functionalities:
6+
57
1. Provisioning and deprovisioning a single instance postgres, mssql, sql server, and mongodb database with or without time machine.
68
2. Cloning support for the above database engines
79
3. Creation of a service for the applications to consume the database within Kubernetes.
10+
811
---
912

1013
## Pre-requisites
14+
1115
1. [Install](https://portal.nutanix.com/page/documents/details?targetId=Nutanix-NDB-User-Guide-v2_5:top-installation-c.html) NDB 2.5.
1216
2. [Install](https://helm.sh/docs/intro/install/) Helm v3.0.0.
1317
3. [Install](https://kubernetes.io/docs/setup/) a Kubernetes cluster.
1418
4. [Install](https://cert-manager.io/docs/installation/#getting-started) cert-manager. Ensure that the cert-manager resouces are up and running successfully before installing the NDB operator.
1519

1620
## Installation and Running on the cluster
17-
Deploy the operator on the cluster:
21+
22+
### Method 1: Install from Helm Repository (Recommended)
23+
24+
Add the Nutanix Helm repository:
25+
1826
```sh
1927
helm repo add nutanix https://nutanix.github.io/helm/
28+
helm repo update
29+
```
30+
31+
Install the latest version:
32+
33+
```sh
34+
helm install ndb-operator nutanix/ndb-operator \
35+
--namespace ndb-operator-system \
36+
--create-namespace
37+
```
38+
39+
Install a specific version:
40+
41+
```sh
42+
helm install ndb-operator nutanix/ndb-operator \
43+
--version 0.5.4 \
44+
--namespace ndb-operator-system \
45+
--create-namespace
46+
```
47+
48+
List available versions:
49+
50+
```sh
51+
helm search repo nutanix/ndb-operator --versions
52+
```
53+
54+
### Method 2: Install from OCI Registry (GHCR)
55+
56+
Install the latest version:
57+
58+
```sh
59+
helm install ndb-operator oci://ghcr.io/nutanix-cloud-native/chart/ndb-operator \
60+
--namespace ndb-operator-system \
61+
--create-namespace
62+
```
63+
64+
Install a specific version:
65+
66+
```sh
67+
helm install ndb-operator oci://ghcr.io/nutanix-cloud-native/chart/ndb-operator \
68+
--version 0.5.4 \
69+
--namespace ndb-operator-system \
70+
--create-namespace
71+
```
72+
73+
List available versions:
74+
75+
```sh
76+
# Install oras to list OCI registry tags
77+
brew install oras
78+
79+
# List all available versions
80+
oras repo tags ghcr.io/nutanix-cloud-native/chart/ndb-operator
81+
```
82+
83+
### Verify Installation
84+
85+
Check the installation status:
86+
87+
```sh
88+
# Check Helm release
89+
helm list -n ndb-operator-system
90+
91+
# Check pods
92+
kubectl get pods -n ndb-operator-system
2093

21-
helm install ndb-operator nutanix/ndb-operator -n ndb-operator --create-namespace
94+
# Check CRDs
95+
kubectl get crds | grep ndb.nutanix.com
2296
```
97+
98+
### Upgrading
99+
100+
To upgrade to a newer version:
101+
102+
```sh
103+
# Using Helm repository
104+
helm repo update
105+
helm upgrade ndb-operator nutanix/ndb-operator \
106+
--namespace ndb-operator-system
107+
108+
# Using OCI registry
109+
helm upgrade ndb-operator oci://ghcr.io/nutanix-cloud-native/chart/ndb-operator \
110+
--version 0.5.4 \
111+
--namespace ndb-operator-system
112+
```
113+
114+
### Uninstalling
115+
116+
To uninstall the operator:
117+
118+
```sh
119+
helm uninstall ndb-operator --namespace ndb-operator-system
120+
```
121+
23122
## Usage
24-
### Create secrets to be used by the NDBServer and Database resources using the manifest:
123+
124+
### Create secrets to be used by the NDBServer and Database resources using the manifest:
25125

26126
```yaml
27127
apiVersion: v1
@@ -54,7 +154,7 @@ Create the secrets:
54154
kubectl apply -f <path/to/secrets-manifest.yaml>
55155
```
56156

57-
### Create the NDBServer resource. The manifest for NDBServer is described as follows:
157+
### Create the NDBServer resource. The manifest for NDBServer is described as follows:
58158

59159
```yaml
60160
apiVersion: ndb.nutanix.com/v1alpha1
@@ -69,21 +169,26 @@ metadata:
69169
name: ndb
70170
spec:
71171
# Name of the secret that holds the credentials for NDB: username, password and ca_certificate created earlier
72-
credentialSecret: ndb-secret-name
172+
credentialSecretRef:
173+
name: ndb-secret-name
174+
namespace: ndb-secret-namespace-name
73175
# NDB Server's API URL
74176
server: https://[NDB IP]:8443/era/v0.9
75177
# Set to true to skip SSL certificate validation, should be false if ca_certificate is provided in the credential secret.
76178
skipCertificateVerification: true
77179

78180
```
181+
79182
Create the NDBServer resource using:
183+
80184
```sh
81185
kubectl apply -f <path/to/NDBServer-manifest.yaml>
82186
```
83187

84188
### Create a Database Resource. A database can either be provisioned or cloned on NDB based on the inputs specified in the database manifest.
85189

86190
#### Provisioning manifest
191+
87192
```yaml
88193
apiVersion: ndb.nutanix.com/v1alpha1
89194
kind: Database
@@ -96,9 +201,10 @@ spec:
96201
isClone: false
97202
# Database instance specific details (that is to be provisioned)
98203
databaseInstance:
99-
# Cluster id of the cluster where the Database has to be provisioned
204+
# Cluster Name or cluster ID where the Database has to be provisioned
100205
# Can be fetched from the GET /clusters endpoint
101-
clusterId: "Nutanix Cluster Id"
206+
clusterName: "Nutanix Cluster Name" # Recommended: Use cluster name
207+
# clusterId: "Nutanix Cluster UUID" # Alternative: Use cluster UUID
102208
# The database instance name on NDB
103209
name: "Database-Instance-Name"
104210
# The description of the database instance
@@ -151,6 +257,7 @@ spec:
151257
```
152258

153259
#### Cloning manifest
260+
154261
```yaml
155262
apiVersion: ndb.nutanix.com/v1alpha1
156263
kind: Database
@@ -169,9 +276,10 @@ spec:
169276
name: "Clone-Instance-Name"
170277
# The description of the clone instance
171278
description: Database Description
172-
# Cluster id of the cluster where the Database has to be provisioned
279+
# Cluster Name or Cluster id of the cluster where the Cloned Database has to be provisioned
173280
# Can be fetched from the GET /clusters endpoint
174-
clusterId: "Nutanix Cluster Id"
281+
clusterName: "Nutanix Cluster Name" # Recommended: Use cluster name
282+
# clusterId: "Nutanix Cluster UUID" # Alternative: Use cluster UUID
175283
# You can specify any (or none) of these types of profiles: compute, software, network, dbParam
176284
# If not specified, the corresponding Out-of-Box (OOB) profile will be used wherever applicable
177285
# Name is case-sensitive. ID is the UUID of the profile. Profile should be in the "READY" state
@@ -198,24 +306,32 @@ spec:
198306
# data: password, ssh_public_key
199307
credentialSecret: clone-instance-secret-name
200308
timezone: "UTC"
201-
# ID of the database to clone from, can be fetched from NDB REST API Explorer
202-
sourceDatabaseId: source-database-id
203-
# ID of the snapshot to clone from, can be fetched from NDB REST API Explorer
204-
snapshotId: snapshot-id
205-
additionalArguments: # Optional block, can specify additional arguments that are unique to database engines.
309+
310+
# Name or ID of the database to clone from, can be fetched from NDB REST API Explorer
311+
sourceDatabaseName: "source-database-name" # Recommended: Use database name
312+
# sourceDatabaseId: "source-database-uuid" # Alternative: Use database UUID
313+
314+
# Name or ID of the snapshot to clone from, can be fetched from NDB REST API Explorer
315+
snapshotName: "snapshot-name" # Recommended: Use snapshot name, or leave empty for latest
316+
# snapshotId: "snapshot-uuid" # Alternative: Use snapshot UUID
317+
318+
additionalArguments: # Optional block, can specify additional arguments that are unique to database engines.
206319
expireInDays: 3
207320

208321
```
209322

210323
Create the Database resource:
324+
211325
```sh
212326
kubectl apply -f <path/to/database-manifest.yaml>
213327
```
214328

215329
### Additional Arguments for Databases
330+
216331
Below are the various optional addtionalArguments you can specify along with examples of their corresponding values. Arguments that have defaults will be indicated.
217332

218333
Provisioning Additional Arguments:
334+
219335
```yaml
220336
# PostGres
221337
additionalArguments:
@@ -246,6 +362,7 @@ additionalArguments:
246362
```
247363
248364
Cloning Additional Arguments:
365+
249366
```yaml
250367
MSSQL:
251368
windows_domain_profile_id
@@ -285,42 +402,51 @@ MySQL:
285402
refreshDateTimezone
286403
```
287404
288-
289405
### Deleting the Database resource
406+
290407
To deregister the database and delete the VM run:
408+
291409
```sh
292410
kubectl delete -f <path/to/database-manifest.yaml>
293411
```
294412

295413
### Deleting the NDBServer resource
414+
296415
To deregister the database and delete the VM run:
416+
297417
```sh
298418
kubectl delete -f <path/to/NDBServer-manifest.yaml>
299419
```
300420

301421
---
302422

303423
## Uninstalling the Chart
424+
304425
To uninstall/delete the operator deployment/chart:
426+
305427
```console
306428
helm uninstall ndb-operator -n ndb-operator
307429
```
430+
308431
---
432+
309433
## Configuration
310434

311435
The following table lists the configurable parameters of the NDB operator chart and their default values.
312-
| Parameter | Description | Default |
313-
|-----------------------|---------------------------------------------------------------|--------------------------------------------------------|
314-
| `replicaCount` | Number of replicas of the NDB Operator controller pods | `1` |
315-
| `image.repository` | Image for NDB Operator controller | `ghcr.io/nutanix-cloud-native/ndb-operator/controller` |
316-
| `image.pullPolicy` | Image pullPolicy | `IfNotPresent` |
317-
| `image.tag` | Image tag | `""` |
318-
| `imagePullSecrets` | ImagePullSecrets list | `[]` |
319-
| `fullnameOverride` | To override the full name of the operator chart | `""` |
320-
| `resources` | Configure resources for Cloud Provider Pod | `refer to values.yaml` |
321-
| `nodeSelector` | Configure nodeSelector for Cloud Provider Pod | `refer to values.yaml` |
322-
| `tolerations` | Configure tolerations for Cloud Provider Pod | `refer to values.yaml` |
323-
| `affinity` | Configure affinity for Cloud Provider Pod | `refer to values.yaml` |
436+
437+
438+
| Parameter | Description | Default |
439+
| ------------------ | ------------------------------------------------------ | ------------------------------------------------------ |
440+
| `replicaCount` | Number of replicas of the NDB Operator controller pods | `1` |
441+
| `image.repository` | Image for NDB Operator controller | `ghcr.io/nutanix-cloud-native/ndb-operator/controller` |
442+
| `image.pullPolicy` | Image pullPolicy | `IfNotPresent` |
443+
| `image.tag` | Image tag | `""` |
444+
| `imagePullSecrets` | ImagePullSecrets list | `[]` |
445+
| `fullnameOverride` | To override the full name of the operator chart | `""` |
446+
| `resources` | Configure resources for Cloud Provider Pod | `refer to values.yaml` |
447+
| `nodeSelector` | Configure nodeSelector for Cloud Provider Pod | `refer to values.yaml` |
448+
| `tolerations` | Configure tolerations for Cloud Provider Pod | `refer to values.yaml` |
449+
| `affinity` | Configure affinity for Cloud Provider Pod | `refer to values.yaml` |
324450

325451

326452
### Configuration examples:
@@ -332,16 +458,19 @@ helm install ndb-operator nutanix/ndb-operator -n ndb-operator
332458
```
333459

334460
Individual configurations can be set by using `--set key=value[,key=value]` like:
461+
335462
```console
336463
helm install ndb-operator nutanix/ndb-operator --set replicaCount=2
337464
```
465+
338466
In the above command `replicaCount` refers to one of the variables defined in the values.yaml file.
339467

340468
All the options can also be specified in a value.yaml file:
341469

342470
```console
343471
helm install ndb-operator nutanix/ndb-operator -f value.yaml
344472
```
473+
345474
---
346475

347476
## How it works
@@ -354,6 +483,7 @@ which provides a reconcile function responsible for synchronizing resources unti
354483
A custom resource of the kind Database is created by the reconciler, followed by a Service and an Endpoint that maps to the IP address of the database instance provisioned. Application pods/deployments can use this service to interact with the databases provisioned on NDB through the native Kubernetes service.
355484

356485
Pods can specify an initContainer to wait for the service (and hence the database instance) to get created before they start up.
486+
357487
```yaml
358488
initContainers:
359489
- name: init-db
@@ -362,9 +492,11 @@ Pods can specify an initContainer to wait for the service (and hence the databas
362492
```
363493
364494
## Contributing
495+
365496
See the [contributing docs](https://github.com/nutanix-cloud-native/ndb-operator/blob/main/CONTRIBUTING.md).
366497
367498
## Support
499+
368500
### Community Plus
369501
370502
This code is developed in the open with input from the community through issues and PRs. A Nutanix engineering team serves as the maintainer. Documentation is available in the project repository.
@@ -375,4 +507,4 @@ Issues and enhancement requests can be submitted in the [Issues tab of this repo
375507
376508
Copyright 2022-2023 Nutanix, Inc.
377509
378-
The project is released under version 2.0 of the [Apache license](http://www.apache.org/licenses/LICENSE-2.0).
510+
The project is released under version 2.0 of the [Apache license](http://www.apache.org/licenses/LICENSE-2.0).

0 commit comments

Comments
 (0)