Skip to content

Commit

Permalink
Add rabbitmq crd (#785)
Browse files Browse the repository at this point in the history
* Add rabbitmq crd

Signed-off-by: raihankhan <raihan@appscode.com>
  • Loading branch information
raihankhan committed Jan 19, 2024
1 parent 06495db commit eec84b6
Show file tree
Hide file tree
Showing 9 changed files with 53 additions and 7 deletions.
3 changes: 3 additions & 0 deletions catalog/kubedb/active_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,9 @@
"2.3.2-debian",
"2.3.2-centos"
],
"Rabbitmq": [
"3.12.12"
],
"Redis": [
"7.2.3",
"7.0.14",
Expand Down
12 changes: 12 additions & 0 deletions catalog/kubedb/raw/rabbitmq/rabbitmq-3.12.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: RabbitmqVersion
metadata:
name: 3.12.12
spec:
db:
image: ghcr.io/appscode-images/rabbitmq:3.12.12-management-alpine
initContainer:
image: ghcr.io/kubedb/rabbitmq-init:3.12.12
securityContext:
runAsUser: 1001
version: 3.12.12
4 changes: 4 additions & 0 deletions catalog/kubestash/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -275,6 +275,10 @@ func main() {
if strings.HasPrefix(args[i], "--redis-args=") {
args[i] = fmt.Sprintf(`--redis-args=${args:={{ .Values.%s.args }}}`, app)
}
case "rabbitmq":
if strings.HasPrefix(args[i], "--rabbitmq-args=") {
args[i] = fmt.Sprintf(`--rabbitmq-args=${args:={{ .Values.%s.args }}}`, app)
}
}
}

Expand Down
4 changes: 3 additions & 1 deletion charts/kubedb-catalog/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ The following table lists the configurable parameters of the `kubedb-catalog` ch
| featureGates.PgPool | | <code>false</code> |
| featureGates.Postgres | | <code>true</code> |
| featureGates.ProxySQL | | <code>true</code> |
| featureGates.RabbitMQ | | <code>false</code> |
| featureGates.Rabbitmq | | <code>true</code> |
| featureGates.Redis | | <code>true</code> |
| featureGates.SingleStore | | <code>false</code> |
| featureGates.Solr | | <code>false</code> |
Expand All @@ -97,6 +97,8 @@ The following table lists the configurable parameters of the `kubedb-catalog` ch
| psp.redis.privileged | | <code>false</code> |
| psp.kafka.allowPrivilegeEscalation | | <code>false</code> |
| psp.kafka.privileged | | <code>false</code> |
| psp.rabbitmq.allowPrivilegeEscalation | | <code>false</code> |
| psp.rabbitmq.privileged | | <code>false</code> |
| skipDeprecated | Set true to avoid deploying deprecated versions | <code>true</code> |


Expand Down
22 changes: 22 additions & 0 deletions charts/kubedb-catalog/templates/rabbitmq/rabbitmq-3.12.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
{{ $featureGates := .Values.featureGates }}
{{- if .Values.global }}
{{ $featureGates = mergeOverwrite dict .Values.featureGates .Values.global.featureGates }}
{{- end }}

{{ if $featureGates.Rabbitmq }}

apiVersion: catalog.kubedb.com/v1alpha1
kind: RabbitmqVersion
metadata:
name: '3.12.12'
labels:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
db:
image: '{{ include "image.ghcr" (merge (dict "_repo" "appscode-images/rabbitmq") $) }}:3.12.12-management-alpine'
initContainer:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/rabbitmq-init") $) }}:3.12.12'
securityContext:
runAsUser: 1001
version: 3.12.12
{{ end }}
5 changes: 4 additions & 1 deletion charts/kubedb-catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ featureGates:
PgPool: false
Postgres: true
ProxySQL: true
RabbitMQ: false
Rabbitmq: true
Redis: true
SingleStore: false
Solr: false
Expand Down Expand Up @@ -78,6 +78,9 @@ psp:
kafka:
allowPrivilegeEscalation: false
privileged: false
rabbitmq:
allowPrivilegeEscalation: false
privileged: false

# Set true to avoid deploying deprecated versions
skipDeprecated: true
4 changes: 2 additions & 2 deletions charts/kubedb-webhook-server/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,9 @@ The following table lists the configurable parameters of the `kubedb-webhook-ser
| featureGates.PgPool | | <code>false</code> |
| featureGates.Postgres | | <code>true</code> |
| featureGates.ProxySQL | | <code>true</code> |
| featureGates.RabbitMQ | | <code>false</code> |
| featureGates.RabbitMQ | | <code>true</code> |
| featureGates.Redis | | <code>true</code> |
| featureGates.SingleStore | | <code>false</code> |
| featureGates.Singlestore | | <code>false</code> |
| featureGates.Solr | | <code>false</code> |
| featureGates.ZooKeeper | | <code>true</code> |
| imagePullSecrets | Specify an array of imagePullSecrets. Secrets must be manually created in the namespace. <br> Example: <br> `helm template charts/kubedb-webhook-server \` <br> `--set imagePullSecrets[0].name=sec0 \` <br> `--set imagePullSecrets[1].name=sec1` | <code>[]</code> |
Expand Down
4 changes: 2 additions & 2 deletions charts/kubedb-webhook-server/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ featureGates:
PgPool: false
Postgres: true
ProxySQL: true
RabbitMQ: false
RabbitMQ: true
Redis: true
SingleStore: false
Singlestore: false
Solr: false
ZooKeeper: true

Expand Down
2 changes: 1 addition & 1 deletion hack/scripts/import-crds.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ crd_dir=${1:-}/apimachinery/crds
update_kubedb_crds=true

api_repo_url=https://github.com/kubedb/apimachinery.git
api_repo_tag=${KUBEDB_APIMACHINERY_TAG:-master}
api_repo_tag=${KUBEDB_APIMACHINERY_TAG:-rabbitmq}

if [ "$#" -ne 1 ]; then
if [ "${api_repo_tag}" == "master" ]; then
Expand Down

0 comments on commit eec84b6

Please sign in to comment.