operator-database

command module
v0.0.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 16, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

README

operator-database

See below for instructions how to set up and run the database operator as well as the used commands for the development of it.

Setup and Usage

The instructions below assume that you use the managed Kubernetes service on the IBM Cloud. You can also use any other Kubernetes service or OpenShift.

Get the code:

$ https://github.com/nheidloff/operator-sample-go.git
$ cd operator-database
$ code .

Login to Kubernetes:

$ ibmcloud login -a cloud.ibm.com -r eu-de -g resource-group-niklas-heidloff7 --sso
$ ibmcloud ks cluster config --cluster xxxxxxx

Configure Kubernetes:

$ kubectl create ns database
$ kubectl config set-context --current --namespace=database
$ kubectl apply -f ../operator-database/config/crd/bases/database.sample.third.party_databases.yaml

From a terminal in VSCode run these commands:

$ make install run
$ kubectl apply -f config/samples/database.sample_v1alpha1_database.yaml -n database 

You can now see the custom resource in the Kubernetes dashboard or by using kubectl.

All resources can be deleted:

$ kubectl delete -f config/samples/database.sample_v1alpha1_database.yaml -n database
Development Commands

Commands used for the project creation:

$ operator-sdk init --domain third.party --repo github.com/nheidloff/operator-sample-go/operator-database
$ operator-sdk create api --group database.sample --version v1alpha1 --kind Database --resource --controller
$ make generate
$ make manifests

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
api
v1alpha1
Package v1alpha1 contains API Schema definitions for the database.sample v1alpha1 API group +kubebuilder:object:generate=true +groupName=database.sample.third.party
Package v1alpha1 contains API Schema definitions for the database.sample v1alpha1 API group +kubebuilder:object:generate=true +groupName=database.sample.third.party

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL