Skip to content

Commit

Permalink
Add rabbitmq crd
Browse files Browse the repository at this point in the history
Signed-off-by: raihankhan <[email protected]>
  • Loading branch information
raihankhan committed Jan 17, 2024
1 parent 4b1a8f0 commit 3785212
Show file tree
Hide file tree
Showing 29 changed files with 102,210 additions and 48,796 deletions.
6 changes: 6 additions & 0 deletions apis/installer/v1alpha1/kubedb_catalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ type PSP struct {
Kafka PSPKafka `json:"kafka"`
//+optional
KafkaConnector PSPKafkaConnector `json:"kafkaconnector"`
//+optional
Rabbitmq PSPRabbitmq `json:"rabbitmq"`
}

type PSPElasticsearch struct {
Expand Down Expand Up @@ -143,6 +145,10 @@ type PSPKafka struct {
AllowPrivilegeEscalation bool `json:"allowPrivilegeEscalation"`
Privileged bool `json:"privileged"`
}
type PSPRabbitmq struct {
AllowPrivilegeEscalation bool `json:"allowPrivilegeEscalation"`
Privileged bool `json:"privileged"`
}

type PSPKafkaConnector struct {
AllowPrivilegeEscalation bool `json:"allowPrivilegeEscalation"`
Expand Down
17 changes: 17 additions & 0 deletions apis/installer/v1alpha1/zz_generated.deepcopy.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions catalog/kubedb/active_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,9 @@
"2.3.2-debian",
"2.3.2-centos"
],
"Rabbitmq": [
"3.12"
],
"Redis": [
"7.2.3",
"7.0.14",
Expand Down
14 changes: 14 additions & 0 deletions catalog/kubedb/raw/rabbitmq/rabbitmq-3.12.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: RabbitmqVersion
metadata:
name: "3.12"
spec:
db:
image: rabbitmq:3.12-management
initContainer:
image: raihankhanraka/rabbitmq-init:3.12
podSecurityPolicies:
databasePolicyName: rabbitmq-db
securityContext:
runAsUser: 1001
version: "3.12"
20 changes: 20 additions & 0 deletions catalog/kubedb/raw/rabbitmq/rabbitmq-psp.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
apiVersion: policy/v1beta1
kind: PodSecurityPolicy
metadata:
name: rabbitmq-db
spec:
allowPrivilegeEscalation: false
fsGroup:
rule: RunAsAny
hostIPC: false
hostNetwork: false
hostPID: false
privileged: false
runAsUser:
rule: RunAsAny
seLinux:
rule: RunAsAny
supplementalGroups:
rule: RunAsAny
volumes:
- '*'
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 @@ -98,6 +98,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> |
| psp.kafkaconnector.allowPrivilegeEscalation | | <code>false</code> |
| psp.kafkaconnector.privileged | | <code>false</code> |
| skipDeprecated | Set true to avoid deploying deprecated versions | <code>true</code> |
Expand Down
144 changes: 144 additions & 0 deletions charts/kubedb-catalog/crds/catalog.kubedb.com_rabbitmqversions.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,144 @@
apiVersion: apiextensions.k8s.io/v1
kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: kubedb
name: rabbitmqversions.catalog.kubedb.com
spec:
group: catalog.kubedb.com
names:
categories:
- datastore
- kubedb
- appscode
kind: RabbitmqVersion
listKind: RabbitmqVersionList
plural: rabbitmqversions
shortNames:
- rmversion
singular: rabbitmqversion
scope: Cluster
versions:
- additionalPrinterColumns:
- jsonPath: .spec.version
name: Version
type: string
- jsonPath: .spec.db.image
name: DB_IMAGE
type: string
- jsonPath: .spec.deprecated
name: Deprecated
type: boolean
- jsonPath: .metadata.creationTimestamp
name: Age
type: date
name: v1alpha1
schema:
openAPIV3Schema:
properties:
apiVersion:
type: string
kind:
type: string
metadata:
type: object
spec:
properties:
db:
properties:
image:
type: string
required:
- image
type: object
deprecated:
type: boolean
initContainer:
properties:
image:
type: string
required:
- image
type: object
podSecurityPolicies:
properties:
databasePolicyName:
type: string
required:
- databasePolicyName
type: object
securityContext:
properties:
runAsUser:
format: int64
type: integer
type: object
stash:
properties:
addon:
properties:
backupTask:
properties:
name:
type: string
params:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
required:
- name
type: object
restoreTask:
properties:
name:
type: string
params:
items:
properties:
name:
type: string
value:
type: string
required:
- name
- value
type: object
type: array
required:
- name
type: object
required:
- backupTask
- restoreTask
type: object
type: object
updateConstraints:
properties:
allowlist:
items:
type: string
type: array
denylist:
items:
type: string
type: array
type: object
version:
type: string
required:
- db
- initContainer
- version
type: object
type: object
served: true
storage: true
subresources: {}
Loading

0 comments on commit 3785212

Please sign in to comment.