Skip to content

Commit

Permalink
Ndb-operator release v0.0.7 (#120)
Browse files Browse the repository at this point in the history
* Changes for v0.0.7 version of operator

* Formatting configmap

* Fixing indentation

* Fixing indentation

* Fix the service account name in values.yaml

* Adding gitignore file

* Updating README file

* Adding templating logic to operator

* Clean up the values.yaml

* Adding database description to readme, updating maintainers

* Adding namespace templating logic

* Updating namespace templating logic

* Templatizing the namePrefix of the operator

* Adding back terminationGracePeriodSeconds in deployment controller
  • Loading branch information
akshmish authored Aug 29, 2023
1 parent ace3133 commit 665934b
Show file tree
Hide file tree
Showing 23 changed files with 435 additions and 171 deletions.
37 changes: 37 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# General files for the project
pkg/*
*.pyc
bin/*
.project
/.bin
/_test/secrets/*.json

# OSX leaves these everywhere on SMB shares
._*

# OSX trash
.DS_Store

# Files generated by JetBrains IDEs, e.g. IntelliJ IDEA
.idea/
*.iml

# Vscode files
.vscode

# Emacs save files
*~
\#*\#
.\#*

# Vim-related files
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist

# Chart dependencies
**/charts/*.tgz

.history
20 changes: 15 additions & 5 deletions charts/ndb-operator/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ apiVersion: v2
name: ndb-operator
description: A Helm chart for Nutanix Database Kubernetes Operator
type: application
version: 0.0.6
appVersion: "v0.0.6"
version: 0.0.7
appVersion: v0.0.7
maintainers:
- name: mazin-s
email: [email protected]
- name: akshmish
email: [email protected]
- name: shenoypritika
Expand All @@ -21,12 +23,20 @@ icon: https://www.nutanix.com/content/dam/nutanix/global/icons/products/svg/Nuta
annotations:
artifacthub.io/changes: |
- kind: added
description: "Ability to provide Time Machine / SLA information"
- kind: fixed
description: "Error handling and minor bug fixes"
description: "Added the K8s Webhooks support for the validation of database specs"
- kind: added
description: "Added Provisioning Operation Id to the DB Status"
- kind: added
description: "Integrated Kubernetes events with the operator"
- kind: added
description: "Added description property for Database in the database specs"
- kind: added
description: "Added end-to-end tests for automated testing of operator"
artifacthub.io/containsSecurityUpdates: "false"
artifacthub.io/license: Apache-2.0
artifacthub.io/maintainers: |
- name: Mazin Shaaeldin
email: [email protected]
- name: Akshay Mishra
email: [email protected]
- name: Pritika Shenoy
Expand Down
15 changes: 7 additions & 8 deletions charts/ndb-operator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ NDB operator supports these functionalities:
1. [Install](https://portal.nutanix.com/page/documents/details?targetId=Nutanix-NDB-User-Guide-v2_5:top-installation-c.html) NDB 2.5.
2. [Install](https://helm.sh/docs/intro/install/) Helm v3.0.0.
3. [Install](https://kubernetes.io/docs/setup/) a Kubernetes cluster.
4. Installing the cert-manager. Please follow the instructions [here] (https://cert-manager.io/docs/installation/#getting-started). Ensure that the cert-manager resouces are up and running successfully before installing the NDB operator.

## Installation and Running on the cluster
Deploy the operator on the cluster:
Expand Down Expand Up @@ -78,6 +79,9 @@ spec:
databaseInstance:
# The database instance name on NDB
databaseInstanceName: "Database-Instance-Name"
# Description for the database instance. Optional.
# Default : "Database provisioned by ndb-operator: <database name>"
description: "Database provisioned by ndb-operator"
# Names of the databases on that instance
databaseNames:
- database_one
Expand Down Expand Up @@ -123,25 +127,20 @@ helm uninstall ndb-operator -n ndb-operator
## Configuration

The following table lists the configurable parameters of the NDB operator chart and their default values.

|-----------------------|---------------------------------------------------------------|--------------------------------------------------------|
| Parameter | Description | Default |
|-----------------------|---------------------------------------------------------------|--------------------------------------------------------|
| `replicaCount` | Number of replicas of the NDB Operator controller pods | `1` |
| `image.repository` | Image for NDB Operator controller | `ghcr.io/nutanix-cloud-native/ndb-operator/controller` |
| `image.pullPolicy` | Image pullPolicy | `IfNotPresent` |
| `image.tag` | Image tag | `""` |
| `image.tag` | Image tag | `""` |
| `imagePullSecrets` | ImagePullSecrets list | `[]` |
| `nameOverride` | To override the name of the operator chart | `""` |
| `fullnameOverride` | To override the full name of the operator chart | `""` |
| `serviceAccount.name` | Name of the service account that will be used by the operator | `ndb-operator-service-account` |
| `podAnnotations` | Add annotation to NDB Operator controller pods | `kubectl.kubernetes.io/default-container: manager` |
| `podSecurityContext` | Security context for the pod(s) running the operator | `runAsNonRoot: true` |
| `securityContext` | Security context for the container running the controller | `allowPrivilegeEscalation: false` |
| `resources` | Configure resources for Cloud Provider Pod | `refer to values.yaml` |
| `nodeSelector` | Configure nodeSelector for Cloud Provider Pod | `refer to values.yaml` |
| `tolerations` | Configure tolerations for Cloud Provider Pod | `refer to values.yaml` |
| `affinity` | Configure affinity for Cloud Provider Pod | `refer to values.yaml` |

|-----------------------|---------------------------------------------------------------|--------------------------------------------------------|

### Configuration examples:

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
annotations:
cert-manager.io/inject-ca-from: cert-manager-test/selfsigned-cert
controller-gen.kubebuilder.io/version: v0.9.2
creationTimestamp: null
name: databases.ndb.nutanix.com
spec:
group: ndb.nutanix.com
Expand All @@ -24,11 +24,8 @@ spec:
- jsonPath: .status.status
name: Status
type: string
- jsonPath: .status.id
name: Database Instance ID
type: string
- jsonPath: .status.dbServerId
name: Database Server ID
- jsonPath: .status.type
name: Type
type: string
name: v1alpha1
schema:
Expand Down Expand Up @@ -58,20 +55,18 @@ spec:
database instance (password and ssh key)
type: string
databaseInstanceName:
default: database_instance_name
description: Name of the database instance
type: string
databaseNames:
default:
- database_one
- database_two
- database_three
description: Name of the database to be provisiond in the database
instance
description: Name(s) of the database(s) to be provisiond inside
the database instance default [ "database_one", "database_two",
"database_three" ]
items:
type: string
minItems: 1
type: array
description:
description: Description of the database instance
type: string
profiles:
properties:
compute:
Expand Down Expand Up @@ -111,88 +106,49 @@ spec:
type: object
type: object
size:
default: 10
description: Size of the database instance
minimum: 10
description: Size of the database instance, minimum 10 (GBs)
type: integer
timeMachine:
default: {}
description: Information related to time machine that is to be
associated with this database
properties:
dailySnapshotTime:
default: "04:05:06"
description: Daily snapshot time in HH:MM:SS (24 hour format)
format: ^(2[0-3]|[01][0-9]):[0-5][0-9]:[0-5][0-9]$
type: string
description:
type: string
logCatchUpFrequency:
default: 30
description: Log catch up frequency in minutes
enum:
- 15
- 30
- 60
- 90
- 120
type: integer
monthlySnapshotDay:
default: 15
description: Day of the month for monthly snapshot
maximum: 28
minimum: 1
type: integer
name:
type: string
quarterlySnapshotMonth:
default: Jan
description: Start month for the quarterly snapshot Jan =>
Jan, Apr, Jul, Oct. Feb => Feb, May, Aug, Nov. Mar => Mar,
Jun, Sep, Dec.
enum:
- Jan
- Feb
- Mar
type: string
sla:
default: NONE
description: Name of the SLA to be used
description: Name of the SLA to be used, default NONE
type: string
snapshotsPerDay:
default: 1
description: Number of snapshots per day
maximum: 6
minimum: 1
type: integer
weeklySnapshotDay:
default: FRIDAY
description: Day of the week for weekly snapshot
enum:
- MONDAY
- TUESDAY
- WEDNESDAY
- THURSDAY
- FRIDAY
- SATURDAY
- SUNDAY
type: string
type: object
timezone:
default: UTC
description: default UTC
type: string
type:
default: postgres
enum:
- mysql
- postgres
- mongodb
- mssql
type: string
required:
- credentialSecret
- databaseInstanceName
- databaseNames
- size
- type
type: object
ndb:
Expand All @@ -205,15 +161,16 @@ spec:
(username and password)
type: string
server:
description: NDB Server URL
type: string
skipCertificateVerification:
default: false
description: Skip server's certificate and hostname verification
type: boolean
required:
- clusterId
- credentialSecret
- server
- skipCertificateVerification
type: object
required:
- databaseInstance
Expand All @@ -228,6 +185,8 @@ spec:
type: string
ipAddress:
type: string
provisioningOperationId:
type: string
status:
type: string
type:
Expand All @@ -236,11 +195,12 @@ spec:
- dbServerId
- id
- ipAddress
- provisioningOperationId
- status
- type
type: object
type: object
served: true
storage: true
subresources:
status: {}
status: {}
Loading

0 comments on commit 665934b

Please sign in to comment.