Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MS SQL Server #950

Merged
merged 21 commits into from
Apr 27, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 apis/installer/v1alpha1/kubedb_catalog_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ type RegistryProxies struct {
// registry.k8s.io
//+optional
Kubernetes string `json:"kubernetes"`
// mcr.microsoft.com
//+optional
Microsoft string `json:"microsoft"`
// r.appscode.com
//+optional
AppsCode string `json:"appscode"`
Expand Down
3 changes: 3 additions & 0 deletions catalog/kubedb/active_versions.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@
"mongodb-1.11.0",
"gcs-0.13.0"
],
"MSSQLServer": [
"2022-cu12"
],
"MariaDB": [
"11.2.2",
"11.1.3",
Expand Down
2 changes: 2 additions & 0 deletions catalog/kubedb/fmt/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -527,6 +527,8 @@ func main() {
newimg = fmt.Sprintf(`{{ include "image.ghcr" (merge (dict "_repo" "%s") $) }}`, ref.Repository)
case "registry.k8s.io":
newimg = fmt.Sprintf(`{{ include "image.kubernetes" (merge (dict "_repo" "%s") $) }}`, ref.Repository)
case "mcr.microsoft.com":
newimg = fmt.Sprintf(`{{ include "image.microsoft" (merge (dict "_repo" "%s") $) }}`, ref.Repository)
default:
panic("unsupported registry for image " + img)
}
Expand Down
14 changes: 14 additions & 0 deletions catalog/kubedb/raw/mssqlserver/mssqlserver-2022.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
apiVersion: catalog.kubedb.com/v1alpha1
kind: MSSQLServerVersion
metadata:
name: 2022-cu12
spec:
coordinator:
image: ghcr.io/kubedb/mssql-coordinator:v0.0.1
db:
image: mcr.microsoft.com/mssql/server:2022-CU12-ubuntu-22.04
initContainer:
image: ghcr.io/kubedb/mssql-init:2022-ubuntu-22-v1
securityContext:
runAsUser: 10001
version: "2022"
139 changes: 70 additions & 69 deletions charts/kubedb-catalog/README.md

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: kubedb
name: mssqlversions.catalog.kubedb.com
name: mssqlserverversions.catalog.kubedb.com
spec:
group: catalog.kubedb.com
names:
categories:
- datastore
- kubedb
- appscode
kind: MSSQLVersion
listKind: MSSQLVersionList
plural: mssqlversions
kind: MSSQLServerVersion
listKind: MSSQLServerVersionList
plural: mssqlserverversions
shortNames:
- msversion
singular: mssqlversion
singular: mssqlserverversion
scope: Cluster
versions:
- additionalPrinterColumns:
Expand Down
4 changes: 4 additions & 0 deletions charts/kubedb-catalog/templates/_helpers.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,10 @@ Create the name of the service account to use
{{ list .Values.proxies.kubernetes ._repo | compact | join "/" }}
{{- end }}

{{- define "image.microsoft" -}}
{{ list .Values.proxies.microsoft ._repo | compact | join "/" }}
{{- end }}

{{- define "image.appscode" -}}
{{ list .Values.proxies.appscode ._repo | compact | join "/" }}
{{- end }}
24 changes: 24 additions & 0 deletions charts/kubedb-catalog/templates/mssqlserver/mssqlserver-2022.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{{ $featureGates := .Values.featureGates }}
{{- if .Values.global }}
{{ $featureGates = mergeOverwrite dict .Values.featureGates .Values.global.featureGates }}
{{- end }}

{{ if $featureGates.MSSQLServer }}

apiVersion: catalog.kubedb.com/v1alpha1
kind: MSSQLServerVersion
metadata:
name: '2022-cu12'
labels:
{{- include "kubedb-catalog.labels" . | nindent 4 }}
spec:
coordinator:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/mssql-coordinator") $) }}:v0.0.1'
db:
image: '{{ include "image.microsoft" (merge (dict "_repo" "mssql/server") $) }}:2022-CU12-ubuntu-22.04'
initContainer:
image: '{{ include "image.ghcr" (merge (dict "_repo" "kubedb/mssql-init") $) }}:2022-ubuntu-22-v1'
securityContext:
runAsUser: 10001
version: "2022"
{{ end }}
3 changes: 3 additions & 0 deletions charts/kubedb-catalog/values.openapiv3_schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ properties:
kubernetes:
description: registry.k8s.io
type: string
microsoft:
description: mcr.microsoft.com
type: string
type: object
psp:
properties:
Expand Down
6 changes: 4 additions & 2 deletions charts/kubedb-catalog/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ proxies:
dockerLibrary: ""
ghcr: ghcr.io
kubernetes: registry.k8s.io
microsoft: mcr.microsoft.com
appscode: r.appscode.com

# registryFQDN: harbor.appscode.ninja
Expand All @@ -20,6 +21,7 @@ proxies:
# dockerLibrary: ""
# ghcr: harbor.appscode.ninja/ghcr
# kubernetes: harbor.appscode.ninja/k8s
# microsoft: harbor.appscode.ninja/mcr
# appscode: harbor.appscode.ninja/ac

featureGates:
Expand All @@ -29,8 +31,8 @@ featureGates:
Kafka: true
MariaDB: true
Memcached: true
MicrosoftSQLServer: false
MongoDB: true
MSSQLServer: true
MySQL: true
PerconaXtraDB: true
PgBouncer: true
Expand Down Expand Up @@ -86,7 +88,7 @@ enableVersions:
Kafka: []
MariaDB: []
Memcached: []
MicrosoftSQLServer: []
MSSQLServer: []
MongoDB: []
MySQL: []
PerconaXtraDB: []
Expand Down
86 changes: 43 additions & 43 deletions charts/kubedb-crd-manager/README.md

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion charts/kubedb-crd-manager/ci/ci-values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ featureGates:
Kafka: true
MariaDB: true
Memcached: false
MicrosoftSQLServer: false
MSSQLServer: true
MongoDB: true
MySQL: true
PerconaXtraDB: false
Expand Down
2 changes: 1 addition & 1 deletion charts/kubedb-crd-manager/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,8 @@ featureGates:
Kafka: false
MariaDB: false
Memcached: false
MicrosoftSQLServer: false
MongoDB: false
MSSQLServer: true
MySQL: false
PerconaXtraDB: false
PgBouncer: false
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,20 +3,20 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: kubedb
name: mssqlversions.catalog.kubedb.com
name: mssqlserverversions.catalog.kubedb.com
spec:
group: catalog.kubedb.com
names:
categories:
- datastore
- kubedb
- appscode
kind: MSSQLVersion
listKind: MSSQLVersionList
plural: mssqlversions
kind: MSSQLServerVersion
listKind: MSSQLServerVersionList
plural: mssqlserverversions
shortNames:
- msversion
singular: mssqlversion
singular: mssqlserverversion
scope: Cluster
versions:
- additionalPrinterColumns:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ kind: CustomResourceDefinition
metadata:
labels:
app.kubernetes.io/name: kubedb
name: mssqls.kubedb.com
name: mssqlservers.kubedb.com
spec:
group: kubedb.com
names:
Expand All @@ -12,12 +12,12 @@ spec:
- kubedb
- appscode
- all
kind: MSSQL
listKind: MSSQLList
plural: mssqls
kind: MSSQLServer
listKind: MSSQLServerList
plural: mssqlservers
shortNames:
- ms
singular: mssql
singular: mssqlserver
scope: Namespaced
versions:
- additionalPrinterColumns:
Expand Down
Loading
Loading