From f9492e367b10060547e6f8826c5c4f8d3a929698 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Fri, 8 Nov 2024 10:36:55 -0500 Subject: [PATCH 01/11] adding chart for postgres database install Signed-off-by: Nick Beenham --- .../Chart/templates/database/configmaps.yaml | 13 +++++ deploy/Chart/templates/database/service.yaml | 16 ++++++ .../templates/database/serviceaccount.yaml | 8 +++ .../Chart/templates/database/statefulset.yaml | 51 +++++++++++++++++++ deploy/Chart/values.yaml | 12 +++++ 5 files changed, 100 insertions(+) create mode 100644 deploy/Chart/templates/database/configmaps.yaml create mode 100644 deploy/Chart/templates/database/service.yaml create mode 100644 deploy/Chart/templates/database/serviceaccount.yaml create mode 100644 deploy/Chart/templates/database/statefulset.yaml diff --git a/deploy/Chart/templates/database/configmaps.yaml b/deploy/Chart/templates/database/configmaps.yaml new file mode 100644 index 0000000000..6c902390ff --- /dev/null +++ b/deploy/Chart/templates/database/configmaps.yaml @@ -0,0 +1,13 @@ +apiVersion: v1 +kind: ConfigMap +metadata: + name: database-secret + namespace: "{{ .Release.Namespace }}" + labels: + control-plane: database + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius +data: + POSTGRES_DB: ps_db + POSTGRES_USER: ps_user + POSTGRES_PASSWORD: SecurePassword \ No newline at end of file diff --git a/deploy/Chart/templates/database/service.yaml b/deploy/Chart/templates/database/service.yaml new file mode 100644 index 0000000000..c10a9818fd --- /dev/null +++ b/deploy/Chart/templates/database/service.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: Service +metadata: + name: database + namespace: "{{ .Release.Namespace }}" + labels: + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius +spec: + ports: + - port: 5432 + name: postgres + protocol: TCP + targetPort: 5432 + selector: + app.kubernetes.io/name: database \ No newline at end of file diff --git a/deploy/Chart/templates/database/serviceaccount.yaml b/deploy/Chart/templates/database/serviceaccount.yaml new file mode 100644 index 0000000000..617e26e0eb --- /dev/null +++ b/deploy/Chart/templates/database/serviceaccount.yaml @@ -0,0 +1,8 @@ +apiVersion: v1 +kind: ServiceAccount +metadata: + name: database + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius diff --git a/deploy/Chart/templates/database/statefulset.yaml b/deploy/Chart/templates/database/statefulset.yaml new file mode 100644 index 0000000000..6993793d22 --- /dev/null +++ b/deploy/Chart/templates/database/statefulset.yaml @@ -0,0 +1,51 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: database + namespace: "{{ .Release.Namespace }}" + labels: + control-plane: database + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius +spec: + serviceName: "database" + replicas: 1 + selector: + matchLabels: + app.kubernetes.io/name: database + template: + metadata: + labels: + control-plane: database + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius + spec: + serviceAccountName: database + containers: + - name: database + securityContext: + allowPrivilegeEscalation: false + image: "{{ .Values.database.image }}:{{ .Values.database.tag }}" + imagePullPolicy: IfNotPresent + resources: + requests: + memory: "256Mi" + cpu: "100m" + limits: + memory: "512Mi" + cpu: "200m" + envFrom: + - configMapRef: + name: database-secret + ports: + - containerPort: 5432 + name: postgres + + volumeClaimTemplates: + - metadata: + name: data + spec: + accessModes: ["ReadWriteOnce"] + resources: + requests: + storage: 2Gi \ No newline at end of file diff --git a/deploy/Chart/values.yaml b/deploy/Chart/values.yaml index d750295570..634dbe5a34 100644 --- a/deploy/Chart/values.yaml +++ b/deploy/Chart/values.yaml @@ -112,3 +112,15 @@ dashboard: memory: "60Mi" limits: memory: "300Mi" + +database: + image: ghcr.io/radius-project/mirror/postgres + tag: latest + storageClassName: "" # set to the storage class name if required + resources: + requests: + cpu: "2" + memory: "512Mi" + limits: + cpu: "2" + memory: "1024Mi" \ No newline at end of file From 623673caa7ec62e39847940e2209c58989de7ce5 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Fri, 8 Nov 2024 10:59:51 -0500 Subject: [PATCH 02/11] adding pv and pvc for postgres database install Signed-off-by: Nick Beenham --- deploy/Chart/templates/database/pv.yaml | 15 +++++++++++++++ deploy/Chart/templates/database/pvc.yaml | 16 ++++++++++++++++ deploy/Chart/templates/database/statefulset.yaml | 7 ++++--- 3 files changed, 35 insertions(+), 3 deletions(-) create mode 100644 deploy/Chart/templates/database/pv.yaml create mode 100644 deploy/Chart/templates/database/pvc.yaml diff --git a/deploy/Chart/templates/database/pv.yaml b/deploy/Chart/templates/database/pv.yaml new file mode 100644 index 0000000000..f2fbcf35f9 --- /dev/null +++ b/deploy/Chart/templates/database/pv.yaml @@ -0,0 +1,15 @@ +apiVersion: v1 +kind: PersistentVolume +metadata: + name: pv-sts-0 + labels: + control-plane: database + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius +spec: + storageClassName: "" + persistentVolumeReclaimPolicy: Retain + capacity: + storage: 3Gi + accessModes: + - ReadWriteMany \ No newline at end of file diff --git a/deploy/Chart/templates/database/pvc.yaml b/deploy/Chart/templates/database/pvc.yaml new file mode 100644 index 0000000000..6af7c5cf56 --- /dev/null +++ b/deploy/Chart/templates/database/pvc.yaml @@ -0,0 +1,16 @@ +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + name: pg-pvc-database-sts-0 + labels: + control-plane: database + app.kubernetes.io/name: database + app.kubernetes.io/part-of: radius +spec: + storageClassName: "" + volumeName: pv-sts-0 + accessModes: + - ReadWriteMany + resources: + requests: + storage: 3Gi \ No newline at end of file diff --git a/deploy/Chart/templates/database/statefulset.yaml b/deploy/Chart/templates/database/statefulset.yaml index 6993793d22..18367a6765 100644 --- a/deploy/Chart/templates/database/statefulset.yaml +++ b/deploy/Chart/templates/database/statefulset.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: database + name: database-sts namespace: "{{ .Release.Namespace }}" labels: control-plane: database @@ -43,9 +43,10 @@ spec: volumeClaimTemplates: - metadata: - name: data + name: pg-pvc spec: - accessModes: ["ReadWriteOnce"] + accessModes: ["ReadWriteMany"] + storageClassName: "" resources: requests: storage: 2Gi \ No newline at end of file From 9f4968741726e808c5fd09d02e5a2b6316223b10 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Fri, 8 Nov 2024 13:46:58 -0500 Subject: [PATCH 03/11] adding volume type Signed-off-by: Nick Beenham --- deploy/Chart/templates/database/pv.yaml | 7 +++++-- deploy/Chart/templates/database/pvc.yaml | 3 ++- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/deploy/Chart/templates/database/pv.yaml b/deploy/Chart/templates/database/pv.yaml index f2fbcf35f9..02da0c54ab 100644 --- a/deploy/Chart/templates/database/pv.yaml +++ b/deploy/Chart/templates/database/pv.yaml @@ -2,14 +2,17 @@ apiVersion: v1 kind: PersistentVolume metadata: name: pv-sts-0 + namespace: "{{ .Release.Namespace }}" labels: control-plane: database app.kubernetes.io/name: database app.kubernetes.io/part-of: radius spec: - storageClassName: "" + storageClassName: standard persistentVolumeReclaimPolicy: Retain capacity: storage: 3Gi accessModes: - - ReadWriteMany \ No newline at end of file + - ReadWriteMany + hostPath: + path: /mnt/data/database-sts-0 \ No newline at end of file diff --git a/deploy/Chart/templates/database/pvc.yaml b/deploy/Chart/templates/database/pvc.yaml index 6af7c5cf56..76f4272bd0 100644 --- a/deploy/Chart/templates/database/pvc.yaml +++ b/deploy/Chart/templates/database/pvc.yaml @@ -2,12 +2,13 @@ apiVersion: v1 kind: PersistentVolumeClaim metadata: name: pg-pvc-database-sts-0 + namespace: "{{ .Release.Namespace }}" labels: control-plane: database app.kubernetes.io/name: database app.kubernetes.io/part-of: radius spec: - storageClassName: "" + storageClassName: standard volumeName: pv-sts-0 accessModes: - ReadWriteMany From bfbe5174737988e7c999d549b6f2fb88aeb0ee57 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Mon, 11 Nov 2024 15:47:35 -0500 Subject: [PATCH 04/11] adding storageclass as standard Signed-off-by: Nick Beenham --- deploy/Chart/templates/database/statefulset.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/Chart/templates/database/statefulset.yaml b/deploy/Chart/templates/database/statefulset.yaml index 18367a6765..08369d8453 100644 --- a/deploy/Chart/templates/database/statefulset.yaml +++ b/deploy/Chart/templates/database/statefulset.yaml @@ -46,7 +46,7 @@ spec: name: pg-pvc spec: accessModes: ["ReadWriteMany"] - storageClassName: "" + storageClassName: standard resources: requests: storage: 2Gi \ No newline at end of file From 3f18503be2ed873c6ac1fa7387c6f8b903701d4e Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Thu, 21 Nov 2024 15:41:05 -0500 Subject: [PATCH 05/11] simplicity is best Signed-off-by: Nick Beenham --- deploy/Chart/templates/database/pv.yaml | 18 ------------------ deploy/Chart/templates/database/pvc.yaml | 17 ----------------- .../Chart/templates/database/statefulset.yaml | 10 +++++----- deploy/Chart/values.yaml | 2 +- 4 files changed, 6 insertions(+), 41 deletions(-) delete mode 100644 deploy/Chart/templates/database/pv.yaml delete mode 100644 deploy/Chart/templates/database/pvc.yaml diff --git a/deploy/Chart/templates/database/pv.yaml b/deploy/Chart/templates/database/pv.yaml deleted file mode 100644 index 02da0c54ab..0000000000 --- a/deploy/Chart/templates/database/pv.yaml +++ /dev/null @@ -1,18 +0,0 @@ -apiVersion: v1 -kind: PersistentVolume -metadata: - name: pv-sts-0 - namespace: "{{ .Release.Namespace }}" - labels: - control-plane: database - app.kubernetes.io/name: database - app.kubernetes.io/part-of: radius -spec: - storageClassName: standard - persistentVolumeReclaimPolicy: Retain - capacity: - storage: 3Gi - accessModes: - - ReadWriteMany - hostPath: - path: /mnt/data/database-sts-0 \ No newline at end of file diff --git a/deploy/Chart/templates/database/pvc.yaml b/deploy/Chart/templates/database/pvc.yaml deleted file mode 100644 index 76f4272bd0..0000000000 --- a/deploy/Chart/templates/database/pvc.yaml +++ /dev/null @@ -1,17 +0,0 @@ -apiVersion: v1 -kind: PersistentVolumeClaim -metadata: - name: pg-pvc-database-sts-0 - namespace: "{{ .Release.Namespace }}" - labels: - control-plane: database - app.kubernetes.io/name: database - app.kubernetes.io/part-of: radius -spec: - storageClassName: standard - volumeName: pv-sts-0 - accessModes: - - ReadWriteMany - resources: - requests: - storage: 3Gi \ No newline at end of file diff --git a/deploy/Chart/templates/database/statefulset.yaml b/deploy/Chart/templates/database/statefulset.yaml index 08369d8453..df0899fb89 100644 --- a/deploy/Chart/templates/database/statefulset.yaml +++ b/deploy/Chart/templates/database/statefulset.yaml @@ -1,7 +1,7 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: database-sts + name: database namespace: "{{ .Release.Namespace }}" labels: control-plane: database @@ -43,10 +43,10 @@ spec: volumeClaimTemplates: - metadata: - name: pg-pvc + name: database spec: - accessModes: ["ReadWriteMany"] - storageClassName: standard + accessModes: ["ReadWriteOnce"] + storageClassName: "{{ .Values.database.storageClassName }}" resources: requests: - storage: 2Gi \ No newline at end of file + storage: 3Gi \ No newline at end of file diff --git a/deploy/Chart/values.yaml b/deploy/Chart/values.yaml index 634dbe5a34..aba9138155 100644 --- a/deploy/Chart/values.yaml +++ b/deploy/Chart/values.yaml @@ -116,7 +116,7 @@ dashboard: database: image: ghcr.io/radius-project/mirror/postgres tag: latest - storageClassName: "" # set to the storage class name if required + storageClassName: "standard" # set to the storage class name if required resources: requests: cpu: "2" From ce3683596acbd4561df0fc57247395cd6b926f7b Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Thu, 21 Nov 2024 16:05:04 -0500 Subject: [PATCH 06/11] adding templating for sizes Signed-off-by: Nick Beenham --- deploy/Chart/templates/database/statefulset.yaml | 10 +++++----- deploy/Chart/values.yaml | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/deploy/Chart/templates/database/statefulset.yaml b/deploy/Chart/templates/database/statefulset.yaml index df0899fb89..33d32f2be6 100644 --- a/deploy/Chart/templates/database/statefulset.yaml +++ b/deploy/Chart/templates/database/statefulset.yaml @@ -29,11 +29,11 @@ spec: imagePullPolicy: IfNotPresent resources: requests: - memory: "256Mi" - cpu: "100m" + memory: "{{ .Values.database.resources.requests.memory }}" + cpu: "{{ .Values.database.resources.requests.cpu }}" limits: - memory: "512Mi" - cpu: "200m" + memory: "{{ .Values.database.resources.limits.memory }}" + cpu: "{{ .Values.database.resources.limits.cpu }}" envFrom: - configMapRef: name: database-secret @@ -49,4 +49,4 @@ spec: storageClassName: "{{ .Values.database.storageClassName }}" resources: requests: - storage: 3Gi \ No newline at end of file + storage: {{ .Values.database.storageSize }} \ No newline at end of file diff --git a/deploy/Chart/values.yaml b/deploy/Chart/values.yaml index aba9138155..8367ebf730 100644 --- a/deploy/Chart/values.yaml +++ b/deploy/Chart/values.yaml @@ -117,6 +117,7 @@ database: image: ghcr.io/radius-project/mirror/postgres tag: latest storageClassName: "standard" # set to the storage class name if required + storageSize: "1Gi" resources: requests: cpu: "2" From fa379e4949742513562dd2c176ae13a87624bcaa Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Mon, 2 Dec 2024 15:29:10 -0500 Subject: [PATCH 07/11] Adding limits to db container Signed-off-by: Nick Beenham --- .../datastoresrp-resources-sqldb-manual.bicep | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep index 1439c50243..746b539c81 100644 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep +++ b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep @@ -100,5 +100,21 @@ resource sqlContainer 'Applications.Core/containers@2023-10-01-preview' = { } } } + runtimes: { + kubernetes: { + pod: { + resources: { + requests: { + cpu: '1200m' + memory: '2048Mi' + } + limits: { + cpu: '1500m' + memory: '4096Mi' + } + } + } + } + } } } From 6a988e955740da1cff0aede53acd52da857e1099 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Wed, 8 Jan 2025 11:52:15 -0500 Subject: [PATCH 08/11] removing sql server functional tests Signed-off-by: Nick Beenham --- .../noncloud/resources/sql_test.go | 118 ------------------ 1 file changed, 118 deletions(-) delete mode 100644 test/functional-portable/datastoresrp/noncloud/resources/sql_test.go diff --git a/test/functional-portable/datastoresrp/noncloud/resources/sql_test.go b/test/functional-portable/datastoresrp/noncloud/resources/sql_test.go deleted file mode 100644 index f1f265114f..0000000000 --- a/test/functional-portable/datastoresrp/noncloud/resources/sql_test.go +++ /dev/null @@ -1,118 +0,0 @@ -/* -Copyright 2023 The Radius Authors. - -Licensed under the Apache License, Version 2.0 (the "License"); -you may not use this file except in compliance with the License. -You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - -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. -*/ - -package resource_test - -import ( - "runtime" - "testing" - - "github.com/radius-project/radius/test/rp" - "github.com/radius-project/radius/test/step" - "github.com/radius-project/radius/test/testutil" - "github.com/radius-project/radius/test/validation" -) - -func Test_SQLDatabase_Manual(t *testing.T) { - // https://github.com/microsoft/mssql-docker/issues/668 - if runtime.GOARCH == "arm64" { - t.Skip("skipping Test_SQL, unsupported architecture") - } - template := "testdata/datastoresrp-resources-sqldb-manual.bicep" - name := "dsrp-resources-sql" - appNamespace := "default-dsrp-resources-sql" - - test := rp.NewRPTest(t, name, []rp.TestStep{ - { - Executor: step.NewDeployExecutor(template, testutil.GetMagpieImage()), - RPResources: &validation.RPResourceSet{ - Resources: []validation.RPResource{ - { - Name: name, - Type: validation.ApplicationsResource, - }, - { - Name: "sql-app-ctnr", - Type: validation.ContainersResource, - App: name, - }, - { - Name: "sql-db", - Type: validation.SQLDatabasesResource, - App: name, - }, - { - Name: "sql-ctnr", - Type: validation.ContainersResource, - App: name, - }, - }, - }, - K8sObjects: &validation.K8sObjectSet{ - Namespaces: map[string][]validation.K8sObject{ - appNamespace: { - validation.NewK8sPodForResource(name, "sql-app-ctnr"), - validation.NewK8sPodForResource(name, "sql-ctnr"), - }, - }, - }, - }, - }) - - test.Test(t) -} - -// Test_SQLDatabase_Recipe validates: -// the creation of a sql database from recipe -// container using the sqlDatabases portable resource to connect to the sql database resource -func Test_SQLDatabase_Recipe(t *testing.T) { - template := "testdata/datastoresrp-resources-sqldb-recipe.bicep" - name := "dsrp-resources-sqldb-recipe" - appNamespace := "dsrp-resources-sqldb-recipe-app" - test := rp.NewRPTest(t, name, []rp.TestStep{ - { - Executor: step.NewDeployExecutor(template, testutil.GetMagpieImage(), testutil.GetBicepRecipeRegistry(), testutil.GetBicepRecipeVersion()), - RPResources: &validation.RPResourceSet{ - Resources: []validation.RPResource{ - { - Name: "dsrp-resources-env-sql-recipe-env", - Type: validation.EnvironmentsResource, - }, - { - Name: "dsrp-resources-sqldb-recipe", - Type: validation.ApplicationsResource, - App: name, - }, - { - Name: "sql-recipe-app-ctnr", - Type: validation.ContainersResource, - App: name, - }, - }, - }, - K8sObjects: &validation.K8sObjectSet{ - Namespaces: map[string][]validation.K8sObject{ - appNamespace: { - validation.NewK8sPodForResource(name, "sql-recipe-app-ctnr").ValidateLabels(false), - validation.NewK8sPodForResource(name, "sql-recipe-resource").ValidateLabels(false), - }, - }, - }, - }, - }) - - test.Test(t) -} From 11a872cfbaef8d32df6c1f77a7a80b735e3722b8 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Thu, 9 Jan 2025 08:27:55 -0500 Subject: [PATCH 09/11] removing bicep files Signed-off-by: Nick Beenham --- .../datastoresrp-resources-sqldb-manual.bicep | 120 ------------------ .../datastoresrp-resources-sqldb-recipe.bicep | 94 -------------- 2 files changed, 214 deletions(-) delete mode 100644 test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep delete mode 100644 test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-recipe.bicep diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep deleted file mode 100644 index 746b539c81..0000000000 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-manual.bicep +++ /dev/null @@ -1,120 +0,0 @@ -extension radius - -@description('Specifies the location for resources.') -param location string = 'global' - -@description('Specifies the image for the container resource.') -param magpieImage string - -@description('Specifies the port for the container resource.') -param magpiePort int = 3000 - -@description('Specifies the environment for resources.') -param environment string = 'test' - -@description('Specifies the image for the sql container resource.') -param sqlImage string = 'mcr.microsoft.com/mssql/server:2019-latest' - -@description('Specifies the port for the container resource.') -param sqlPort int = 1433 - -@description('Specifies the SQL username.') -param username string = 'sa' - -@description('Specifies the SQL password.') -@secure() -param password string = newGuid() - -resource app 'Applications.Core/applications@2023-10-01-preview' = { - name: 'dsrp-resources-sql' - location: location - properties: { - environment: environment - } -} - -resource webapp 'Applications.Core/containers@2023-10-01-preview' = { - name: 'sql-app-ctnr' - location: location - properties: { - application: app.id - connections: { - sql: { - source: db.id - } - } - container: { - image: magpieImage - env: { - CONNECTION_SQL_CONNECTIONSTRING: { - value: db.listSecrets().connectionString - } - } - readinessProbe: { - kind: 'httpGet' - containerPort: magpiePort - path: '/healthz' - } - } - } -} - -resource db 'Applications.Datastores/sqlDatabases@2023-10-01-preview' = { - name: 'sql-db' - location: location - properties: { - application: app.id - environment: environment - server: 'sql-ctnr' - database: 'master' - resourceProvisioning: 'manual' - port: sqlPort - username: username - secrets: { - password: password - } - } -} - -resource sqlContainer 'Applications.Core/containers@2023-10-01-preview' = { - name: 'sql-ctnr' - location: location - properties: { - application: app.id - container: { - image: sqlImage - env: { - ACCEPT_EULA: { - value: 'Y' - } - MSSQL_PID: { - value: 'Developer' - } - MSSQL_SA_PASSWORD: { - value: password - } - } - ports: { - sql: { - containerPort: sqlPort - } - } - } - runtimes: { - kubernetes: { - pod: { - resources: { - requests: { - cpu: '1200m' - memory: '2048Mi' - } - limits: { - cpu: '1500m' - memory: '4096Mi' - } - } - } - } - } - } -} diff --git a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-recipe.bicep b/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-recipe.bicep deleted file mode 100644 index dbd75d2e1b..0000000000 --- a/test/functional-portable/datastoresrp/noncloud/resources/testdata/datastoresrp-resources-sqldb-recipe.bicep +++ /dev/null @@ -1,94 +0,0 @@ -extension radius - -@description('Specifies the location for resources.') -param location string = 'global' - -@description('Specifies the image for the container resource.') -param magpieImage string - -@description('Specifies the port for the container resource.') -param magpiePort int = 3000 - -@description('Specifies the SQL username.') -param username string = 'sa' - -@description('Specifies the SQL password.') -@secure() -param password string = newGuid() - -param registry string - -param version string - -resource env 'Applications.Core/environments@2023-10-01-preview' = { - name: 'dsrp-resources-env-sql-recipe-env' - location: 'global' - properties: { - compute: { - kind: 'kubernetes' - resourceId: 'self' - namespace: 'dsrp-resources-env-sql-recipe-env' - } - recipes: { - 'Applications.Datastores/sqlDatabases': { - default: { - templateKind: 'bicep' - templatePath: '${registry}/test/testrecipes/test-bicep-recipes/sqldb-recipe:${version}' - parameters: { - username: username - password: password - } - } - } - } - } -} - -resource app 'Applications.Core/applications@2023-10-01-preview' = { - name: 'dsrp-resources-sqldb-recipe' - location: location - properties: { - environment: env.id - extensions: [ - { - kind: 'kubernetesNamespace' - namespace: 'dsrp-resources-sqldb-recipe-app' - } - ] - } -} - -resource webapp 'Applications.Core/containers@2023-10-01-preview' = { - name: 'sql-recipe-app-ctnr' - location: location - properties: { - application: app.id - connections: { - sql: { - source: db.id - } - } - container: { - image: magpieImage - env: { - CONNECTION_SQL_CONNECTIONSTRING: { - value: db.listSecrets().connectionString - } - } - readinessProbe: { - kind: 'httpGet' - containerPort: magpiePort - path: '/healthz' - } - } - } -} - -resource db 'Applications.Datastores/sqlDatabases@2023-10-01-preview' = { - name: 'sql-db-recipe' - location: location - properties: { - application: app.id - environment: env.id - } -} From e32110a68bfad47ffae5b3efa843413048f17cb9 Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Thu, 9 Jan 2025 13:09:07 -0500 Subject: [PATCH 10/11] adding comments for context Signed-off-by: Nick Beenham --- deploy/Chart/values.yaml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/deploy/Chart/values.yaml b/deploy/Chart/values.yaml index 8367ebf730..1671ce35d2 100644 --- a/deploy/Chart/values.yaml +++ b/deploy/Chart/values.yaml @@ -116,7 +116,8 @@ dashboard: database: image: ghcr.io/radius-project/mirror/postgres tag: latest - storageClassName: "standard" # set to the storage class name if required + storageClassName: "" # set to the storage class name if required + # Minimum resource requirements, may need to revisit and scale. storageSize: "1Gi" resources: requests: From 212cb8647b485ef14ef2b1547f2d7a8d1ba4093d Mon Sep 17 00:00:00 2001 From: Nick Beenham Date: Thu, 9 Jan 2025 13:39:09 -0500 Subject: [PATCH 11/11] putting standard back Signed-off-by: Nick Beenham --- deploy/Chart/values.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/Chart/values.yaml b/deploy/Chart/values.yaml index 1671ce35d2..d22d987f26 100644 --- a/deploy/Chart/values.yaml +++ b/deploy/Chart/values.yaml @@ -116,7 +116,7 @@ dashboard: database: image: ghcr.io/radius-project/mirror/postgres tag: latest - storageClassName: "" # set to the storage class name if required + storageClassName: "standard" # set to the storage class name if required # Minimum resource requirements, may need to revisit and scale. storageSize: "1Gi" resources: