Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
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
9 changes: 4 additions & 5 deletions .github/workflows/preview-website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
jobs:
build:
name: Build
runs-on: ubuntu-24.04
runs-on: firecracker
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -32,10 +32,9 @@ jobs:

- name: Install yq
run: |
curl -fsSL -o yqq https://github.com/mikefarah/yq/releases/download/3.3.0/yq_linux_amd64
chmod +x yqq
sudo mv yqq /usr/local/bin/yqq
pipx install yq
curl -fsSL -o yq https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64
chmod +x yq
sudo mv yq /usr/local/bin/yq

- name: Install Hugo
run: |
Expand Down
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
27 changes: 27 additions & 0 deletions docs/examples/pgbouncer/initialization/git-sync-public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kubedb.com/v1
kind: PgBouncer
metadata:
name: pb
namespace: demo
spec:
version: "1.24.0"
replicas: 1
database:
syncUsers: true
databaseName: "postgres"
databaseRef:
name: "quick-postgres"
namespace: demo
connectionPool:
maxClientConnections: 20
reservePoolSize: 5
init:
script:
git:
args:
- --repo=https://github.com/kubedb/pgbouncer-pgpool-init-scripts
- --depth=1
- --period=60s
- --one-time
resources: {}
scriptPath: pgbouncer-pgpool-init-scripts/pgbouncer
27 changes: 27 additions & 0 deletions docs/examples/pgpool/initialization/git-sync/git-sync-public.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
apiVersion: kubedb.com/v1alpha2
kind: Pgpool
metadata:
name: pgpool-demo
namespace: demo
spec:
version: "4.4.5"
replicas: 1
postgresRef:
name: postgres
namespace: demo
initConfig:
pgpoolConfig:
num_init_children : 6
max_pool : 65
child_life_time : 400
deletionPolicy: WipeOut
init:
script:
scriptPath: "current"
git:
args:
- --repo=https://github.com/kubedb/pgbouncer-pgpool-init-scripts
- --depth=1
- --add-user=true
- --period=60s
- --one-time
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
2 changes: 1 addition & 1 deletion docs/guides/ignite/concepts/opsrequest.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
title: IgniteOpsRequests CRD
menu:
docs_{{ .version }}:
identifier: ch-opsrequest-concepts
identifier: ig-opsrequest-concepts
name: IgniteOpsRequest
parent: ig-concepts-ignite
weight: 15
Expand Down
15 changes: 4 additions & 11 deletions docs/guides/mariadb/initialization/git-sync.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ spec:
git:
args:
# update with your private repository
- --repo=[email protected]:refat75/mysql-init-scripts.git
- --repo=<your-ssh-repo-url>
- --link=current
- --root=/root
# terminate after one successful sync
Expand All @@ -185,10 +185,6 @@ spec:
deletionPolicy: WipeOut
```

```bash
kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/mariadb/initialization/git-sync-ssh.yaml
mariadb.kubedb.com/sample-mariadb created
```

Here,
- `.spec.init.git.securityContext.runAsUser: 65533` ensure the container runs as the dedicated non-root `git-sync` user.
Expand Down Expand Up @@ -222,10 +218,10 @@ spec:
git:
args:
# update with your private repository
- --repo=https://github.com/refat75/mysql-init-scripts.git
- --repo=<your-https-repo-url>
- --link=current
- --root=/root
- --credential={"url":"https://github.com","username":"refat75","password-file":"/etc/git-secret/github-pat"}
- --credential={"url":"https://github.com","username":"<username>","password-file":"/etc/git-secret/github-pat"}
# terminate after one successful sync
- --one-time
authSecret:
Expand All @@ -243,10 +239,6 @@ spec:
deletionPolicy: WipeOut
```

```bash
kubectl create -f https://github.com/kubedb/docs/raw/{{< param "info.version" >}}/docs/examples/mariadb/initialization/git-sync-pat.yaml
mariadb.kubedb.com/sample-mariadb created
```

Once the database reaches the `Ready` state, you can verify the data using the method described above.

Expand All @@ -257,5 +249,6 @@ To clean up the Kubernetes resources created by this tutorial, run:

```bash
$ kubectl delete mariadb -n demo sample-mariadb
$ kubectl delete secret -n demo git-pat git-creds
$ kubectl delete ns demo
```
Loading
Loading