Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
tamalsaha committed Feb 20, 2019
1 parent 1ff5bfd commit 225e5ee
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 21 deletions.
6 changes: 3 additions & 3 deletions chart/kubedb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ The following table lists the configurable parameters of the KubeDB chart and th
| Parameter | Description | Default |
| --------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------------------------------------------------------- |
| `replicaCount` | Number of kubedb operator replicas to create (only 1 is supported) | `1` |
| `kubedb.registry` | Docker registry used to pull Kubedb operator image | `kubedb` |
| `kubedb.repository` | Kubedb operator container image | `operator` |
| `kubedb.tag` | Kubedb operator container image tag | `0.9.0` |
| `kubedb.registry` | Docker registry used to pull KubeDB operator image | `kubedb` |
| `kubedb.repository` | KubeDB operator container image | `operator` |
| `kubedb.tag` | KubeDB operator container image tag | `0.9.0` |
| `cleaner.registry` | Docker registry used to pull Webhook cleaner image | `appscode` |
| `cleaner.repository` | Webhook cleaner container image | `kubectl` |
| `cleaner.tag` | Webhook cleaner container image tag | `v1.12` |
Expand Down
2 changes: 1 addition & 1 deletion chart/kubedb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
##
# Declare variables to be passed into your templates.
replicaCount: 1
# Docker registry containing Kubedb images
# Docker registry containing KubeDB images
kubedb:
registry: kubedb
repository: operator
Expand Down
2 changes: 1 addition & 1 deletion cmd/kubedb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
)

func main() {
cmd := cmds.NewKubedbCommand(os.Stdin, os.Stdout, os.Stderr)
cmd := cmds.NewKubeDBCommand(os.Stdin, os.Stdout, os.Stderr)
if err := cmd.Execute(); err != nil {
os.Exit(1)
}
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/databases/elasticsearch.md
Original file line number Diff line number Diff line change
Expand Up @@ -363,8 +363,8 @@ A list of the supported environment variables, their permission to use in KubeDB
| ------------------------------- | :---------------: | -------------------------------------------------------------------------------------------------- |
| CLUSTER_NAME | `allowed` | `metadata.name` |
| NODE_NAME | `not allowed` | Pod name |
| NODE_MASTER | `not allowed` | Kubedb set it based on `Elasticsearch` crd sepcification |
| NODE_DATA | `not allowed` | Kubedb set it based on `Elasticsearch` crd sepcification |
| NODE_MASTER | `not allowed` | KubeDB sets it based on `Elasticsearch` crd sepcification |
| NODE_DATA | `not allowed` | KubeDB sets it based on `Elasticsearch` crd sepcification |
| NETWORK_HOST | `allowed` | `_site_` |
| HTTP_ENABLE | `allowed` | If `spec.topology` is not specified then `true`. Otherwise, `false` for Master node and Data node. |
| HTTP_CORS_ENABLE | `allowed` | `true` |
Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/databases/memcached.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ Uses of some field of `spec.podTemplate` is described below,

`spec.env` is an optional field that specifies the environment variables to pass to the Memcached docker image.

Note that, Kubedb does not allow to update the environment variables. If you try to update environment variables, Kubedb operator will reject the request with following error,
Note that, KubeDB does not allow to update the environment variables. If you try to update environment variables, KubeDB operator will reject the request with following error,

```ini
Error from server (BadRequest): error when applying patch:
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/databases/mongodb.md
Original file line number Diff line number Diff line change
Expand Up @@ -306,15 +306,15 @@ Uses of some field of `spec.podTemplate` is described below,

`spec.podTemplate.spec.env` is an optional field that specifies the environment variables to pass to the MongoDB docker image. To know about supported environment variables, please visit [here](https://hub.docker.com/r/_/mongo/).

Note that, Kubedb does not allow `MONGO_INITDB_ROOT_USERNAME` and `MONGO_INITDB_ROOT_PASSWORD` environment variables to set in `spec.podTemplate.spec.env`. If you want to use custom superuser and password, please use `spec.databaseSecret` instead described earlier.
Note that, KubeDB does not allow `MONGO_INITDB_ROOT_USERNAME` and `MONGO_INITDB_ROOT_PASSWORD` environment variables to set in `spec.podTemplate.spec.env`. If you want to use custom superuser and password, please use `spec.databaseSecret` instead described earlier.

If you try to set `MONGO_INITDB_ROOT_USERNAME` or `MONGO_INITDB_ROOT_PASSWORD` environment variable in MongoDB crd, Kubed operator will reject the request with following error,

```ini
Error from server (Forbidden): error when creating "./mongodb.yaml": admission webhook "mongodb.validators.kubedb.com" denied the request: environment variable MONGO_INITDB_ROOT_USERNAME is forbidden to use in MongoDB spec
```

Also, note that Kubedb does not allow to update the environment variables as updating them does not have any effect once the database is created. If you try to update environment variables, Kubedb operator will reject the request with following error,
Also, note that KubeDB does not allow to update the environment variables as updating them does not have any effect once the database is created. If you try to update environment variables, KubeDB operator will reject the request with following error,

```ini
Error from server (BadRequest): error when applying patch:
Expand Down
4 changes: 2 additions & 2 deletions docs/concepts/databases/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -284,15 +284,15 @@ Uses of some field of `spec.podTemplate` is described below,

`spec.podTemplate.spec.env` is an optional field that specifies the environment variables to pass to the MySQL docker image. To know about supported environment variables, please visit [here](https://hub.docker.com/_/mysql/).

Note that, Kubedb does not allow `MYSQL_ROOT_PASSWORD`, `MYSQL_ALLOW_EMPTY_PASSWORD`, `MYSQL_RANDOM_ROOT_PASSWORD`, and `MYSQL_ONETIME_PASSWORD` environment variables to set in `spec.env`. If you want to set the root password, please use `spec.databaseSecret` instead described earlier.
Note that, KubeDB does not allow `MYSQL_ROOT_PASSWORD`, `MYSQL_ALLOW_EMPTY_PASSWORD`, `MYSQL_RANDOM_ROOT_PASSWORD`, and `MYSQL_ONETIME_PASSWORD` environment variables to set in `spec.env`. If you want to set the root password, please use `spec.databaseSecret` instead described earlier.

If you try to set any of the forbidden environment variables i.e. `MYSQL_ROOT_PASSWORD` in MySQL crd, Kubed operator will reject the request with following error,

```ini
Error from server (Forbidden): error when creating "./mysql.yaml": admission webhook "mysql.validators.kubedb.com" denied the request: environment variable MYSQL_ROOT_PASSWORD is forbidden to use in MySQL spec
```

Also note that Kubedb does not allow to update the environment variables as updating them does not have any effect once the database is created. If you try to update environment variables, Kubedb operator will reject the request with following error,
Also note that KubeDB does not allow to update the environment variables as updating them does not have any effect once the database is created. If you try to update environment variables, KubeDB operator will reject the request with following error,

```ini
Error from server (BadRequest): error when applying patch:
Expand Down
10 changes: 5 additions & 5 deletions docs/concepts/databases/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ To learn how to configure `spec.storage`, please visit the links below:
1. Initialize from Script
2. Initialize from Snapshot
3. Initialize from WAL archive

#### Initialize via Script

To initialize a PostgreSQL database using a script (shell script, db migrator, etc.), set the `spec.init.scriptSource` section when creating a Postgres object. `scriptSource` must have the following information:
Expand Down Expand Up @@ -419,11 +419,11 @@ At least one of the following was changed:

### spec.serviceTemplate

Kubedb creates two different services for each Postgres. One is `master service` named `<postgres-name>`, to connect the Postgres `Primary` Pod/Node. Another is `replica service` named `<postgres-name>-replicas`, to connect Postgres `replica` Pods/Nodes.
KubeDB creates two different services for each Postgres instance. One of them is a master service named `<postgres-name>` and points to the Postgres `Primary` pod/node. Another one is a replica service named `<postgres-name>-replicas` and points to Postgres `replica` pods/nodes.

These `master` and `replica` services can be customized using [spec.serviceTemplate](#spec.servicetemplate) and [spec.replicaServiceTemplate](#specreplicaservicetemplate)
These `master` and `replica` services can be customized using [spec.serviceTemplate](#spec.servicetemplate) and [spec.replicaServiceTemplate](#specreplicaservicetemplate) respectively.

You can provide template for the `master` service using `spec.serviceTemplate`. This will allow you to set the type and other properties of the service. If `spec.serviceTemplate` is not provided, Kubedb will create a `master` service of `ClusterIP` type with minimal settings.
You can provide template for the `master` service using `spec.serviceTemplate`. This will allow you to set the type and other properties of the service. If `spec.serviceTemplate` is not provided, KubeDB will create a `master` service of type `ClusterIP` with minimal settings.

KubeDB allows following fields to set in `spec.serviceTemplate`:

Expand All @@ -443,7 +443,7 @@ See [official v1.13 API documentation](https://kubernetes.io/docs/reference/gene

### spec.replicaServiceTemplate

You can provide template for the `replica` service using `spec.replicaServiceTemplate`. If `spec.replicaServiceTemplate` is not provided, Kubedb will create a `replica Service` of `ClusterIP` type with minimal settings.
You can provide template for the `replica` service using `spec.replicaServiceTemplate`. If `spec.replicaServiceTemplate` is not provided, KubeDB will create a `replica` service of type `ClusterIP` with minimal settings.

The fileds of `spec.replicaServiceTemplate` is similar to `spec.serviceTemplate`, that is:

Expand Down
2 changes: 1 addition & 1 deletion docs/concepts/databases/redis.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ Uses of some field of `spec.podTemplate` is described below,

`spec.podTemplate.spec.env` is an optional field that specifies the environment variables to pass to the Redis docker image.

Note that, Kubedb does not allow to update the environment variables. If you try to update environment variables, Kubedb operator will reject the request with following error,
Note that, KubeDB does not allow to update the environment variables. If you try to update environment variables, KubeDB operator will reject the request with following error,

```ini
Error from server (BadRequest): error when applying patch:
Expand Down
2 changes: 1 addition & 1 deletion hack/gendocs/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ aliases:

// ref: https://github.com/spf13/cobra/blob/master/doc/md_docs.md
func main() {
rootCmd := cmds.NewKubedbCommand(os.Stdin, os.Stdout, os.Stderr)
rootCmd := cmds.NewKubeDBCommand(os.Stdin, os.Stdout, os.Stderr)
dir := runtime.GOPath() + "/src/github.com/kubedb/cli/docs/reference"
fmt.Printf("Generating cli markdown tree in: %v\n", dir)
err := os.RemoveAll(dir)
Expand Down
4 changes: 2 additions & 2 deletions pkg/cmds/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ import (
cmdutil "k8s.io/kubernetes/pkg/kubectl/cmd/util"
)

// NewKubedbCommand creates the `kubedb` command and its nested children.
func NewKubedbCommand(in io.Reader, out, err io.Writer) *cobra.Command {
// NewKubeDBCommand creates the `kubedb` command and its nested children.
func NewKubeDBCommand(in io.Reader, out, err io.Writer) *cobra.Command {
cmds := &cobra.Command{
Use: "kubedb",
Short: "Command line interface for KubeDB",
Expand Down

0 comments on commit 225e5ee

Please sign in to comment.