Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions docs/examples/mongodb/Initialization/git-sync-pat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: kubedb.com/v1
kind: MongoDB
metadata:
name: rs
namespace: demo
spec:
init:
script:
scriptPath: "current"
git:
args:
# use --ssh for private repository
- --repo=<private_git_repo_http_url>
- --depth=1
- --period=60s
- --link=current
- --root=/git
- --credential={"url":"https://github.com","username":"<username>","password-file":"/etc/git-secret/github-pat"}
# terminate after successful sync
- --one-time
authSecret:
name: git-pat
# run as git sync user
securityContext:
runAsUser: 65533
podTemplate:
spec:
# permission for reading ssh key
securityContext:
fsGroup: 65533
version: "8.0.4"
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
deletionPolicy: WipeOut
28 changes: 28 additions & 0 deletions docs/examples/mongodb/Initialization/git-sync-public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
apiVersion: kubedb.com/v1
kind: MongoDB
metadata:
name: rs
namespace: demo
spec:
init:
script:
scriptPath: "current"
git:
args:
- --repo=https://github.com/kubedb/git-sync-demo.git
- --depth=1
- --period=60s
- --link=current
- --root=/git
# terminate after successful sync
- --one-time
version: "8.0.4"
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
deletionPolicy: WipeOut
40 changes: 40 additions & 0 deletions docs/examples/mongodb/Initialization/git-sync-ssh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
apiVersion: kubedb.com/v1
kind: MongoDB
metadata:
name: rs
namespace: demo
spec:
init:
script:
scriptPath: "current"
git:
args:
# use --ssh for private repository
- --ssh
- --repo=<private_git_repo_ssh_url>
- --depth=1
- --period=60s
- --link=current
- --root=/git
# terminate after successful sync
- --one-time
authSecret:
name: git-creds
# run as git sync user
securityContext:
runAsUser: 65533
podTemplate:
spec:
# permission for reading ssh key
securityContext:
fsGroup: 65533
version: "8.0.4"
storageType: Durable
storage:
storageClassName: "standard"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 10Gi
deletionPolicy: WipeOut
37 changes: 37 additions & 0 deletions docs/examples/redis/initialization/git-sync-pat.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: kubedb.com/v1
kind: Redis
metadata:
name: redis-demo
namespace: demo
spec:
version: 8.2.2
mode: Cluster
init:
script:
scriptPath: "redis_script.git"
git:
args:

- --repo=<private_git_repo_http_url>
- --depth=1
- --period=60s
- --root=/init-script-from-git
- --credential={"url":"https://github.com","username":"<username>","password-file":"/etc/git-secret/github-pat"}
# terminate after successful sync
- --one-time
authSecret:
# the name of the secret created above
name: git-pat
# run as git credentials user
cluster:
shards: 3
replicas: 2
storageType: Durable
storage:
resources:
requests:
storage: 20M
storageClassName: "standard"
accessModes:
- ReadWriteOnce
deletionPolicy: WipeOut
27 changes: 27 additions & 0 deletions docs/examples/redis/initialization/git-sync-public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kubedb.com/v1alpha2
kind: Redis
metadata:
name: redis-demo
namespace: demo
spec:
version: "8.2.2"
mode: Standalone
storage:
storageClassName: "local-path"
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 50Mi
init:
script:
scriptPath: "redis-init-scripts"
git:
args:
- --repo=https://github.com/kubedb/redis-init-scripts
- --depth=1
- --period=60s
- --one-time
securityContext:
runAsUser: 999
terminationPolicy: Delete
37 changes: 37 additions & 0 deletions docs/examples/redis/initialization/git-sync-ssh.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
apiVersion: kubedb.com/v1
kind: Redis
metadata:
name: redis-demo
namespace: demo
spec:
version: 8.2.2
mode: Cluster
init:
script:
scriptPath: "redis_script.git"
git:
args:
# use --ssh for private repository
- --ssh
- --repo=<private_git_repo_ssh_url>
- --depth=1
- --period=60s
- --root=/init-script-from-git
# terminate after successful sync
- --one-time
authSecret:
# the name of the secret created above
name: git-creds
# got credentials from the secret
cluster:
shards: 3
replicas: 2
storageType: Durable
storage:
resources:
requests:
storage: 20M
storageClassName: "standard"
accessModes:
- ReadWriteOnce
deletionPolicy: WipeOut
4 changes: 1 addition & 3 deletions docs/guides/ignite/custom-configuration/using-config-file.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,9 @@ KubeDB supports providing custom configuration for Ignite. This tutorial will sh

Ignite does not allows to configuration via any file. However, configuration parameters can be set as arguments while starting the ignite docker image. To keep similarity with other KubeDB supported databases which support configuration through a config file, KubeDB has added an additional executable script on top of the official ignite docker image. This script parses the configuration file then set them as arguments of ignite binary.

To know more about configuring Ignite server see [here](https://ignite.apache.org/docs/latest/understanding-configuration).

At first, you have to create a config file named `node-configuration.xml` with your desired configuration. Then you have to put this file into a [volume](https://kubernetes.io/docs/concepts/storage/volumes/). You have to specify this volume in `spec.configSecret` section while creating Ignite crd. KubeDB will mount this volume into `/usr/config` directory of the database pod.

In this tutorial, we will enable ignite's [authentication](https://ignite.apache.org/docs/latest/security/authentication) via secret.
In this tutorial, we will enable ignite's authentication via secret.

Create a secret with custom configuration file:
```yaml
Expand Down
Loading
Loading