Skip to content

Commit

Permalink
Add kafka connector plugin version cr
Browse files Browse the repository at this point in the history
Signed-off-by: obaydullahmhs <[email protected]>
  • Loading branch information
obaydullahmhs committed Jan 16, 2024
1 parent c155e91 commit afe8fa4
Show file tree
Hide file tree
Showing 65 changed files with 348 additions and 193 deletions.
4 changes: 4 additions & 0 deletions catalog/kubedb/active_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@
"3.3.0"
],
"KafkaConnector": [
"s3-2.15.0",
"postgres-2.4.2.final",
"mysql-2.4.2.final",
"mongodb-1.11.0",
"gcs-0.13.0"
],
"MariaDB": [
Expand Down
6 changes: 6 additions & 0 deletions catalog/kubedb/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,11 @@ func main() {
panic(err)
}
}
} else if dbKind == "KafkaConnector" {
connectorType, _, _ := unstructured.NestedString(ri.Object.Object, "spec", "type")
if distro == "" {
distro = connectorType
}
}

dbVersion, _, err := unstructured.NestedString(ri.Object.Object, "spec", "version")
Expand Down Expand Up @@ -581,6 +586,7 @@ func main() {
filenameparts = append(filenameparts, strings.ToLower(k.Distro))
}
filename := filepath.Join(dir, "charts", "kubedb-catalog", "new_templates", strings.ToLower(dbKind), fmt.Sprintf("%s.yaml", strings.Join(filenameparts, "-")))
fmt.Println("bbbbbbbbbbbbb", filename)
err = os.MkdirAll(filepath.Dir(filename), 0o755)
if err != nil {
panic(err)
Expand Down
2 changes: 1 addition & 1 deletion catalog/kubedb/raw/kafka/kafka-3.3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: 3.3.0
spec:
connectCluster:
image: obaydullahmhs/connect-cluster:3.6.0_linux_amd64
image: ghcr.io/appscode-images/kafka-connect-cluster:3.3.2
cruiseControl:
image: ghcr.io/kubedb/cruise-control:3.3.0
db:
Expand Down
6 changes: 3 additions & 3 deletions catalog/kubedb/raw/kafka/kafka-3.3.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
name: 3.3.2
spec:
connectCluster:
image: obaydullahmhs/connect-cluster:3.6.0_linux_amd64
image: ghcr.io/appscode-images/kafka-connect-cluster:3.3.2
cruiseControl:
image: ghcr.io/kubedb/cruise-control:3.3.2
image: ghcr.io/appscode-images/cruise-control:3.3.2
db:
image: ghcr.io/kubedb/kafka-kraft:3.3.2
image: ghcr.io/appscode-images/kafka-kraft:3.3.2
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion catalog/kubedb/raw/kafka/kafka-3.4.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ metadata:
name: 3.4.0
spec:
connectCluster:
image: obaydullahmhs/connect-cluster:3.6.0_linux_amd64
image: ghcr.io/appscode-images/kafka-connect-cluster:3.4.1
cruiseControl:
image: ghcr.io/kubedb/cruise-control:3.4.0
db:
Expand Down
6 changes: 3 additions & 3 deletions catalog/kubedb/raw/kafka/kafka-3.4.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
name: 3.4.1
spec:
connectCluster:
image: obaydullahmhs/connect-cluster:3.6.0_linux_amd64
image: ghcr.io/appscode-images/kafka-connect-cluster:3.4.1
cruiseControl:
image: ghcr.io/kubedb/cruise-control:3.4.1
image: ghcr.io/appscode-images/cruise-control:3.4.1
db:
image: ghcr.io/kubedb/kafka-kraft:3.4.1
image: ghcr.io/appscode-images/kafka-kraft:3.4.1
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
6 changes: 3 additions & 3 deletions catalog/kubedb/raw/kafka/kafka-3.5.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
name: 3.5.1
spec:
connectCluster:
image: obaydullahmhs/connect-cluster:3.6.0_linux_amd64
image: ghcr.io/appscode-images/kafka-connect-cluster:3.5.1
cruiseControl:
image: ghcr.io/kubedb/cruise-control:3.5.1
image: ghcr.io/appscode-images/cruise-control:3.5.1
db:
image: ghcr.io/kubedb/kafka-kraft:3.5.1
image: ghcr.io/appscode-images/kafka-kraft:3.5.1
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
6 changes: 3 additions & 3 deletions catalog/kubedb/raw/kafka/kafka-3.6.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ metadata:
name: 3.6.0
spec:
connectCluster:
image: obaydullahmhs/connect-cluster:3.6.0_linux_amd64
image: ghcr.io/appscode-images/kafka-connect-cluster:3.6.0
cruiseControl:
image: ghcr.io/kubedb/cruise-control:3.6.0
image: ghcr.io/appscode-images/cruise-control:3.6.0
db:
image: ghcr.io/kubedb/kafka-kraft:3.6.0
image: ghcr.io/appscode-images/kafka-kraft:3.6.0
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaConnectorVersion
metadata:
name: mongodb-1.11.0
spec:
connectorPlugin:
image: ghcr.io/appscode-images/kafka-connector-mongodb:1.11.0
podSecurityPolicies:
databasePolicyName: kafkaconnector
securityContext:
runAsUser: 1001
type: MongoDB
version: 1.11.0
13 changes: 13 additions & 0 deletions catalog/kubedb/raw/kafkaconnector/kafkaconnector-2.15.0-s3.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaConnectorVersion
metadata:
name: s3-2.15.0
spec:
connectorPlugin:
image: ghcr.io/appscode-images/kafka-connector-s3:2.15.0
podSecurityPolicies:
databasePolicyName: kafkaconnector
securityContext:
runAsUser: 1001
type: S3
version: 2.15.0
13 changes: 13 additions & 0 deletions catalog/kubedb/raw/kafkaconnector/kafkaconnector-2.4.2-mysql.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaConnectorVersion
metadata:
name: mysql-2.4.2.final
spec:
connectorPlugin:
image: ghcr.io/appscode-images/kafka-connector-mysql:2.4.2.final
podSecurityPolicies:
databasePolicyName: kafkaconnector
securityContext:
runAsUser: 1001
type: MySQL
version: 2.4.2
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaConnectorVersion
metadata:
name: postgres-2.4.2.final
spec:
connectorPlugin:
image: ghcr.io/appscode-images/kafka-connector-postgres:2.4.2.final
podSecurityPolicies:
databasePolicyName: kafkaconnector
securityContext:
runAsUser: 1001
type: Postgres
version: 2.4.2
12 changes: 6 additions & 6 deletions charts/kubedb-autoscaler/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
## TL;DR;

```bash
$ helm repo add appscode-testing https://charts.appscode.com/testing/
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode-testing/kubedb-autoscaler --version=v0.26.0-beta.0
$ helm upgrade -i kubedb-autoscaler appscode-testing/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0
$ helm search repo appscode/kubedb-autoscaler --version=v0.26.0-beta.0
$ helm upgrade -i kubedb-autoscaler appscode/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0
```

## Introduction
Expand All @@ -24,7 +24,7 @@ This chart deploys a KubeDB Autoscaler operator on a [Kubernetes](http://kuberne
To install/upgrade the chart with the release name `kubedb-autoscaler`:

```bash
$ helm upgrade -i kubedb-autoscaler appscode-testing/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0
$ helm upgrade -i kubedb-autoscaler appscode/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0
```

The command deploys a KubeDB Autoscaler operator on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand Down Expand Up @@ -90,12 +90,12 @@ The following table lists the configurable parameters of the `kubedb-autoscaler`
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

```bash
$ helm upgrade -i kubedb-autoscaler appscode-testing/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0 --set replicaCount=1
$ helm upgrade -i kubedb-autoscaler appscode/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0 --set replicaCount=1
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm upgrade -i kubedb-autoscaler appscode-testing/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0 --values values.yaml
$ helm upgrade -i kubedb-autoscaler appscode/kubedb-autoscaler -n kubedb --create-namespace --version=v0.26.0-beta.0 --values values.yaml
```
4 changes: 2 additions & 2 deletions charts/kubedb-autoscaler/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project:
description: Autoscale KubeDB operated Databases
app: a KubeDB Autoscaler operator
repository:
url: https://charts.appscode.com/testing/
name: appscode-testing
url: https://charts.appscode.com/stable/
name: appscode
chart:
name: kubedb-autoscaler
values: -- generate from values file --
Expand Down
12 changes: 6 additions & 6 deletions charts/kubedb-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@
## TL;DR;

```bash
$ helm repo add appscode-testing https://charts.appscode.com/testing/
$ helm repo add appscode https://charts.appscode.com/stable/
$ helm repo update
$ helm search repo appscode-testing/kubedb-catalog --version=v2024.1.7-beta.0
$ helm upgrade -i kubedb-catalog appscode-testing/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0
$ helm search repo appscode/kubedb-catalog --version=v2024.1.7-beta.0
$ helm upgrade -i kubedb-catalog appscode/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0
```

## Introduction
Expand All @@ -24,7 +24,7 @@ This chart deploys KubeDB catalog on a [Kubernetes](http://kubernetes.io) cluste
To install/upgrade the chart with the release name `kubedb-catalog`:

```bash
$ helm upgrade -i kubedb-catalog appscode-testing/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0
$ helm upgrade -i kubedb-catalog appscode/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0
```

The command deploys KubeDB catalog on the Kubernetes cluster in the default configuration. The [configuration](#configuration) section lists the parameters that can be configured during installation.
Expand Down Expand Up @@ -106,12 +106,12 @@ The following table lists the configurable parameters of the `kubedb-catalog` ch
Specify each parameter using the `--set key=value[,key=value]` argument to `helm upgrade -i`. For example:

```bash
$ helm upgrade -i kubedb-catalog appscode-testing/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0 --set proxies.ghcr=ghcr.io
$ helm upgrade -i kubedb-catalog appscode/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0 --set proxies.ghcr=ghcr.io
```

Alternatively, a YAML file that specifies the values for the parameters can be provided while
installing the chart. For example:

```bash
$ helm upgrade -i kubedb-catalog appscode-testing/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0 --values values.yaml
$ helm upgrade -i kubedb-catalog appscode/kubedb-catalog -n kubedb --create-namespace --version=v2024.1.7-beta.0 --values values.yaml
```
4 changes: 2 additions & 2 deletions charts/kubedb-catalog/doc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ project:
description: Catalog of database versions supported by KubeDB
app: KubeDB catalog
repository:
url: https://charts.appscode.com/testing/
name: appscode-testing
url: https://charts.appscode.com/stable/
name: appscode
chart:
name: kubedb-catalog
values: -- generate from values file --
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb-catalog/templates/kafka/kafka-3.3.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectCluster:
image: '{{ include "image.dockerHub" (merge (dict "_repo" "obaydullahmhs/connect-cluster") $) }}:3.6.0_linux_amd64'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connect-cluster") $) }}:3.3.2'
cruiseControl:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/cruise-control") $) }}:3.3.0'
db:
Expand Down
6 changes: 3 additions & 3 deletions charts/kubedb-catalog/templates/kafka/kafka-3.3.2.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ metadata:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectCluster:
image: '{{ include "image.dockerHub" (merge (dict "_repo" "obaydullahmhs/connect-cluster") $) }}:3.6.0_linux_amd64'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connect-cluster") $) }}:3.3.2'
cruiseControl:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/cruise-control") $) }}:3.3.2'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/cruise-control") $) }}:3.3.2'
db:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/kafka-kraft") $) }}:3.3.2'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-kraft") $) }}:3.3.2'
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb-catalog/templates/kafka/kafka-3.4.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectCluster:
image: '{{ include "image.dockerHub" (merge (dict "_repo" "obaydullahmhs/connect-cluster") $) }}:3.6.0_linux_amd64'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connect-cluster") $) }}:3.4.1'
cruiseControl:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/cruise-control") $) }}:3.4.0'
db:
Expand Down
6 changes: 3 additions & 3 deletions charts/kubedb-catalog/templates/kafka/kafka-3.4.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ metadata:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectCluster:
image: '{{ include "image.dockerHub" (merge (dict "_repo" "obaydullahmhs/connect-cluster") $) }}:3.6.0_linux_amd64'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connect-cluster") $) }}:3.4.1'
cruiseControl:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/cruise-control") $) }}:3.4.1'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/cruise-control") $) }}:3.4.1'
db:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/kafka-kraft") $) }}:3.4.1'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-kraft") $) }}:3.4.1'
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
6 changes: 3 additions & 3 deletions charts/kubedb-catalog/templates/kafka/kafka-3.5.1.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ metadata:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectCluster:
image: '{{ include "image.dockerHub" (merge (dict "_repo" "obaydullahmhs/connect-cluster") $) }}:3.6.0_linux_amd64'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connect-cluster") $) }}:3.5.1'
cruiseControl:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/cruise-control") $) }}:3.5.1'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/cruise-control") $) }}:3.5.1'
db:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/kafka-kraft") $) }}:3.5.1'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-kraft") $) }}:3.5.1'
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
6 changes: 3 additions & 3 deletions charts/kubedb-catalog/templates/kafka/kafka-3.6.0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,11 @@ metadata:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectCluster:
image: '{{ include "image.dockerHub" (merge (dict "_repo" "obaydullahmhs/connect-cluster") $) }}:3.6.0_linux_amd64'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connect-cluster") $) }}:3.6.0'
cruiseControl:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/cruise-control") $) }}:3.6.0'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/cruise-control") $) }}:3.6.0'
db:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/kafka-kraft") $) }}:3.6.0'
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-kraft") $) }}:3.6.0'
podSecurityPolicies:
databasePolicyName: kafka-db
securityContext:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{ $featureGates := .Values.featureGates }}
{{- if .Values.global }}
{{ $featureGates = mergeOverwrite dict .Values.featureGates .Values.global.featureGates }}
{{- end }}

{{ if $featureGates.KafkaConnector }}

apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaConnectorVersion
metadata:
name: 'mongodb-1.11.0'
labels:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectorPlugin:
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connector-mongodb") $) }}:1.11.0'
podSecurityPolicies:
databasePolicyName: kafkaconnector
securityContext:
runAsUser: 1001
type: MongoDB
version: 1.11.0
{{ end }}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{{ $featureGates := .Values.featureGates }}
{{- if .Values.global }}
{{ $featureGates = mergeOverwrite dict .Values.featureGates .Values.global.featureGates }}
{{- end }}

{{ if $featureGates.KafkaConnector }}

apiVersion: catalog.kubedb.com/v1alpha1
kind: KafkaConnectorVersion
metadata:
name: 's3-2.15.0'
labels:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
connectorPlugin:
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/kafka-connector-s3") $) }}:2.15.0'
podSecurityPolicies:
databasePolicyName: kafkaconnector
securityContext:
runAsUser: 1001
type: S3
version: 2.15.0
{{ end }}
Loading

0 comments on commit afe8fa4

Please sign in to comment.