Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 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
3 changes: 3 additions & 0 deletions catalog/kubedb/active_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
"DB2": [
"11.5.8.0"
],
"DocumentDB": [
"2.0.0"
],
"Druid": [
"36.0.0",
"35.0.1",
Expand Down
12 changes: 12 additions & 0 deletions catalog/kubedb/raw/documentdb/documentdb-2.0.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: catalog.kubedb.com/v1alpha1
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

add one more version, pg16-0.109.0

kind: DocumentDBVersion
metadata:
name: 2.0.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

rename to pg17-0.109.0

spec:
db:
image: ghcr.io/documentdb/documentdb/documentdb-local
postgres:
version: 17.4-documentdb
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use a tagged version with this image ghcr.io/documentdb/documentdb/documentdb-local:pg17-0.109.0

securityContext:
runAsUser: 1000
version: 2.0.0
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

0.109.0

36 changes: 36 additions & 0 deletions catalog/scripts/documentdb/copy-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
#!/bin/bash

# Copyright AppsCode Inc. and Contributors
#
# Licensed under the AppsCode Community License 1.0.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

if [ -z "${IMAGE_REGISTRY}" ]; then
echo "IMAGE_REGISTRY is not set"
exit 1
fi

OS=$(uname -o)
if [ "${OS}" = "GNU/Linux" ]; then
OS=Linux
fi
ARCH=$(uname -m)
if [ "${ARCH}" = "aarch64" ]; then
ARCH=arm64
fi
curl -sL "https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_${OS}_${ARCH}.tar.gz" >/tmp/go-containerregistry.tar.gz
tar -zxvf /tmp/go-containerregistry.tar.gz -C /tmp/
mv /tmp/crane .

CMD="./crane"
35 changes: 35 additions & 0 deletions catalog/scripts/documentdb/export-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
#!/bin/bash

# Copyright AppsCode Inc. and Contributors
#
# Licensed under the AppsCode Community License 1.0.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

mkdir -p images

OS=$(uname -o)
if [ "${OS}" = "GNU/Linux" ]; then
OS=Linux
fi
ARCH=$(uname -m)
if [ "${ARCH}" = "aarch64" ]; then
ARCH=arm64
fi
curl -sL "https://github.com/google/go-containerregistry/releases/latest/download/go-containerregistry_${OS}_${ARCH}.tar.gz" >/tmp/go-containerregistry.tar.gz
tar -zxvf /tmp/go-containerregistry.tar.gz -C /tmp/
mv /tmp/crane images

CMD="./images/crane"

tar -czvf images.tar.gz images
Empty file.
27 changes: 27 additions & 0 deletions catalog/scripts/documentdb/import-images.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Copyright AppsCode Inc. and Contributors
#
# Licensed under the AppsCode Community License 1.0.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

if [ -z "${IMAGE_REGISTRY}" ]; then
echo "IMAGE_REGISTRY is not set"
exit 1
fi

TARBALL=${1:-}
tar -zxvf $TARBALL

CMD="./crane"
25 changes: 25 additions & 0 deletions catalog/scripts/documentdb/import-into-k3s.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#!/bin/bash

# Copyright AppsCode Inc. and Contributors
#
# Licensed under the AppsCode Community License 1.0.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://github.com/appscode/licenses/raw/1.0.0/AppsCode-Community-1.0.0.md
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

set -x

if [ -z "${IMAGE_REGISTRY}" ]; then
echo "IMAGE_REGISTRY is not set"
exit 1
fi

TARBALL=${1:-}
tar -zxvf $TARBALL
1 change: 1 addition & 0 deletions charts/kubedb-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ The following table lists the configurable parameters of the `kubedb-catalog` ch
| featureGates.Cassandra | | <code>true</code> |
| featureGates.ClickHouse | | <code>true</code> |
| featureGates.DB2 | | <code>true</code> |
| featureGates.DocumentDB | | <code>true</code> |
| featureGates.Druid | | <code>true</code> |
| featureGates.Elasticsearch | | <code>true</code> |
| featureGates.FerretDB | | <code>true</code> |
Expand Down
27 changes: 27 additions & 0 deletions charts/kubedb-catalog/templates/documentdb/documentdb-2.0.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
{{- template "kubedb-catalog.refresh-versions" . }}

{{ $featureGates := .Values.featureGates }}
{{ $ubi := .Values.distro.ubi }}
{{- if .Values.global }}
{{ $featureGates = mergeOverwrite dict .Values.featureGates .Values.global.featureGates }}
{{ $ubi = default .Values.distro.ubi .Values.global.distro.ubi }}
{{- end }}

{{ if and $featureGates.DocumentDB (not (eq $ubi "operator")) }}


apiVersion: catalog.kubedb.com/v1alpha1
kind: DocumentDBVersion
metadata:
name: '2.0.0'
labels:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
db:
image: '{{ include "image.ghcr" (merge (dict "_repo" "documentdb/documentdb/documentdb-local") $) }}'
postgres:
version: 17.4-documentdb
securityContext:
runAsUser: 1000
version: 2.0.0
{{ end }}
1 change: 1 addition & 0 deletions charts/kubedb-catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ featureGates:
Cassandra: true
ClickHouse: true
DB2: true
DocumentDB: true
Druid: true
Elasticsearch: true
FerretDB: true
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-crd-manager/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ The following table lists the configurable parameters of the `kubedb-crd-manager
| featureGates.Cassandra | | <code>false</code> |
| featureGates.ClickHouse | | <code>false</code> |
| featureGates.DB2 | | <code>false</code> |
| featureGates.DocumentDB | | <code>false</code> |
| featureGates.Druid | | <code>false</code> |
| featureGates.Elasticsearch | | <code>false</code> |
| featureGates.FerretDB | | <code>false</code> |
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-crd-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ featureGates:
Cassandra: false
ClickHouse: false
DB2: false
DocumentDB: false
Druid: false
Elasticsearch: false
FerretDB: false
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-webhook-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ The following table lists the configurable parameters of the `kubedb-webhook-ser
| featureGates.Cassandra | | <code>false</code> |
| featureGates.ClickHouse | | <code>false</code> |
| featureGates.DB2 | | <code>false</code> |
| featureGates.DocumentDB | | <code>false</code> |
| featureGates.Druid | | <code>false</code> |
| featureGates.Elasticsearch | | <code>true</code> |
| featureGates.FerretDB | | <code>false</code> |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,24 @@ webhooks:
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
{{- end }}
{{- if $featureGates.DocumentDB }}
- name: documentdbwebhook.mutators.kubedb.com
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ include "kubedb-webhook-server.fullname" . }}
path: /mutate-kubedb-com-v1alpha2-documentdb
port: 443
caBundle: {{ $._caCrt }}
rules:
- apiGroups: ["kubedb.com"]
apiVersions: ["*"]
resources: ["documentdbs"]
operations: ["CREATE", "UPDATE"]
admissionReviewVersions: ["v1beta1"]
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
{{- end }}
{{- if $featureGates.Druid }}
- name: druidwebhook.mutators.kubedb.com
clientConfig:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,25 @@ webhooks:
sideEffects: None
matchPolicy: Equivalent
{{- end }}
{{- if $featureGates.DocumentDB }}
- name: documentdbwebhook.validators.kubedb.com
clientConfig:
service:
namespace: {{ .Release.Namespace }}
name: {{ include "kubedb-webhook-server.fullname" . }}
path: /validate-kubedb-com-v1alpha2-documentdb
port: 443
caBundle: {{ $._caCrt }}
rules:
- apiGroups: ["kubedb.com"]
apiVersions: ["*"]
resources: ["documentdbs"]
operations: ["CREATE", "UPDATE", "DELETE"]
admissionReviewVersions: ["v1"]
failurePolicy: {{ .Values.apiserver.webhook.failurePolicy }}
sideEffects: None
matchPolicy: Equivalent
{{- end }}
{{- if $featureGates.Druid }}
- name: druidwebhook.validators.kubedb.com
clientConfig:
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb-webhook-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ featureGates:
Cassandra: false
ClickHouse: false
DB2: false
DocumentDB: false
Druid: false
Elasticsearch: true
FerretDB: false
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ The following table lists the configurable parameters of the `kubedb` chart and
| global.featureGates.Cassandra | | <code>false</code> |
| global.featureGates.ClickHouse | | <code>false</code> |
| global.featureGates.DB2 | | <code>false</code> |
| global.featureGates.DocumentDB | | <code>false</code> |
| global.featureGates.Druid | | <code>false</code> |
| global.featureGates.Elasticsearch | | <code>true</code> |
| global.featureGates.FerretDB | | <code>false</code> |
Expand Down
1 change: 1 addition & 0 deletions charts/kubedb/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ global:
Cassandra: false
ClickHouse: false
DB2: false
DocumentDB: false
Druid: false
Elasticsearch: true
FerretDB: false
Expand Down
1 change: 1 addition & 0 deletions config/samples/installer_v1_kubedb.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ spec:
featureGates:
Cassandra: false
ClickHouse: false
DocumentDB: false
DB2: false
Druid: false
Elasticsearch: true
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -15,11 +15,11 @@ require (
k8s.io/apimachinery v0.34.3
kmodules.xyz/client-go v0.34.3
kmodules.xyz/go-containerregistry v0.0.15
kmodules.xyz/image-packer v0.0.0-20260211014345-daa6afa3ceba
kmodules.xyz/resource-metadata v0.42.9
kmodules.xyz/image-packer v0.0.0-20260313163835-e88c9cfe24d3
kmodules.xyz/resource-metadata v0.43.0
kmodules.xyz/schema-checker v0.4.2
kubedb.dev/apimachinery v0.63.1-0.20260410110703-d64cb9b9e613
kubeops.dev/installer v0.0.0-20260305065349-dbc8a048d7dd
kubeops.dev/installer v0.0.0-20260409180749-66bc29c4e4c9
sigs.k8s.io/yaml v1.6.0
stash.appscode.dev/installer v0.12.2-0.20260224175756-ac464b38bf6c
)
Expand Down
Loading
Loading