From d0bfab768d7562d63203b4f588fe2c2cf63fdfaf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20Mass=C3=A9?= Date: Tue, 13 Jun 2023 15:12:02 +0200 Subject: [PATCH] wip --- charts/Containerfile | 29 +++++++++- charts/sql-server-2019/Chart.yaml | 4 ++ charts/sql-server-2019/README.md | 19 +++++++ charts/sql-server-2019/values.schema.json | 67 +++++++++++++++++++++++ 4 files changed, 118 insertions(+), 1 deletion(-) create mode 100644 charts/sql-server-2019/README.md create mode 100644 charts/sql-server-2019/values.schema.json diff --git a/charts/Containerfile b/charts/Containerfile index 8cbf15b..6cfc9fa 100644 --- a/charts/Containerfile +++ b/charts/Containerfile @@ -1,5 +1,32 @@ FROM docker.io/nginxinc/nginx-unprivileged:1.25-alpine +## +## Development instructions +## +# +# Build the container image and push it to Quay.io: +# +# podman build -t quay.io/nmasse_itix/eshop_charts:latest . +# podman push quay.io/nmasse_itix/eshop_charts:latest +# +# Deploy it to OpenShift: +# +# oc new-project eshop-infra +# oc create deploy helm-repository --image=quay.io/nmasse_itix/eshop_charts:latest --port=8080 +# oc expose deploy/helm-repository --name helm-repository +# +# And then create the HelmChartRepository object: +# +# apiVersion: helm.openshift.io/v1beta1 +# kind: HelmChartRepository +# metadata: +# name: eshop-charts +# spec: +# connectionConfig: +# url: http://helm-repository.eshop-infra.svc:8080 +# name: eShop Charts +# + ADD . /usr/src/helm-charts USER 0 @@ -7,6 +34,6 @@ USER 0 RUN curl -sSfL https://get.helm.sh/helm-v3.12.0-linux-amd64.tar.gz | tar -zxv -C /usr/local/bin --strip-components=1 \ && mkdir -p /tmp/helm-repository \ && for chart in /usr/src/helm-charts/*/; do helm package -d /usr/share/nginx/html "$chart"; done \ - && helm repo index --url "http://helm-charts.fruits-dev.svc:8080/" /usr/share/nginx/html + && helm repo index --url "http://helm-repository.eshop-infra.svc:8080/" /usr/share/nginx/html USER 101 diff --git a/charts/sql-server-2019/Chart.yaml b/charts/sql-server-2019/Chart.yaml index 369cf46..ca40e12 100644 --- a/charts/sql-server-2019/Chart.yaml +++ b/charts/sql-server-2019/Chart.yaml @@ -3,3 +3,7 @@ name: sql-server-2019 type: application version: 0.0.1 appVersion: "0.0.1" +description: A Helm chart to deploy Microsoft SQL Server 2019 +keywords: +- mssql +- database diff --git a/charts/sql-server-2019/README.md b/charts/sql-server-2019/README.md new file mode 100644 index 0000000..8f051bd --- /dev/null +++ b/charts/sql-server-2019/README.md @@ -0,0 +1,19 @@ +# SQL Server 2019 Helm Chart + +A Helm chart for deploying [Microsoft SQL Server 2019](https://www.microsoft.com/en-us/sql-server/sql-server-2019) on OpenShift. + +## Pre-requisites + +None. + +## Values + +Below is a table of each value used to configure this chart. + +| Value | Description | Default | Additional Information | +| ----- | ----------- | ------- | ---------------------- | +| `saPassword` | Administrator Password | `R3dH4t1!` | | +| `database.name` | Database Name | `eShop` | | +| `database.schema` | Database Schema | `eShop` | | +| `database.owner.username` | Username to access the database | `eShop` | | +| `database.owner.password` | Password to access the database | `R3dH4t1!` | | diff --git a/charts/sql-server-2019/values.schema.json b/charts/sql-server-2019/values.schema.json new file mode 100644 index 0000000..24901ef --- /dev/null +++ b/charts/sql-server-2019/values.schema.json @@ -0,0 +1,67 @@ +{ + "$schema": "http://json-schema.org/draft-07/schema", + "type": "object", + "additionalProperties": false, + "properties": { + "saPassword": { + "type": "string", + "description": "SQL Server Administrator Password", + "title": "Administrator Password", + "default": "R3dH4t1!" + }, + "database": { + "type": "object", + "additionalProperties": false, + "properties": { + "name": { + "type": "string", + "title": "Database Name", + "description": "Name of the database to create", + "default": "eShop" + }, + "owner": { + "type": "object", + "additionalProperties": false, + "properties": { + "username": { + "title": "Username", + "description": "Username to access the database", + "type": "string", + "default": "eShop" + }, + "password": { + "title": "Password", + "description": "Password to access the database", + "type": "string", + "default": "R3dH4t1!" + } + }, + "required": [ + "password", + "username" + ], + "title": "Database Owner", + "description": "Credentials of the database owner" + }, + "schema": { + "title": "Schema Name", + "type": "string", + "description": "Name of the schema to create", + "default": "eShop" + } + }, + "required": [ + "name", + "owner", + "schema" + ], + "title": "Database", + "description": "Database creation" + } + }, + "required": [ + "database", + "saPassword" + ], + "title": "Microsoft SQL Server 2019" +} \ No newline at end of file