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 8209343 commit 96dc083
Show file tree
Hide file tree
Showing 14 changed files with 32 additions and 32 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
18 changes: 9 additions & 9 deletions docs/concepts/databases/postgres.md
Original file line number Diff line number Diff line change
Expand Up @@ -142,11 +142,11 @@ spec:

### spec.leaderElection

There are three fields in Postgres CRD's `spec.LeaderElection`. These values defines how fast the leader election can happen.
There are three fields under Postgres CRD's `spec.leaderElection`. These values defines how fast the leader election can happen.

- `leaseDurationSeconds`: `LeaseDuration` is the duration in second that non-leader candidates will wait to force acquire leadership. This is measured against time of last observed ack. Default 15
- `renewDeadlineSeconds`: `RenewDeadline` is the duration in second that the acting master will retry refreshing leadership before giving up. Normally, LeaseDuration * 2 / 3. Default 10
- `retryPeriodSeconds`: `RetryPeriod` is the duration in second the LeaderElector clients should wait between tries of actions. Normally, LeaseDuration / 3. Default 2
- `leaseDurationSeconds`: This is the duration in seconds that non-leader candidates will wait to force acquire leadership. This is measured against time of last observed ack. Default 15 sec.
- `renewDeadlineSeconds`: This is the duration in seconds that the acting master will retry refreshing leadership before giving up. Normally, LeaseDuration * 2 / 3. Default 10 sec.
- `retryPeriodSeconds`: This is the duration in seconds the LeaderElector clients should wait between tries of actions. Normally, LeaseDuration / 3. Default 2 sec.

If the Cluster machine is powerful, user can reduce the times. But, Do not make it so little, in that case Postgres will restarts very often.

Expand Down 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
10 changes: 5 additions & 5 deletions docs/guides/postgres/clustering/streaming_replication.md
Original file line number Diff line number Diff line change
Expand Up @@ -228,13 +228,13 @@ status:
phase: Running
```

There are three fields in Postgres CRD's `spec.LeaderElection`. These values defines how fast the leader election can happen.
There are three fields under Postgres CRD's `spec.leaderElection`. These values defines how fast the leader election can happen.

- leaseDurationSeconds: LeaseDuration is the duration in second that non-leader candidates will wait to force acquire leadership. This is measured against time of last observed ack. Default 15
- renewDeadlineSeconds: RenewDeadline is the duration in second that the acting master will retry refreshing leadership before giving up. Normally, LeaseDuration * 2 / 3. Default 10
- retryPeriodSeconds: RetryPeriod is the duration in second the LeaderElector clients should wait between tries of actions. Normally, LeaseDuration / 3. Default 2
- leaseDurationSeconds: This is the duration in seconds that non-leader candidates will wait to force acquire leadership. This is measured against time of last observed ack. Default 15 secs.
- renewDeadlineSeconds: This is the duration in seconds that the acting master will retry refreshing leadership before giving up. Normally, LeaseDuration * 2 / 3. Default 10 secs.
- retryPeriodSeconds: This is the duration in seconds the LeaderElector clients should wait between tries of actions. Normally, LeaseDuration / 3. Default 2 secs.

If the Cluster machine is powerful, user can reduce the times. But, Do not make it so little, in that case Postgres will restarts very often.
If the Cluster machine is powerful, user can reduce the times. But, Do not make it so little, in that case Postgres will restarts very often.

### Automatic failover

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/kubedb_create.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ kubedb create -f FILENAME
--edit Edit the API resource before creating
-f, --filename strings Filename, directory, or URL to files to use to create the resource
-h, --help help for create
-o, --output string Output format. One of: json|yaml|name|templatefile|template|go-template|go-template-file|jsonpath|jsonpath-file.
-o, --output string Output format. One of: json|yaml|name|template|go-template|go-template-file|templatefile|jsonpath|jsonpath-file.
--raw string Raw URI to POST to the server. Uses the transport specified by the kubeconfig file.
--record Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/kubedb_edit.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ kubedb edit (RESOURCE/NAME | -f FILENAME)
-f, --filename strings Filename, directory, or URL to files to use to edit the resource
-h, --help help for edit
--include-uninitialized If true, the kubectl command applies to uninitialized objects. If explicitly set to false, this flag overrides other flags that make the kubectl commands apply to uninitialized objects, e.g., "--all". Objects with empty metadata.initializers are regarded as initialized.
-o, --output string Output format. One of: json|yaml|name|template|go-template|go-template-file|templatefile|jsonpath|jsonpath-file.
-o, --output string Output format. One of: json|yaml|name|go-template-file|templatefile|template|go-template|jsonpath|jsonpath-file.
--output-patch Output the patch if the resource is edited.
--record Record current kubectl command in the resource annotation. If set to false, do not record the command. If set to true, record the command. If not set, default to updating the existing annotation value only if one already exists.
-R, --recursive Process the directory used in -f, --filename recursively. Useful when you want to manage related manifests organized within the same directory.
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 96dc083

Please sign in to comment.