From 08d37f0d019813416ef575084e6360bcd4f5a50a Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 18:52:34 -0800 Subject: [PATCH 01/40] add rancher chart options --- .../app-readme.md | 5 ++ .../questions.yml | 66 +++++++++++++++++++ 2 files changed, 71 insertions(+) create mode 100644 linux/sample-helm-chart-statefulset-deployment/app-readme.md create mode 100644 linux/sample-helm-chart-statefulset-deployment/questions.yml diff --git a/linux/sample-helm-chart-statefulset-deployment/app-readme.md b/linux/sample-helm-chart-statefulset-deployment/app-readme.md new file mode 100644 index 00000000..b1b5b5e6 --- /dev/null +++ b/linux/sample-helm-chart-statefulset-deployment/app-readme.md @@ -0,0 +1,5 @@ +# SQL Server + +[Microsoft SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server/) Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network (including the Internet). Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. + +This helm chart creates a SQL Server workload using StatefulSet along with a Service and Azure Disk storage class. diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml new file mode 100644 index 00000000..99ad5d78 --- /dev/null +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -0,0 +1,66 @@ +questions: + - variable: edition + description: > + Edition of SQL Server, aka. `MSSQL_PID` one of: + Evaluation + Developer + Express + Web + Standard + Enterprise + Product Key of the format "#####-#####-#####-#####-#####" + default: Developer + group: SQL Server + + - variable: MSSQL_AGENT_ENABLED + label: Enable SQL Server Agent + description: Enables the SQL Server Agent + type: boolean + default: false + group: SQL Server + + - variable: defaultContainerImage + label: Use default SQL Server container image + default: true + show_subquestion_if: false + group: Container image + subquestions: + - variable: image.repository + default: mcr.microsoft.com/mssql/server + description: Image Repository + label: Image Repository + - variable: image.pullPolicy + default: IfNotPresent + label: Image Pull Policy + - variable: image.tag + default: 2019-latest + label: Image Tag + + - variable: replicas + description: Replicas of the SQL Server workload + default: 3 + label: Replicas + type: int + group: Kubernetes StatefulSet options + + - variable: podSecurityContext.fsGroup + description: > + Specifies a supplementary group id for all processes of the container. + See https://kubernetes.io/docs/tasks/configure-pod-container/security-context for + additional details. + label: podSecurityContext.fsGroup + group: Kubernetes Pod options + + - variable: containers.ports.containerPort + description: > + Specifies containerPort for SQL Server + label: SQL Server Container Port + default: 1433 + group: Kubernetes Pod options + + - variable: service.port + description: Port for Kubernetes service port for SQL Server + group: Kubernetes Service Options + label: Kubernetes Service Port + type: int + default: 1433 From e9493a53d99be5d65feb3c8a1e40a6cc04e7b0b9 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 18:57:30 -0800 Subject: [PATCH 02/40] lines --- .../questions.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 99ad5d78..ab79ccc3 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,7 +1,7 @@ questions: - variable: edition - description: > - Edition of SQL Server, aka. `MSSQL_PID` one of: + description: | + SQL Server Edition aka. MSSQL_PID one of: Evaluation Developer Express @@ -21,6 +21,7 @@ questions: - variable: defaultContainerImage label: Use default SQL Server container image + type: boolean default: true show_subquestion_if: false group: Container image @@ -37,14 +38,14 @@ questions: label: Image Tag - variable: replicas - description: Replicas of the SQL Server workload + description: Replicas of the SQL Server StatefulSet default: 3 label: Replicas type: int group: Kubernetes StatefulSet options - variable: podSecurityContext.fsGroup - description: > + description: | Specifies a supplementary group id for all processes of the container. See https://kubernetes.io/docs/tasks/configure-pod-container/security-context for additional details. @@ -59,7 +60,7 @@ questions: group: Kubernetes Pod options - variable: service.port - description: Port for Kubernetes service port for SQL Server + description: Kubernetes service port for SQL Server group: Kubernetes Service Options label: Kubernetes Service Port type: int From afd98c014f6b1c8fad8dbfe2177cee58d9383c00 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 19:01:01 -0800 Subject: [PATCH 03/40] bump version --- linux/sample-helm-chart-statefulset-deployment/Chart.yaml | 2 +- linux/sample-helm-chart-statefulset-deployment/app-readme.md | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index be245c98..3ec5b328 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/linux/sample-helm-chart-statefulset-deployment/app-readme.md b/linux/sample-helm-chart-statefulset-deployment/app-readme.md index b1b5b5e6..0903419d 100644 --- a/linux/sample-helm-chart-statefulset-deployment/app-readme.md +++ b/linux/sample-helm-chart-statefulset-deployment/app-readme.md @@ -1,5 +1,6 @@ # SQL Server -[Microsoft SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server/) Microsoft SQL Server is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network (including the Internet). Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. +[Microsoft SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server/) is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network (including the Internet). Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. + This helm chart creates a SQL Server workload using StatefulSet along with a Service and Azure Disk storage class. From cfcb3e9f1f7bebd38f0e8c702ff018a4affee9d6 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 19:08:01 -0800 Subject: [PATCH 04/40] newline --- .../Chart.yaml | 4 ++-- .../questions.yml | 21 ++++++++++++------- 2 files changed, 15 insertions(+), 10 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index 3ec5b328..51c9777e 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: sql-statefull-deploy -description: A Helm chart for Kubernetes +description: A Helm chart for SQL Server # A chart can be either an 'application' or a 'library' chart. # @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.2.0 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index ab79ccc3..91e7b3b5 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,13 +1,13 @@ questions: - variable: edition - description: | - SQL Server Edition aka. MSSQL_PID one of: - Evaluation - Developer - Express - Web - Standard - Enterprise + description: > + SQL Server Edition aka. MSSQL_PID one of: \n + Evaluation \n + Developer \n + Express \n + Web \n + Standard \n + Enterprise \n Product Key of the format "#####-#####-#####-#####-#####" default: Developer group: SQL Server @@ -33,6 +33,11 @@ questions: - variable: image.pullPolicy default: IfNotPresent label: Image Pull Policy + type: enum + options: + - IfNotPresent + - Always + - Never - variable: image.tag default: 2019-latest label: Image Tag From facf188619599a18803789309916c6f999e0e4fb Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 19:12:32 -0800 Subject: [PATCH 05/40] options --- .../questions.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 91e7b3b5..bf044689 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -10,21 +10,21 @@ questions: Enterprise \n Product Key of the format "#####-#####-#####-#####-#####" default: Developer - group: SQL Server + group: SQL Server Options - variable: MSSQL_AGENT_ENABLED label: Enable SQL Server Agent description: Enables the SQL Server Agent type: boolean default: false - group: SQL Server + group: SQL Server Options - variable: defaultContainerImage label: Use default SQL Server container image type: boolean default: true show_subquestion_if: false - group: Container image + group: Container image Options subquestions: - variable: image.repository default: mcr.microsoft.com/mssql/server @@ -62,7 +62,7 @@ questions: Specifies containerPort for SQL Server label: SQL Server Container Port default: 1433 - group: Kubernetes Pod options + group: Kubernetes Pod Options - variable: service.port description: Kubernetes service port for SQL Server From 01f096be387a2e8ae71ab0d3e77b1cae9bc93708 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 19:24:24 -0800 Subject: [PATCH 06/40] html break --- .../questions.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index bf044689..b030722d 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,13 +1,13 @@ questions: - variable: edition description: > - SQL Server Edition aka. MSSQL_PID one of: \n - Evaluation \n - Developer \n - Express \n - Web \n - Standard \n - Enterprise \n + SQL Server Edition aka. MSSQL_PID one of:
+ Evaluation
+ Developer
+ Express
+ Web
+ Standard
+ Enterprise
Product Key of the format "#####-#####-#####-#####-#####" default: Developer group: SQL Server Options @@ -24,7 +24,7 @@ questions: type: boolean default: true show_subquestion_if: false - group: Container image Options + group: Container Image Options subquestions: - variable: image.repository default: mcr.microsoft.com/mssql/server From 1b796eef72b2f8ca205ccb0816754554704a0d1a Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 19:28:14 -0800 Subject: [PATCH 07/40] newline --- .../questions.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index b030722d..d94a6420 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,13 +1,13 @@ questions: - variable: edition description: > - SQL Server Edition aka. MSSQL_PID one of:
- Evaluation
- Developer
- Express
- Web
- Standard
- Enterprise
+ SQL Server Edition aka. MSSQL_PID one of: \\n + Evaluation \\n + Developer \\n + Express \\n + Web \\n + Standard \\n + Enterprise \\n Product Key of the format "#####-#####-#####-#####-#####" default: Developer group: SQL Server Options From 5c29c79aff2e8009b1c6af8ed987a22e6e2b1648 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 16 Nov 2021 19:31:23 -0800 Subject: [PATCH 08/40] ss --- .../questions.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index d94a6420..60063eae 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,13 +1,13 @@ questions: - - variable: edition + - variable: SQL Server edition aka. MSSQL_PID description: > - SQL Server Edition aka. MSSQL_PID one of: \\n - Evaluation \\n - Developer \\n - Express \\n - Web \\n - Standard \\n - Enterprise \\n + SQL Server Edition, one of: + Evaluation + Developer + Express + Web + Standard + Enterprise Product Key of the format "#####-#####-#####-#####-#####" default: Developer group: SQL Server Options From 7f0166c6141da2c8fc71606f57c1c9abf345ed32 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 16:37:48 -0800 Subject: [PATCH 09/40] add option for sa pasword --- .../sample-helm-chart-statefulset-deployment/questions.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 60063eae..8da0ea9a 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -12,6 +12,12 @@ questions: default: Developer group: SQL Server Options + - variable: MSSQL_SA_PASSWORD + label: MSSQL SA user password + description: Sets the SA user password + type: secret + group: SQL Server Options + - variable: MSSQL_AGENT_ENABLED label: Enable SQL Server Agent description: Enables the SQL Server Agent From e0fe61a09192b52fc4a381ea3cd6f2d7e4149d77 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 17:45:17 -0800 Subject: [PATCH 10/40] secret --- .../questions.yml | 29 +++++++++++++------ .../templates/deployment.yaml | 2 +- .../templates/secret.yml | 9 ++++++ 3 files changed, 30 insertions(+), 10 deletions(-) create mode 100644 linux/sample-helm-chart-statefulset-deployment/templates/secret.yml diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 8da0ea9a..691ea49b 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,13 +1,20 @@ questions: - - variable: SQL Server edition aka. MSSQL_PID - description: > - SQL Server Edition, one of: - Evaluation - Developer - Express - Web - Standard - Enterprise + - variable: ACCEPT_EULA + label: Accept the SQL Server EULA + description: Accept the SQL Server EULA + type: enum + options: + - Yes + group: SQL Server Options + + - variable: SQL Server Edition aka. MSSQL_PID + description: | + Evaluation | + Developer | + Express | + Web | + Standard | + Enterprise | Product Key of the format "#####-#####-#####-#####-#####" default: Developer group: SQL Server Options @@ -16,6 +23,10 @@ questions: label: MSSQL SA user password description: Sets the SA user password type: secret + min: 8 + max: 128 + default: "" + valid_chars: a-zA-Z0-9(`~!@#$%^&*_-+=|\\{}[]:;\"'<>,.?)/ group: SQL Server Options - variable: MSSQL_AGENT_ENABLED diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml index 136d5424..858b00a0 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml @@ -41,7 +41,7 @@ spec: - name: SA_PASSWORD valueFrom: secretKeyRef: - name: mssql + name: mssql-secret key: SA_PASSWORD volumeMounts: - name: mssql diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml new file mode 100644 index 00000000..c24fd3cb --- /dev/null +++ b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml @@ -0,0 +1,9 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mssql-secret + labels: + {{- include "mssql-latest.labels" . | nindent 4 }} +type: Opaque +data: + sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote}} From d67748ce547b53c0090e6ba0b6d6b40024f45d6b Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 17:56:33 -0800 Subject: [PATCH 11/40] Y --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 691ea49b..0b1953e7 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,8 +1,9 @@ questions: - variable: ACCEPT_EULA label: Accept the SQL Server EULA - description: Accept the SQL Server EULA + description: Accepts the SQL Server EULA type: enum + default: Yes options: - Yes group: SQL Server Options From c4177d6ce5c3b296e4e437e464d1921ad776a4f1 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 17:58:29 -0800 Subject: [PATCH 12/40] password --- .../sample-helm-chart-statefulset-deployment/questions.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 0b1953e7..4ffcdfcc 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -3,9 +3,9 @@ questions: label: Accept the SQL Server EULA description: Accepts the SQL Server EULA type: enum - default: Yes + default: "Yes" options: - - Yes + - "Yes" group: SQL Server Options - variable: SQL Server Edition aka. MSSQL_PID @@ -23,7 +23,7 @@ questions: - variable: MSSQL_SA_PASSWORD label: MSSQL SA user password description: Sets the SA user password - type: secret + type: password min: 8 max: 128 default: "" From a013dcc7f02ee79c16d90d068e3558d750c7d582 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 18:25:49 -0800 Subject: [PATCH 13/40] values files --- .../values.yaml | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index 709ad6cd..b3831cf4 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -10,21 +10,18 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "2019-latest" -ACCEPT_EULA: - value: "y" -MSSQL_PID: - value: "Developer" -MSSQL_AGENT_ENABLED: - value: "false" +ACCEPT_EULA: y +MSSQL_PID: Developer +MSSQL_AGENT_ENABLED: false containers: ports: - containerPort: 1433 + containerPort: 1433 podAnnotations: {} podSecurityContext: - fsGroup: 10001 + fsGroup: 10001 service: port: 1433 \ No newline at end of file From 4ef825db4077d6fdfa87addde3d819c37736a19f Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 18:28:01 -0800 Subject: [PATCH 14/40] Y --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 1 - linux/sample-helm-chart-statefulset-deployment/values.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 4ffcdfcc..9a30a384 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -3,7 +3,6 @@ questions: label: Accept the SQL Server EULA description: Accepts the SQL Server EULA type: enum - default: "Yes" options: - "Yes" group: SQL Server Options diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index b3831cf4..7c6dd386 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -10,7 +10,7 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "2019-latest" -ACCEPT_EULA: y +ACCEPT_EULA: Y MSSQL_PID: Developer MSSQL_AGENT_ENABLED: false From a94c976fff456ef073194045a1460a68ce8956a0 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 18:28:49 -0800 Subject: [PATCH 15/40] sa password --- linux/sample-helm-chart/templates/secret.yaml | 2 -- 1 file changed, 2 deletions(-) diff --git a/linux/sample-helm-chart/templates/secret.yaml b/linux/sample-helm-chart/templates/secret.yaml index be2ffc50..2a42d23f 100644 --- a/linux/sample-helm-chart/templates/secret.yaml +++ b/linux/sample-helm-chart/templates/secret.yaml @@ -2,8 +2,6 @@ apiVersion: v1 kind: Secret metadata: name: mssql-secret - labels: - {{- include "mssql-latest.labels" . | nindent 4 }} type: Opaque data: sa_password : {{ .Values.sa_password | b64enc | quote}} \ No newline at end of file From 6d830fa06b479f0ee282019431289dc2eef87150 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 18:37:07 -0800 Subject: [PATCH 16/40] labels --- .../questions.yml | 8 +++----- .../templates/secret.yml | 2 +- .../sample-helm-chart-statefulset-deployment/values.yaml | 2 +- linux/sample-helm-chart/templates/secret.yaml | 2 ++ 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 9a30a384..9ef13cae 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,10 +1,8 @@ questions: - variable: ACCEPT_EULA - label: Accept the SQL Server EULA - description: Accepts the SQL Server EULA - type: enum - options: - - "Yes" + label: ACCEPT_EULA + description: Accepts the SQL Server EULA (any value confirms acceptance) + default: "Yes" group: SQL Server Options - variable: SQL Server Edition aka. MSSQL_PID diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml index c24fd3cb..d83ce1ca 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml @@ -3,7 +3,7 @@ kind: Secret metadata: name: mssql-secret labels: - {{- include "mssql-latest.labels" . | nindent 4 }} + {{- include "sql-statefull-deploy.labels" . | nindent 4 }} type: Opaque data: sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote}} diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index 7c6dd386..667a652a 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -10,7 +10,7 @@ image: # Overrides the image tag whose default is the chart appVersion. tag: "2019-latest" -ACCEPT_EULA: Y +ACCEPT_EULA: "Yes" MSSQL_PID: Developer MSSQL_AGENT_ENABLED: false diff --git a/linux/sample-helm-chart/templates/secret.yaml b/linux/sample-helm-chart/templates/secret.yaml index 2a42d23f..be2ffc50 100644 --- a/linux/sample-helm-chart/templates/secret.yaml +++ b/linux/sample-helm-chart/templates/secret.yaml @@ -2,6 +2,8 @@ apiVersion: v1 kind: Secret metadata: name: mssql-secret + labels: + {{- include "mssql-latest.labels" . | nindent 4 }} type: Opaque data: sa_password : {{ .Values.sa_password | b64enc | quote}} \ No newline at end of file From ce3d2c8276581a2637207e8d1cdd2474a7ca36b1 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 18:41:11 -0800 Subject: [PATCH 17/40] chart values --- .../templates/deployment.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml index 858b00a0..0f7e5c4b 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml @@ -33,11 +33,11 @@ spec: - containerPort: {{ .Values.containers.ports.containerPort}} env: - name: MSSQL_PID - value: "{{ .Values.MSSQL_PID.value}}" + value: "{{ .Values.MSSQL_PID}}" - name: ACCEPT_EULA - value: "{{ .Values.ACCEPT_EULA.value | upper}}" + value: "{{ .Values.ACCEPT_EULA | upper}}" - name: MSSQL_AGENT_ENABLED - value: "{{ .Values.MSSQL_AGENT_ENABLED.value}}" + value: "{{ .Values.MSSQL_AGENT_ENABLED}}" - name: SA_PASSWORD valueFrom: secretKeyRef: From b97ed3baa885622db758cb5bfbc82656791a657f Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 7 Dec 2021 18:51:16 -0800 Subject: [PATCH 18/40] fix envs --- .../questions.yml | 8 ++++---- .../templates/deployment.yaml | 4 ++-- .../templates/secret.yml | 2 +- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 9ef13cae..5221b758 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -3,7 +3,7 @@ questions: label: ACCEPT_EULA description: Accepts the SQL Server EULA (any value confirms acceptance) default: "Yes" - group: SQL Server Options + group: SQL Server options - variable: SQL Server Edition aka. MSSQL_PID description: | @@ -15,7 +15,7 @@ questions: Enterprise | Product Key of the format "#####-#####-#####-#####-#####" default: Developer - group: SQL Server Options + group: SQL Server options - variable: MSSQL_SA_PASSWORD label: MSSQL SA user password @@ -25,14 +25,14 @@ questions: max: 128 default: "" valid_chars: a-zA-Z0-9(`~!@#$%^&*_-+=|\\{}[]:;\"'<>,.?)/ - group: SQL Server Options + group: SQL Server options - variable: MSSQL_AGENT_ENABLED label: Enable SQL Server Agent description: Enables the SQL Server Agent type: boolean default: false - group: SQL Server Options + group: SQL Server options - variable: defaultContainerImage label: Use default SQL Server container image diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml index 0f7e5c4b..2e693bb8 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml @@ -38,11 +38,11 @@ spec: value: "{{ .Values.ACCEPT_EULA | upper}}" - name: MSSQL_AGENT_ENABLED value: "{{ .Values.MSSQL_AGENT_ENABLED}}" - - name: SA_PASSWORD + - name: MSSQL_SA_PASSWORD valueFrom: secretKeyRef: name: mssql-secret - key: SA_PASSWORD + key: mssql_sa_password volumeMounts: - name: mssql mountPath: "/var/opt/mssql" diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml index d83ce1ca..95e0b88f 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml @@ -6,4 +6,4 @@ metadata: {{- include "sql-statefull-deploy.labels" . | nindent 4 }} type: Opaque data: - sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote}} + mssql_sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote}} From 96edcde38dd2ee3088178b059ef886d6547ad26e Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 21 Jan 2022 18:30:45 -0800 Subject: [PATCH 19/40] icon --- linux/sample-helm-chart-statefulset-deployment/Chart.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index 51c9777e..622a6966 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -21,3 +21,5 @@ version: 0.1.0 # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. appVersion: 1.16.0 + +icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAADLCAMAAAB04a46AAABMlBMVEX///82xOpwcHAAcsU6k84+Pj582/G+7fd6enqfoKG30zJ/uQCKiopya2lpaWm/v79Au91EODNi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VIaelchW8rK8hepv6GIK3nRfMtcaFDVp32EOafOfjEH3auem43dl8e3V6eEjfhhuBUae3ZA3NpWrd/g4AuFMRynzh1DvyChXcHIVxP/RE9vbvQxmAO4vneshK3+IrpPDpP91xB+vEVLQHXxrTY3V3mKY93xqnbXBSuHjt0d0hCfuM3DmIH40cktu1KaTn44xCuzsjho+9o3Rn5ME8UM1PT9TH5hXa0sATtecLpz9yI4UbWv06r8qy2nCWumfk7qt7CnAV+wQaemp7GSQEpz9JKZPDTZyuuwdwPRne8qEo0GAjkKGUCDzK+XjI6vxwIF13ITTqbEdxN+l5wan34kaRHwWvDqpxeFG9K3vLZJTnDqvPDb4XZQCG9LQUugtlLIK7eHkELpwMvL5sTvBI7rB+HdqPy93hRO/1eoo+vs7LeSiiuDOl60AfPhgiSaBza72J5A6TI2dnon0Hin/G0Gr0QXvH4YB7LwkJ893ZUTki25RvBIw+0c2PS+5t4UKvMCOs4K3KWnS2RS9juzjqCwOkiSsnugsplnm3Ul5bice26Cvl3Rba8PRXRLinZvVBqDwS3B7wbx3tVvbKG1HNuHkF488b5b3K7lGr5Z9QIIR7o+pCqJwYvltmnL2guC9oRYQXJLd7b4fIFwefmcjwQuHACZctniSc4CbL5YQTJINn8AyewTN4Bs/gLwC+oGRw5nD8A8O4iT1XkgQ81nOjko87Z8AcPpj93otNlVhOBed9Sxf8FzIygftH2/lLL08op4B7V7tynR5hm5PD09DeVqrqbDY5XJIYPARxTtFHMiu4JF0RPAiOnxygc2XR4JLU5nz/7c84j5swo4JLjavUsc1MutjJQkK4JBXGqdrIwfTGXTHQHgKXjE28llq1nfqkOlKxeDzcHF5vD/XgWwHSlN642jCf0yiGwJ0phcFOLZVlHRJlMqw2zGdVGl+AnQY4+98eHuhL0s74KHrtYFi97nYbjcZYsdJLeTVnycI2/wfO1KATejNtkgAAAABJRU5ErkJggg== From 9c9f07aff0d9848642a19f85cf559db9aaad1250 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 21 Jan 2022 19:04:28 -0800 Subject: [PATCH 20/40] add svg --- linux/sample-helm-chart/10130-icon-service-SQL-Database.svg | 1 + 1 file changed, 1 insertion(+) create mode 100644 linux/sample-helm-chart/10130-icon-service-SQL-Database.svg diff --git a/linux/sample-helm-chart/10130-icon-service-SQL-Database.svg b/linux/sample-helm-chart/10130-icon-service-SQL-Database.svg new file mode 100644 index 00000000..4271bd14 --- /dev/null +++ b/linux/sample-helm-chart/10130-icon-service-SQL-Database.svg @@ -0,0 +1 @@ +Icon-databases-130 \ No newline at end of file From 571fb5dcd93ada300eb6cb7040cff8a8e5602ad6 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 21 Jan 2022 19:05:31 -0800 Subject: [PATCH 21/40] move svg --- .../10130-icon-service-SQL-Database.svg | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename linux/{sample-helm-chart => sample-helm-chart-statefulset-deployment}/10130-icon-service-SQL-Database.svg (100%) diff --git a/linux/sample-helm-chart/10130-icon-service-SQL-Database.svg b/linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg similarity index 100% rename from linux/sample-helm-chart/10130-icon-service-SQL-Database.svg rename to linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg From 9fe79f28c6654911f4cba1bcbb43a9536d3b8162 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 21 Jan 2022 19:06:12 -0800 Subject: [PATCH 22/40] add icon to chart --- linux/sample-helm-chart-statefulset-deployment/Chart.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index 622a6966..739942c6 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -22,4 +22,4 @@ version: 0.1.0 # follow Semantic Versioning. They should reflect the version the application is using. appVersion: 1.16.0 -icon: data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPgAAADLCAMAAAB04a46AAABMlBMVEX///82xOpwcHAAcsU6k84+Pj582/G+7fd6enqfoKG30zJ/uQCKiopya2lpaWm/v79Au91EODNiiJQAbcNMqMMuj8x2qNqqzOj19fUlJSUohstPT082yvI8VV2AgIA4ODik5PRFyOvQ7/kAaMKCt93b6fQAZsHR0dE5m7bm5uahoqNnqNfk79kdwOmYwuNhYWHW1tbn9/xi0u73+/FsanIvLy+W3fOz5vbf9Ptz0++iyQCOvwDK3/BUlNLq8Pi82Sycxh5wrdlPnNKMu99poNYffMmpx+aSoFarw0CYqFGitkh4fGp9gmaHkV+mvESLl1yCimNbU1DX6MPC3Zq11Yas0HKhykiLwCamzWHQ5LTi78/I3W3S44y71kHZ6KvY553M4H+72I2OwDkzJB4BAQG/1u0WZ6DjAAALeklEQVR4nO3dfUPaSB4H8CAIYj253VyA4l4tjYmHGLVStdYACsLd7t6j1qfba3frHe//LVyemZlMwkwygQnm+1fXsIEPk98kmUmCIExTr+xtpCorb/aOhNiplw83N1fSlMPt7ZPXW5WY7lbK1KZ71czrlXo896IdtNmy3aur2ye7MeCJfsYPHz4wX+fW6jSvo2/uG0k2+Ic//+VH1utchfK6FdF9dMj6gwH58FN/vb/+M8tVbq6iidrgLD8Vmr/219fX+z8x3NoPfe6TciR3PckGX/mbCV//Ozv44bYPvnoSqWs/SrZLN939fzBb3RbGvXoSqX+rJAv/53q//yOzBt/CsI192gqHcIP+MzM3lm1ki0s4s/i785cB93fnbOG/4zT/+g5IAvDv/8Bn/gTljwnAf8hxmR+gvCA4lAyewTN4Bs/gGTyDZ/Ck4ZqmsV1hWuBnwvtzpvRUwLVT623eNRnSUwDXzt+7b3SWY0bnHq4134FvdcpKzj38DHkvVqXON9wpbjgfmZQ6z3CguOGUGND5hSPFDedtbDm3cA0tbjixS51TOLa44Xw8jkXnEq4dfyR521gHNBzCQ4sbztkywbW3NG8d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GdVGl+AnQY4+98eHuhL0s74KHrtYFi97nYbjcZYsdJLeTVnycI2/wfO1KATejNtkgAAAABJRU5ErkJggg== +icon: https://raw.githubusercontent.com/jamesongithub/mssql-docker/jy/rancher/linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg From 26a68e33d071f7e0fa2b6bf20e6d39756886d426 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Thu, 10 Mar 2022 18:48:54 -0800 Subject: [PATCH 23/40] product key as a show_if --- .../questions.yml | 33 ++++++++++++++----- .../templates/deployment.yaml | 10 +++--- .../templates/secret.yml | 2 +- .../values.yaml | 4 +-- 4 files changed, 32 insertions(+), 17 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 5221b758..223eb409 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -3,18 +3,32 @@ questions: label: ACCEPT_EULA description: Accepts the SQL Server EULA (any value confirms acceptance) default: "Yes" + required: true group: SQL Server options - - variable: SQL Server Edition aka. MSSQL_PID - description: | - Evaluation | - Developer | - Express | - Web | - Standard | - Enterprise | - Product Key of the format "#####-#####-#####-#####-#####" + - variable: MSSQL_PID + label: SQL Server Edition aka. MSSQL_PID + description: Selects SQL Server Edition or choose Product Key to enter a product key. + type: enum + options: + - Evaluation + - Developer + - Express + - Web + - Standard + - Enterprise + - Product Key default: Developer + required: true + group: SQL Server options + + - variable: PRODUCT_KEY + label: SQL Server Product Key + description: SQL Server Product Key of the format "#####-#####-#####-#####-#####" + min: 29 + max: 29 + valid_chars: a-zA-Z0-9- + show_if: MSSQL_PID="Product Key" group: SQL Server options - variable: MSSQL_SA_PASSWORD @@ -25,6 +39,7 @@ questions: max: 128 default: "" valid_chars: a-zA-Z0-9(`~!@#$%^&*_-+=|\\{}[]:;\"'<>,.?)/ + required: true group: SQL Server options - variable: MSSQL_AGENT_ENABLED diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml index 2e693bb8..bbcb596b 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml @@ -30,14 +30,14 @@ spec: image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" imagePullPolicy: {{ .Values.image.pullPolicy }} ports: - - containerPort: {{ .Values.containers.ports.containerPort}} + - containerPort: {{ .Values.containers.ports.containerPort }} env: - name: MSSQL_PID - value: "{{ .Values.MSSQL_PID}}" + value: "{{ .Values.MSSQL_PID }}" - name: ACCEPT_EULA - value: "{{ .Values.ACCEPT_EULA | upper}}" + value: "{{ .Values.ACCEPT_EULA | upper }}" - name: MSSQL_AGENT_ENABLED - value: "{{ .Values.MSSQL_AGENT_ENABLED}}" + value: "{{ .Values.MSSQL_AGENT_ENABLED }}" - name: MSSQL_SA_PASSWORD valueFrom: secretKeyRef: @@ -45,7 +45,7 @@ spec: key: mssql_sa_password volumeMounts: - name: mssql - mountPath: "/var/opt/mssql" + mountPath: /var/opt/mssql - name: mssql-config-volume mountPath: /var/opt/config volumes: diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml index 95e0b88f..5671688a 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml @@ -6,4 +6,4 @@ metadata: {{- include "sql-statefull-deploy.labels" . | nindent 4 }} type: Opaque data: - mssql_sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote}} + mssql_sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote }} diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index 667a652a..74eb09c1 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -11,7 +11,7 @@ image: tag: "2019-latest" ACCEPT_EULA: "Yes" -MSSQL_PID: Developer +MSSQL_PID: {{ .Product_KEY | default "Developer" }} MSSQL_AGENT_ENABLED: false containers: @@ -24,4 +24,4 @@ podSecurityContext: fsGroup: 10001 service: - port: 1433 \ No newline at end of file + port: 1433 From 45634daa9a134a61793dcf15ceaaeb635d8f5580 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Thu, 10 Mar 2022 19:17:41 -0800 Subject: [PATCH 24/40] tpl in values --- linux/sample-helm-chart-statefulset-deployment/values.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index 74eb09c1..b2722de8 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -8,10 +8,10 @@ image: repository: mcr.microsoft.com/mssql/server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "2019-latest" + tag: 2019-latest ACCEPT_EULA: "Yes" -MSSQL_PID: {{ .Product_KEY | default "Developer" }} +MSSQL_PID: {{ tpl .Values.Product_KEY . | default "Developer" }} MSSQL_AGENT_ENABLED: false containers: From d1733df249b1027c0dcd40635eee4f8d73e1e0da Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Thu, 10 Mar 2022 19:30:54 -0800 Subject: [PATCH 25/40] product key null --- .../templates/deployment.yaml | 2 +- linux/sample-helm-chart-statefulset-deployment/values.yaml | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml index bbcb596b..b99b3c09 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml @@ -33,7 +33,7 @@ spec: - containerPort: {{ .Values.containers.ports.containerPort }} env: - name: MSSQL_PID - value: "{{ .Values.MSSQL_PID }}" + value: "{{ .Values.PRODUCT_KEY | default .Values.MSSQL_PID }}" - name: ACCEPT_EULA value: "{{ .Values.ACCEPT_EULA | upper }}" - name: MSSQL_AGENT_ENABLED diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index b2722de8..ebf1c968 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -11,7 +11,8 @@ image: tag: 2019-latest ACCEPT_EULA: "Yes" -MSSQL_PID: {{ tpl .Values.Product_KEY . | default "Developer" }} +MSSQL_PID: Developer +PRODUCT_KEY: null MSSQL_AGENT_ENABLED: false containers: From 3c54fdc1b82d57a682c485f15bb3e1d17cb4169d Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Thu, 10 Mar 2022 19:34:07 -0800 Subject: [PATCH 26/40] show if --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 223eb409..2a73d082 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -28,7 +28,7 @@ questions: min: 29 max: 29 valid_chars: a-zA-Z0-9- - show_if: MSSQL_PID="Product Key" + show_if: "MSSQL_PID='Product Key'" group: SQL Server options - variable: MSSQL_SA_PASSWORD From 358f02086135f30b559ef9680cfc714107eb3b49 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Thu, 10 Mar 2022 19:48:33 -0800 Subject: [PATCH 27/40] set description --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 2a73d082..2d368962 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -8,7 +8,7 @@ questions: - variable: MSSQL_PID label: SQL Server Edition aka. MSSQL_PID - description: Selects SQL Server Edition or choose Product Key to enter a product key. + description: Selects SQL Server Edition or choose the last option "Product Key" to enter a product key. type: enum options: - Evaluation @@ -28,7 +28,7 @@ questions: min: 29 max: 29 valid_chars: a-zA-Z0-9- - show_if: "MSSQL_PID='Product Key'" + show_if: MSSQL_PID=Product Key group: SQL Server options - variable: MSSQL_SA_PASSWORD From 3cc4246a8e900682f2078b9abbedae77bb945c6b Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 11 Mar 2022 18:11:55 -0800 Subject: [PATCH 28/40] use link to svg instead --- .../10130-icon-service-SQL-Database.svg | 1 - linux/sample-helm-chart-statefulset-deployment/Chart.yaml | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) delete mode 100644 linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg diff --git a/linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg b/linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg deleted file mode 100644 index 4271bd14..00000000 --- a/linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg +++ /dev/null @@ -1 +0,0 @@ -Icon-databases-130 \ No newline at end of file diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index 739942c6..21456fbd 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -22,4 +22,4 @@ version: 0.1.0 # follow Semantic Versioning. They should reflect the version the application is using. appVersion: 1.16.0 -icon: https://raw.githubusercontent.com/jamesongithub/mssql-docker/jy/rancher/linux/sample-helm-chart-statefulset-deployment/10130-icon-service-SQL-Database.svg +icon: https://docs.microsoft.com/vi-vn/troubleshoot/media/hub-landing/sql-database-blue.svg From 8dd622952256d2cb91e8245e417a5fe18e41ffe8 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 11 Mar 2022 18:16:43 -0800 Subject: [PATCH 29/40] rename deployment to statefulset --- linux/sample-helm-chart-statefulset-deployment/Chart.yaml | 2 +- .../templates/{deployment.yaml => statefulset.yaml} | 0 2 files changed, 1 insertion(+), 1 deletion(-) rename linux/sample-helm-chart-statefulset-deployment/templates/{deployment.yaml => statefulset.yaml} (100%) diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index 21456fbd..ea3c53c6 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -15,7 +15,7 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml similarity index 100% rename from linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml rename to linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml From 139e9e04bb2d852161a7f78dffa33250eb2bf5b3 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:18:20 -0700 Subject: [PATCH 30/40] remove unneeded defaults in questions.yml --- .../questions.yml | 31 +++++++++---------- .../templates/statefulset.yaml | 2 +- .../values.yaml | 1 - 3 files changed, 15 insertions(+), 19 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 2d368962..bde18364 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,14 +1,20 @@ questions: - variable: ACCEPT_EULA label: ACCEPT_EULA - description: Accepts the SQL Server EULA (any value confirms acceptance) - default: "Yes" + description: Accepts the SQL Server EULA (any value confirms acceptance). You can review the EULA here required: true group: SQL Server options + - variable: USE_PRODUCT_KEY + label: Use a SQL Server Product Key + description: Enter a Product Key instead of choosing an SQL Server Edition + type: boolean + default: false + group: SQL Server options + - variable: MSSQL_PID label: SQL Server Edition aka. MSSQL_PID - description: Selects SQL Server Edition or choose the last option "Product Key" to enter a product key. + description: Select a SQL Server Edition type: enum options: - Evaluation @@ -17,18 +23,13 @@ questions: - Web - Standard - Enterprise - - Product Key - default: Developer - required: true + show_if: USE_PRODUCT_KEY=false group: SQL Server options - - variable: PRODUCT_KEY - label: SQL Server Product Key - description: SQL Server Product Key of the format "#####-#####-#####-#####-#####" - min: 29 - max: 29 - valid_chars: a-zA-Z0-9- - show_if: MSSQL_PID=Product Key + - variable: MSSQL_PID + label: SQL Server Edition aka. MSSQL_PID + description: Enter a Product Key of the format "#####-#####-#####-#####-#####" + show_if: USE_PRODUCT_KEY=true group: SQL Server options - variable: MSSQL_SA_PASSWORD @@ -46,7 +47,6 @@ questions: label: Enable SQL Server Agent description: Enables the SQL Server Agent type: boolean - default: false group: SQL Server options - variable: defaultContainerImage @@ -74,7 +74,6 @@ questions: - variable: replicas description: Replicas of the SQL Server StatefulSet - default: 3 label: Replicas type: int group: Kubernetes StatefulSet options @@ -91,7 +90,6 @@ questions: description: > Specifies containerPort for SQL Server label: SQL Server Container Port - default: 1433 group: Kubernetes Pod Options - variable: service.port @@ -99,4 +97,3 @@ questions: group: Kubernetes Service Options label: Kubernetes Service Port type: int - default: 1433 diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml index b99b3c09..bbcb596b 100644 --- a/linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml @@ -33,7 +33,7 @@ spec: - containerPort: {{ .Values.containers.ports.containerPort }} env: - name: MSSQL_PID - value: "{{ .Values.PRODUCT_KEY | default .Values.MSSQL_PID }}" + value: "{{ .Values.MSSQL_PID }}" - name: ACCEPT_EULA value: "{{ .Values.ACCEPT_EULA | upper }}" - name: MSSQL_AGENT_ENABLED diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index ebf1c968..3e5b64ab 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -12,7 +12,6 @@ image: ACCEPT_EULA: "Yes" MSSQL_PID: Developer -PRODUCT_KEY: null MSSQL_AGENT_ENABLED: false containers: From 1325130ef558c25a1905872aef52812c7bab167a Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:21:08 -0700 Subject: [PATCH 31/40] different labels --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index bde18364..4856be96 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -27,9 +27,10 @@ questions: group: SQL Server options - variable: MSSQL_PID - label: SQL Server Edition aka. MSSQL_PID + label: SQL Server License Key description: Enter a Product Key of the format "#####-#####-#####-#####-#####" show_if: USE_PRODUCT_KEY=true + default: "" group: SQL Server options - variable: MSSQL_SA_PASSWORD From bbca54baa09153e1c2d5f3de06578a987ab15e18 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:22:40 -0700 Subject: [PATCH 32/40] password requiremnts --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 4856be96..ff6bba45 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -35,7 +35,7 @@ questions: - variable: MSSQL_SA_PASSWORD label: MSSQL SA user password - description: Sets the SA user password + description: Sets the SA user password. Password requirements - https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15#password-complexity type: password min: 8 max: 128 From 72b5f372f13c2332a08616ffc76b42f4e3a4baef Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:25:17 -0700 Subject: [PATCH 33/40] questions --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index ff6bba45..5167ff6d 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,7 +1,8 @@ questions: - variable: ACCEPT_EULA label: ACCEPT_EULA - description: Accepts the SQL Server EULA (any value confirms acceptance). You can review the EULA here + # description: Accepts the SQL Server EULA (any value confirms acceptance). + description: Accepts the SQL Server EULA (any value confirms acceptance). The EULA is posted here required: true group: SQL Server options From 16995513495fb7e59da4a4e455cf3ab101765aa7 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:27:59 -0700 Subject: [PATCH 34/40] default --- .../sample-helm-chart-statefulset-deployment/questions.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 5167ff6d..b779acb3 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -2,7 +2,7 @@ questions: - variable: ACCEPT_EULA label: ACCEPT_EULA # description: Accepts the SQL Server EULA (any value confirms acceptance). - description: Accepts the SQL Server EULA (any value confirms acceptance). The EULA is posted here + description: Accepts the SQL Server EULA (any value confirms acceptance). The EULA is posted here. required: true group: SQL Server options @@ -24,13 +24,15 @@ questions: - Web - Standard - Enterprise + required: true show_if: USE_PRODUCT_KEY=false group: SQL Server options - variable: MSSQL_PID label: SQL Server License Key description: Enter a Product Key of the format "#####-#####-#####-#####-#####" - show_if: USE_PRODUCT_KEY=true + required: true + show_if: USE_PRODUCT_KEY=true default: "" group: SQL Server options From 8f9f40aca86563102d185d6edf684cc64a352a47 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:35:51 -0700 Subject: [PATCH 35/40] remove html --- .../sample-helm-chart-statefulset-deployment/questions.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index b779acb3..98e6787f 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -1,14 +1,15 @@ questions: - variable: ACCEPT_EULA label: ACCEPT_EULA + # no current support for html # description: Accepts the SQL Server EULA (any value confirms acceptance). - description: Accepts the SQL Server EULA (any value confirms acceptance). The EULA is posted here. + description: Accepts the SQL Server EULA (any value confirms acceptance). The EULA is posted @ http://go.microsoft.com/fwlink/?LinkId=746388 required: true group: SQL Server options - variable: USE_PRODUCT_KEY label: Use a SQL Server Product Key - description: Enter a Product Key instead of choosing an SQL Server Edition + description: Enter a Product Key instead of choosing a SQL Server Edition type: boolean default: false group: SQL Server options @@ -38,7 +39,7 @@ questions: - variable: MSSQL_SA_PASSWORD label: MSSQL SA user password - description: Sets the SA user password. Password requirements - https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15#password-complexity + description: Sets the SA user password. Password requirements @ https://docs.microsoft.com/en-us/sql/relational-databases/security/password-policy?view=sql-server-ver15#password-complexity type: password min: 8 max: 128 From 251d2448e1a888eb31c7ed0f49235bd968325d88 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Tue, 22 Mar 2022 19:36:47 -0700 Subject: [PATCH 36/40] remove defaults --- linux/sample-helm-chart-statefulset-deployment/questions.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/sample-helm-chart-statefulset-deployment/questions.yml index 98e6787f..e3ad9081 100644 --- a/linux/sample-helm-chart-statefulset-deployment/questions.yml +++ b/linux/sample-helm-chart-statefulset-deployment/questions.yml @@ -34,7 +34,6 @@ questions: description: Enter a Product Key of the format "#####-#####-#####-#####-#####" required: true show_if: USE_PRODUCT_KEY=true - default: "" group: SQL Server options - variable: MSSQL_SA_PASSWORD From 5654577b024257ade314ca1fc232f01c73fcb10e Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 15 Apr 2022 17:52:16 -0700 Subject: [PATCH 37/40] move changes to rancher dir --- linux/rancher/Chart.yaml | 25 ++++ linux/rancher/Readme | 1 - .../app-readme.md | 0 .../questions.yml | 0 linux/rancher/readme.md | 137 ++++++++++++++++++ linux/rancher/templates/_helpers.tpl | 62 ++++++++ linux/rancher/templates/mssqlconfig.yaml | 20 +++ linux/rancher/templates/sc.yaml | 8 + .../templates/secret.yml | 0 linux/rancher/templates/service.yaml | 14 ++ .../templates/statefulset.yaml | 0 linux/rancher/values.yaml | 27 ++++ .../Chart.yaml | 6 +- .../templates/deployment.yaml | 63 ++++++++ .../values.yaml | 17 ++- 15 files changed, 368 insertions(+), 12 deletions(-) create mode 100644 linux/rancher/Chart.yaml delete mode 100644 linux/rancher/Readme rename linux/{sample-helm-chart-statefulset-deployment => rancher}/app-readme.md (100%) rename linux/{sample-helm-chart-statefulset-deployment => rancher}/questions.yml (100%) create mode 100644 linux/rancher/readme.md create mode 100644 linux/rancher/templates/_helpers.tpl create mode 100644 linux/rancher/templates/mssqlconfig.yaml create mode 100644 linux/rancher/templates/sc.yaml rename linux/{sample-helm-chart-statefulset-deployment => rancher}/templates/secret.yml (100%) create mode 100644 linux/rancher/templates/service.yaml rename linux/{sample-helm-chart-statefulset-deployment => rancher}/templates/statefulset.yaml (100%) create mode 100644 linux/rancher/values.yaml create mode 100644 linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml diff --git a/linux/rancher/Chart.yaml b/linux/rancher/Chart.yaml new file mode 100644 index 00000000..ea3c53c6 --- /dev/null +++ b/linux/rancher/Chart.yaml @@ -0,0 +1,25 @@ +apiVersion: v2 +name: sql-statefull-deploy +description: A Helm chart for SQL Server + +# A chart can be either an 'application' or a 'library' chart. +# +# Application charts are a collection of templates that can be packaged into versioned archives +# to be deployed. +# +# Library charts provide useful utilities or functions for the chart developer. They're included as +# a dependency of application charts to inject those utilities and functions into the rendering +# pipeline. Library charts do not define any templates and therefore cannot be deployed. +type: application + +# This is the chart version. This version number should be incremented each time you make changes +# to the chart and its templates, including the app version. +# Versions are expected to follow Semantic Versioning (https://semver.org/) +version: 0.1.1 + +# This is the version number of the application being deployed. This version number should be +# incremented each time you make changes to the application. Versions are not expected to +# follow Semantic Versioning. They should reflect the version the application is using. +appVersion: 1.16.0 + +icon: https://docs.microsoft.com/vi-vn/troubleshoot/media/hub-landing/sql-database-blue.svg diff --git a/linux/rancher/Readme b/linux/rancher/Readme deleted file mode 100644 index 8b137891..00000000 --- a/linux/rancher/Readme +++ /dev/null @@ -1 +0,0 @@ - diff --git a/linux/sample-helm-chart-statefulset-deployment/app-readme.md b/linux/rancher/app-readme.md similarity index 100% rename from linux/sample-helm-chart-statefulset-deployment/app-readme.md rename to linux/rancher/app-readme.md diff --git a/linux/sample-helm-chart-statefulset-deployment/questions.yml b/linux/rancher/questions.yml similarity index 100% rename from linux/sample-helm-chart-statefulset-deployment/questions.yml rename to linux/rancher/questions.yml diff --git a/linux/rancher/readme.md b/linux/rancher/readme.md new file mode 100644 index 00000000..ff2be90c --- /dev/null +++ b/linux/rancher/readme.md @@ -0,0 +1,137 @@ +# Readme.md + +This HELM chart is a sample "as-is" chart provided for reference to help guide with SQL Server deployment on Kubernetes cluster. + +## Prerequisites: + +1. This chart is built on helm v3. It requires a kubernetes cluster to be running for you to deploy SQL container using this chart. +2. Ensure you have the helm installed on the client from where you will connect to the kubernetes cluster to deploy using the helm chart. +3. For minimum hardware requirement for the host to run SQL Server containers please refer to the system requirements section for SQL on Linux. +4. Requires the following variables to be set or changed in the values.yaml file :
+ a. Please ensure that you accept the EULA for SQL Server, by changing the value of ACCEPT_EULA.value=y in values.yaml file or set it during the helm install command --set ACCEPT_EULA.value=Y.
+ b. Please do choose the right edition of SQL Server that you would like to install you can change the value of the MSSQL_PID.value in the values file to the edition that you want to install or you can also + change it during the helm install command using the option --set MSSQL_PID.value=Enterprise, If you do not pass the flag and do not change it in the yaml, then by default it is going to install developer edition.
c. Also please do provide your customized value for the sa_password, if you do not provide it then by default the sa_password will the value as shown in the below table.
+ +Note: Once you deploy SQL server containers using the chart below, please log into SQL Server using sa account and change the password for sa, this ensures that as DBA you have the control of the sa user and password. + + +## Chart usage: + +On the client machine where you have the Helm tools installed, download the chart on your machine and make the required changes to the values.yaml file as per your requirement. To see the list of settings that can be changed using the values.yaml file please refer to the table below. + + + +| Configuration parameters | Description | Default_Value | +|----------------------------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|--------------------------------------- | +| Values.image.repository | The SQL image to be downloaded and used for container deployment. | mcr.microsoft.com/mssql/server | +| Values.image.tag | The tag of the image to be download for the specific SQL image. | 2019-latest | +| Values.ACCEPT_EULA.value | Set the ACCEPT_EULA variable to any value to confirm your acceptance of the SQL Server EULA, please refer environment variable for more details. | Y | +| Values.MSSQL_PID.value | Set the SQL Server edition or product key. please refer environment variable for more details | Developer | +| Values.MSSQL_AGENT_ENABLED.value | Enable SQL Server Agent. For example, 'true' is enabled and 'false' is disabled. By default, agent is disabled. please refer environment variable for more details. | TRUE | +| Values.containers.ports.containerPort | Port on which the SQL Server is listening inside the container. | 1433 | +| Values.podSecurityContext.fsgroup | Security context at the pod level. | 10001 | +| Values.service.port | The service port number. | 1433 | +| Values.replicas | This value controls the number of SQL Server deployments that would be done, consider this as the number of SQL Server instances that will run. | 3 | + +
+ +## Deployment details: + +> [!NOTE] +> Here are my deployment details, please make changes to the values.yaml or other files as per your requirement. + +
+ +In this scenario, I am deploying three SQL Server containers on a Azure Kubernetes Service (AKS) as statefulset deployments. You can follow [Setup and connect to AKS](https://docs.microsoft.com/en-us/azure/aks/kubernetes-walkthrough-portal) to read instructions on setting up AKS and connecting to it. Also the storage class that I am using here is "Azure-disk". Please do find details below for each of the yaml file used in the template folder of this chart. + +| File Name | Description | +|-|-| +| _helpers.tpl | Template file with all the template definitions that will be used in this chart. | +| deployment.yaml | A manifest file to describing the deployment details for SQL Server. | +| mssqlconfig.yaml | SQL server mssql.conf file and its content that you would like to mount to the SQL Server container. For parameters that you can pass in this file please refer mssql.conf documentation. To modify the mssql.conf settings please modify this file. | +| sc.yaml | A manifest file that describes the storage class (SC) to be deployed. To make any changes to the sc please modify this file accordingly. | +| service.yaml | A manifest file that defines the kubernetes service type and port. Because this is a statefulset deployment, this manifest files helps in creating the headless service. Please modify this for any service modification that is needed. | + +
+ +With this information, and probably after you have modified the required files you are now ready to deploy SQL Server using this chart. From the client machine where you have the helm chart installed, change the +directory of the CLI to the directory where you have the chart downloaded and to deploy SQL Server using this chart run the command: +
+ + +``` bash +helm install mssql . --set ACCEPT_EULA.value=Y --set MSSQL_PID.value=Developer +``` +
+ +After a few minutes this should deploy the SQL Server containers and you can see all the artifacts using the command : +
+ +```bash +D:\helm-charts\sql-statefull-deploy>kubectl get all +``` + +The output should look as shown below: + +
+ +```bash +NAME READY STATUS RESTARTS AGE +pod/mssql-sql-statefull-deploy-0 1/1 Running 0 12m +pod/mssql-sql-statefull-deploy-1 1/1 Running 0 12m +pod/mssql-sql-statefull-deploy-2 1/1 Running 0 12m + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/mssql-sql-statefull-deploy ClusterIP None 1433/TCP 16m + +NAME READY AGE +statefulset.apps/mssql-sql-statefull-deploy 3/3 16m +``` + +This chart also includes an extra folder called "services" this folder has two more manifest files as described below: + +| Name | Description | +|------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| +| ex_service.yaml | This containes sample code to create the external load balancer service for each of the pods created above, so SQL Server can be accessed outside the cluster | +| ag_endpoint.yaml | This containes sample code to expose the AG endpoint ports within the cluster, so each pod can talk to one another on the AG port. This will be needed if you are setting up AG between the pods. | + +
+ +Once you deploy the above files as well, using the commands shown below, you should have an external load balancer service created for each of the pods and another cluster IP service for each of the pod exposing the AG (alwayson) port for each pod within the cluster. + + +```bash +D:\helm-charts\sql-statefull-deploy>kubectl apply -f "D:\helm-charts\sql-statefull-deploy\services\ex_service.yaml" +D:\helm-charts\sql-statefull-deploy>kubectl apply -f "D:\helm-charts\sql-statefull-deploy\services\ag_endpoint.yaml" +``` + + +Finally, after all the deployments here are the resources that you should see: + + +```bash +D:\>kubectl get all +NAME READY STATUS RESTARTS AGE +pod/mssql-sql-statefull-deploy-0 1/1 Running 0 127m +pod/mssql-sql-statefull-deploy-1 1/1 Running 0 126m +pod/mssql-sql-statefull-deploy-2 1/1 Running 0 125m + +NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE +service/kubernetes ClusterIP 10.0.0.1 443/TCP 220d +service/mssql-mirror-0 ClusterIP 10.0.148.0 5022/TCP 124m +service/mssql-mirror-1 ClusterIP 10.0.254.58 5022/TCP 124m +service/mssql-mirror-2 ClusterIP 10.0.196.129 5022/TCP 124m +service/mssql-sql-statefull-deploy ClusterIP None 1433/TCP 127m +service/mssql-sql-statefull-deploy-0 LoadBalancer 10.0.238.203 104.211.231.206 1433:30923/TCP 124m +service/mssql-sql-statefull-deploy-1 LoadBalancer 10.0.96.108 104.211.203.78 1433:32695/TCP 124m +service/mssql-sql-statefull-deploy-2 LoadBalancer 10.0.78.10 104.211.203.159 1433:31042/TCP 124m + +NAME READY AGE +statefulset.apps/mssql-sql-statefull-deploy 3/3 127m +``` + +## Connect to SQL Server + +Now you are ready to connect to the SQL Server using any of the familiar tools that you work with, like the [SSMS](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15) (SQL Server Management Studio) or [SQLCMD](https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15) or [ADS](https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15) (Azure Data Studio), etc. The IP address that you will use to connect is the External-IP address for the pod service which in this case one such example is: to connect to mssql-sql-statefull-deploy-0 SQL Server, the IP address 104.211.231.206 will be used in ssms or any other client. + +For more details on the SQL Server deployment on AKS using manual method please refer [Deploy a SQL Server container in Kubernetes with Azure Kubernetes Services (AKS)](https://docs.microsoft.com/en-us/sql/linux/tutorial-sql-server-containers-kubernetes?view=sql-server-ver15). diff --git a/linux/rancher/templates/_helpers.tpl b/linux/rancher/templates/_helpers.tpl new file mode 100644 index 00000000..eb61c80e --- /dev/null +++ b/linux/rancher/templates/_helpers.tpl @@ -0,0 +1,62 @@ +{{/* +Expand the name of the chart. +*/}} +{{- define "sql-statefull-deploy.name" -}} +{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Create a default fully qualified app name. +We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). +If release name contains chart name it will be used as a full name. +*/}} +{{- define "sql-statefull-deploy.fullname" -}} +{{- if .Values.fullnameOverride }} +{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- $name := default .Chart.Name .Values.nameOverride }} +{{- if contains $name .Release.Name }} +{{- .Release.Name | trunc 63 | trimSuffix "-" }} +{{- else }} +{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} +{{- end }} +{{- end }} +{{- end }} + +{{/* +Create chart name and version as used by the chart label. +*/}} +{{- define "sql-statefull-deploy.chart" -}} +{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- end }} + +{{/* +Common labels +*/}} +{{- define "sql-statefull-deploy.labels" -}} +helm.sh/chart: {{ include "sql-statefull-deploy.chart" . }} +{{ include "sql-statefull-deploy.selectorLabels" . }} +{{- if .Chart.AppVersion }} +app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} +{{- end }} +app.kubernetes.io/managed-by: {{ .Release.Service }} +{{- end }} + +{{/* +Selector labels +*/}} +{{- define "sql-statefull-deploy.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sql-statefull-deploy.name" . }} +app.kubernetes.io/instance: {{ .Release.Name }} +{{- end }} + +{{/* +Create the name of the service account to use +*/}} +{{- define "sql-statefull-deploy.serviceAccountName" -}} +{{- if .Values.serviceAccount.create }} +{{- default (include "sql-statefull-deploy.fullname" .) .Values.serviceAccount.name }} +{{- else }} +{{- default "default" .Values.serviceAccount.name }} +{{- end }} +{{- end }} diff --git a/linux/rancher/templates/mssqlconfig.yaml b/linux/rancher/templates/mssqlconfig.yaml new file mode 100644 index 00000000..cf877c3e --- /dev/null +++ b/linux/rancher/templates/mssqlconfig.yaml @@ -0,0 +1,20 @@ +kind: ConfigMap +apiVersion: v1 +metadata: + name: mssql +data: + mssql.conf: | + [EULA] + accepteula = Y + accepteulaml = Y + + [coredump] + captureminiandfull = true + coredumptype = full + + [hadr] + hadrenabled = 1 + + [language] + lcid = 1033 + \ No newline at end of file diff --git a/linux/rancher/templates/sc.yaml b/linux/rancher/templates/sc.yaml new file mode 100644 index 00000000..6b75debf --- /dev/null +++ b/linux/rancher/templates/sc.yaml @@ -0,0 +1,8 @@ +kind: StorageClass +apiVersion: storage.k8s.io/v1beta1 +metadata: + name: azure-disk +provisioner: kubernetes.io/azure-disk +parameters: + storageaccounttype: Standard_LRS + kind: Managed \ No newline at end of file diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/secret.yml b/linux/rancher/templates/secret.yml similarity index 100% rename from linux/sample-helm-chart-statefulset-deployment/templates/secret.yml rename to linux/rancher/templates/secret.yml diff --git a/linux/rancher/templates/service.yaml b/linux/rancher/templates/service.yaml new file mode 100644 index 00000000..58459151 --- /dev/null +++ b/linux/rancher/templates/service.yaml @@ -0,0 +1,14 @@ +apiVersion: v1 +kind: Service +metadata: + name: {{ include "sql-statefull-deploy.fullname" . }} + labels: + {{- include "sql-statefull-deploy.labels" . | nindent 4 }} +spec: + clusterIP: None + ports: + - port: {{ .Values.service.port }} + targetPort: http + protocol: TCP + selector: + {{- include "sql-statefull-deploy.selectorLabels" . | nindent 4 }} diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml b/linux/rancher/templates/statefulset.yaml similarity index 100% rename from linux/sample-helm-chart-statefulset-deployment/templates/statefulset.yaml rename to linux/rancher/templates/statefulset.yaml diff --git a/linux/rancher/values.yaml b/linux/rancher/values.yaml new file mode 100644 index 00000000..3e5b64ab --- /dev/null +++ b/linux/rancher/values.yaml @@ -0,0 +1,27 @@ +# Default values for mssql-latest. +# This is a YAML-formatted file. +# Declare variables to be passed into your templates. + +replicas: 3 + +image: + repository: mcr.microsoft.com/mssql/server + pullPolicy: IfNotPresent + # Overrides the image tag whose default is the chart appVersion. + tag: 2019-latest + +ACCEPT_EULA: "Yes" +MSSQL_PID: Developer +MSSQL_AGENT_ENABLED: false + +containers: + ports: + containerPort: 1433 + +podAnnotations: {} + +podSecurityContext: + fsGroup: 10001 + +service: + port: 1433 diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index ea3c53c6..be245c98 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: sql-statefull-deploy -description: A Helm chart for SQL Server +description: A Helm chart for Kubernetes # A chart can be either an 'application' or a 'library' chart. # @@ -15,11 +15,9 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.1.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. appVersion: 1.16.0 - -icon: https://docs.microsoft.com/vi-vn/troubleshoot/media/hub-landing/sql-database-blue.svg diff --git a/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml new file mode 100644 index 00000000..136d5424 --- /dev/null +++ b/linux/sample-helm-chart-statefulset-deployment/templates/deployment.yaml @@ -0,0 +1,63 @@ +apiVersion: apps/v1 +kind: StatefulSet +metadata: + name: {{ include "sql-statefull-deploy.fullname" . }} + labels: + {{- include "sql-statefull-deploy.labels" . | nindent 4 }} +spec: + serviceName: {{ include "sql-statefull-deploy.fullname" . }} + replicas: {{ .Values.replicas }} + selector: + matchLabels: + {{- include "sql-statefull-deploy.selectorLabels" . | nindent 6 }} + template: + metadata: + {{- with .Values.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + {{- include "sql-statefull-deploy.selectorLabels" . | nindent 8 }} + spec: + securityContext: + {{- toYaml .Values.podSecurityContext | nindent 8 }} + containers: + - name: {{ .Chart.Name }} + command: + - /bin/bash + - -c + - cp /var/opt/config/mssql.conf /var/opt/mssql/mssql.conf && /opt/mssql/bin/sqlservr + image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.image.pullPolicy }} + ports: + - containerPort: {{ .Values.containers.ports.containerPort}} + env: + - name: MSSQL_PID + value: "{{ .Values.MSSQL_PID.value}}" + - name: ACCEPT_EULA + value: "{{ .Values.ACCEPT_EULA.value | upper}}" + - name: MSSQL_AGENT_ENABLED + value: "{{ .Values.MSSQL_AGENT_ENABLED.value}}" + - name: SA_PASSWORD + valueFrom: + secretKeyRef: + name: mssql + key: SA_PASSWORD + volumeMounts: + - name: mssql + mountPath: "/var/opt/mssql" + - name: mssql-config-volume + mountPath: /var/opt/config + volumes: + - name: mssql-config-volume + configMap: + name: mssql + volumeClaimTemplates: + - metadata: + name: mssql + spec: + accessModes: + - ReadWriteOnce + resources: + requests: + storage: 8Gi \ No newline at end of file diff --git a/linux/sample-helm-chart-statefulset-deployment/values.yaml b/linux/sample-helm-chart-statefulset-deployment/values.yaml index 3e5b64ab..709ad6cd 100644 --- a/linux/sample-helm-chart-statefulset-deployment/values.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/values.yaml @@ -8,20 +8,23 @@ image: repository: mcr.microsoft.com/mssql/server pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: 2019-latest + tag: "2019-latest" -ACCEPT_EULA: "Yes" -MSSQL_PID: Developer -MSSQL_AGENT_ENABLED: false +ACCEPT_EULA: + value: "y" +MSSQL_PID: + value: "Developer" +MSSQL_AGENT_ENABLED: + value: "false" containers: ports: - containerPort: 1433 + containerPort: 1433 podAnnotations: {} podSecurityContext: - fsGroup: 10001 + fsGroup: 10001 service: - port: 1433 + port: 1433 \ No newline at end of file From c7259e907a76f42eff819d2266ac8175040a16a3 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 15 Apr 2022 18:20:16 -0700 Subject: [PATCH 38/40] hide from rancher catalog --- linux/rancher/Chart.yaml | 8 ++++---- linux/rancher/app-readme.md | 1 - linux/rancher/values.yaml | 5 +---- linux/sample-helm-chart-statefulset-deployment/Chart.yaml | 5 ++++- linux/sample-helm-chart/Chart.yaml | 5 ++++- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/linux/rancher/Chart.yaml b/linux/rancher/Chart.yaml index ea3c53c6..f1f07b51 100644 --- a/linux/rancher/Chart.yaml +++ b/linux/rancher/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 -name: sql-statefull-deploy -description: A Helm chart for SQL Server +name: sql-server-rancher +description: A Helm chart for SQL Server on Rancher # A chart can be either an 'application' or a 'library' chart. # @@ -15,11 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.1 +version: 0.0.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. -appVersion: 1.16.0 +appVersion: 2019.cu15 icon: https://docs.microsoft.com/vi-vn/troubleshoot/media/hub-landing/sql-database-blue.svg diff --git a/linux/rancher/app-readme.md b/linux/rancher/app-readme.md index 0903419d..c0b0ba7d 100644 --- a/linux/rancher/app-readme.md +++ b/linux/rancher/app-readme.md @@ -2,5 +2,4 @@ [Microsoft SQL Server](https://en.wikipedia.org/wiki/Microsoft_SQL_Server/) is a relational database management system developed by Microsoft. As a database server, it is a software product with the primary function of storing and retrieving data as requested by other software applications—which may run either on the same computer or on another computer across a network (including the Internet). Microsoft markets at least a dozen different editions of Microsoft SQL Server, aimed at different audiences and for workloads ranging from small single-machine applications to large Internet-facing applications with many concurrent users. - This helm chart creates a SQL Server workload using StatefulSet along with a Service and Azure Disk storage class. diff --git a/linux/rancher/values.yaml b/linux/rancher/values.yaml index 3e5b64ab..52a0c3dc 100644 --- a/linux/rancher/values.yaml +++ b/linux/rancher/values.yaml @@ -1,13 +1,10 @@ -# Default values for mssql-latest. -# This is a YAML-formatted file. -# Declare variables to be passed into your templates. +--- replicas: 3 image: repository: mcr.microsoft.com/mssql/server pullPolicy: IfNotPresent - # Overrides the image tag whose default is the chart appVersion. tag: 2019-latest ACCEPT_EULA: "Yes" diff --git a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml index be245c98..2ebe6be7 100644 --- a/linux/sample-helm-chart-statefulset-deployment/Chart.yaml +++ b/linux/sample-helm-chart-statefulset-deployment/Chart.yaml @@ -15,9 +15,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. appVersion: 1.16.0 + +annotations: + catalog.cattle.io/hidden: "true" # hide from Rancher catalog diff --git a/linux/sample-helm-chart/Chart.yaml b/linux/sample-helm-chart/Chart.yaml index 23eef3ff..caca28fe 100644 --- a/linux/sample-helm-chart/Chart.yaml +++ b/linux/sample-helm-chart/Chart.yaml @@ -15,9 +15,12 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.0 +version: 0.1.1 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. appVersion: 1.16.0 + +annotations: + catalog.cattle.io/hidden: "true" # hide from Rancher catalog From 65c38b8f85aa4324fce26ef0704bae31a0baf528 Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 15 Apr 2022 19:25:40 -0700 Subject: [PATCH 39/40] rename template functions --- linux/rancher/Makefile | 7 ++++ linux/rancher/readme.md | 34 ++++++++-------- linux/rancher/templates/_helpers.tpl | 52 ++++++++++++------------ linux/rancher/templates/sc.yaml | 4 +- linux/rancher/templates/secret.yml | 2 +- linux/rancher/templates/service.yaml | 6 +-- linux/rancher/templates/statefulset.yaml | 12 +++--- linux/rancher/values.test.yaml | 2 + 8 files changed, 64 insertions(+), 55 deletions(-) create mode 100644 linux/rancher/Makefile create mode 100644 linux/rancher/values.test.yaml diff --git a/linux/rancher/Makefile b/linux/rancher/Makefile new file mode 100644 index 00000000..06acfea7 --- /dev/null +++ b/linux/rancher/Makefile @@ -0,0 +1,7 @@ +.PHONY: lint dry-run + +lint: + helm lint --values ./values.test.yaml + +template: + helm template --values ./values.test.yaml . --debug diff --git a/linux/rancher/readme.md b/linux/rancher/readme.md index ff2be90c..4ed5f0e7 100644 --- a/linux/rancher/readme.md +++ b/linux/rancher/readme.md @@ -68,7 +68,7 @@ After a few minutes this should deploy the SQL Server containers and you can see
```bash -D:\helm-charts\sql-statefull-deploy>kubectl get all +D:\helm-charts\sql-server-rancher>kubectl get all ``` The output should look as shown below: @@ -77,15 +77,15 @@ The output should look as shown below: ```bash NAME READY STATUS RESTARTS AGE -pod/mssql-sql-statefull-deploy-0 1/1 Running 0 12m -pod/mssql-sql-statefull-deploy-1 1/1 Running 0 12m -pod/mssql-sql-statefull-deploy-2 1/1 Running 0 12m +pod/mssql-sql-server-rancher-0 1/1 Running 0 12m +pod/mssql-sql-server-rancher-1 1/1 Running 0 12m +pod/mssql-sql-server-rancher-2 1/1 Running 0 12m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE -service/mssql-sql-statefull-deploy ClusterIP None 1433/TCP 16m +service/mssql-sql-server-rancher ClusterIP None 1433/TCP 16m NAME READY AGE -statefulset.apps/mssql-sql-statefull-deploy 3/3 16m +statefulset.apps/mssql-sql-server-rancher 3/3 16m ``` This chart also includes an extra folder called "services" this folder has two more manifest files as described below: @@ -101,8 +101,8 @@ Once you deploy the above files as well, using the commands shown below, you sho ```bash -D:\helm-charts\sql-statefull-deploy>kubectl apply -f "D:\helm-charts\sql-statefull-deploy\services\ex_service.yaml" -D:\helm-charts\sql-statefull-deploy>kubectl apply -f "D:\helm-charts\sql-statefull-deploy\services\ag_endpoint.yaml" +D:\helm-charts\sql-server-rancher>kubectl apply -f "D:\helm-charts\sql-server-rancher\services\ex_service.yaml" +D:\helm-charts\sql-server-rancher>kubectl apply -f "D:\helm-charts\sql-server-rancher\services\ag_endpoint.yaml" ``` @@ -112,26 +112,26 @@ Finally, after all the deployments here are the resources that you should see: ```bash D:\>kubectl get all NAME READY STATUS RESTARTS AGE -pod/mssql-sql-statefull-deploy-0 1/1 Running 0 127m -pod/mssql-sql-statefull-deploy-1 1/1 Running 0 126m -pod/mssql-sql-statefull-deploy-2 1/1 Running 0 125m +pod/mssql-sql-server-rancher-0 1/1 Running 0 127m +pod/mssql-sql-server-rancher-1 1/1 Running 0 126m +pod/mssql-sql-server-rancher-2 1/1 Running 0 125m NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE service/kubernetes ClusterIP 10.0.0.1 443/TCP 220d service/mssql-mirror-0 ClusterIP 10.0.148.0 5022/TCP 124m service/mssql-mirror-1 ClusterIP 10.0.254.58 5022/TCP 124m service/mssql-mirror-2 ClusterIP 10.0.196.129 5022/TCP 124m -service/mssql-sql-statefull-deploy ClusterIP None 1433/TCP 127m -service/mssql-sql-statefull-deploy-0 LoadBalancer 10.0.238.203 104.211.231.206 1433:30923/TCP 124m -service/mssql-sql-statefull-deploy-1 LoadBalancer 10.0.96.108 104.211.203.78 1433:32695/TCP 124m -service/mssql-sql-statefull-deploy-2 LoadBalancer 10.0.78.10 104.211.203.159 1433:31042/TCP 124m +service/mssql-sql-server-rancher ClusterIP None 1433/TCP 127m +service/mssql-sql-server-rancher-0 LoadBalancer 10.0.238.203 104.211.231.206 1433:30923/TCP 124m +service/mssql-sql-server-rancher-1 LoadBalancer 10.0.96.108 104.211.203.78 1433:32695/TCP 124m +service/mssql-sql-server-rancher-2 LoadBalancer 10.0.78.10 104.211.203.159 1433:31042/TCP 124m NAME READY AGE -statefulset.apps/mssql-sql-statefull-deploy 3/3 127m +statefulset.apps/mssql-sql-server-rancher 3/3 127m ``` ## Connect to SQL Server -Now you are ready to connect to the SQL Server using any of the familiar tools that you work with, like the [SSMS](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15) (SQL Server Management Studio) or [SQLCMD](https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15) or [ADS](https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15) (Azure Data Studio), etc. The IP address that you will use to connect is the External-IP address for the pod service which in this case one such example is: to connect to mssql-sql-statefull-deploy-0 SQL Server, the IP address 104.211.231.206 will be used in ssms or any other client. +Now you are ready to connect to the SQL Server using any of the familiar tools that you work with, like the [SSMS](https://docs.microsoft.com/en-us/sql/ssms/download-sql-server-management-studio-ssms?view=sql-server-ver15) (SQL Server Management Studio) or [SQLCMD](https://docs.microsoft.com/en-us/sql/tools/sqlcmd-utility?view=sql-server-ver15) or [ADS](https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio?view=sql-server-ver15) (Azure Data Studio), etc. The IP address that you will use to connect is the External-IP address for the pod service which in this case one such example is: to connect to mssql-sql-server-rancher-0 SQL Server, the IP address 104.211.231.206 will be used in ssms or any other client. For more details on the SQL Server deployment on AKS using manual method please refer [Deploy a SQL Server container in Kubernetes with Azure Kubernetes Services (AKS)](https://docs.microsoft.com/en-us/sql/linux/tutorial-sql-server-containers-kubernetes?view=sql-server-ver15). diff --git a/linux/rancher/templates/_helpers.tpl b/linux/rancher/templates/_helpers.tpl index eb61c80e..e16ec75a 100644 --- a/linux/rancher/templates/_helpers.tpl +++ b/linux/rancher/templates/_helpers.tpl @@ -1,8 +1,8 @@ {{/* Expand the name of the chart. */}} -{{- define "sql-statefull-deploy.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} +{{- define "sql-server-rancher.name" -}} + {{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} {{- end }} {{/* @@ -10,32 +10,32 @@ Create a default fully qualified app name. We truncate at 63 chars because some Kubernetes name fields are limited to this (by the DNS naming spec). If release name contains chart name it will be used as a full name. */}} -{{- define "sql-statefull-deploy.fullname" -}} -{{- if .Values.fullnameOverride }} -{{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- if contains $name .Release.Name }} -{{- .Release.Name | trunc 63 | trimSuffix "-" }} -{{- else }} -{{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} -{{- end }} -{{- end }} +{{- define "sql-server-rancher.fullname" -}} + {{- if .Values.fullnameOverride }} + {{- .Values.fullnameOverride | trunc 63 | trimSuffix "-" }} + {{- else }} + {{- $name := default .Chart.Name .Values.nameOverride }} + {{- if contains $name .Release.Name }} + {{- .Release.Name | trunc 63 | trimSuffix "-" }} + {{- else }} + {{- printf "%s-%s" .Release.Name $name | trunc 63 | trimSuffix "-" }} + {{- end }} + {{- end }} {{- end }} {{/* Create chart name and version as used by the chart label. */}} -{{- define "sql-statefull-deploy.chart" -}} -{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} +{{- define "sql-server-rancher.chart" -}} + {{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" }} {{- end }} {{/* Common labels */}} -{{- define "sql-statefull-deploy.labels" -}} -helm.sh/chart: {{ include "sql-statefull-deploy.chart" . }} -{{ include "sql-statefull-deploy.selectorLabels" . }} +{{- define "sql-server-rancher.labels" -}} +helm.sh/chart: {{ include "sql-server-rancher.chart" . }} +{{ include "sql-server-rancher.selectorLabels" . }} {{- if .Chart.AppVersion }} app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} {{- end }} @@ -45,18 +45,18 @@ app.kubernetes.io/managed-by: {{ .Release.Service }} {{/* Selector labels */}} -{{- define "sql-statefull-deploy.selectorLabels" -}} -app.kubernetes.io/name: {{ include "sql-statefull-deploy.name" . }} +{{- define "sql-server-rancher.selectorLabels" -}} +app.kubernetes.io/name: {{ include "sql-server-rancher.name" . }} app.kubernetes.io/instance: {{ .Release.Name }} {{- end }} {{/* Create the name of the service account to use */}} -{{- define "sql-statefull-deploy.serviceAccountName" -}} -{{- if .Values.serviceAccount.create }} -{{- default (include "sql-statefull-deploy.fullname" .) .Values.serviceAccount.name }} -{{- else }} -{{- default "default" .Values.serviceAccount.name }} -{{- end }} +{{- define "sql-server-rancher.serviceAccountName" -}} + {{- if .Values.serviceAccount.create }} + {{- default (include "sql-server-rancher.fullname" .) .Values.serviceAccount.name }} + {{- else }} + {{- default "default" .Values.serviceAccount.name }} + {{- end }} {{- end }} diff --git a/linux/rancher/templates/sc.yaml b/linux/rancher/templates/sc.yaml index 6b75debf..21d42e4a 100644 --- a/linux/rancher/templates/sc.yaml +++ b/linux/rancher/templates/sc.yaml @@ -1,8 +1,8 @@ kind: StorageClass -apiVersion: storage.k8s.io/v1beta1 +apiVersion: storage.k8s.io/v1 metadata: name: azure-disk provisioner: kubernetes.io/azure-disk parameters: storageaccounttype: Standard_LRS - kind: Managed \ No newline at end of file + kind: Managed diff --git a/linux/rancher/templates/secret.yml b/linux/rancher/templates/secret.yml index 5671688a..65245e1c 100644 --- a/linux/rancher/templates/secret.yml +++ b/linux/rancher/templates/secret.yml @@ -3,7 +3,7 @@ kind: Secret metadata: name: mssql-secret labels: - {{- include "sql-statefull-deploy.labels" . | nindent 4 }} + {{- include "sql-server-rancher.labels" . | nindent 4 }} type: Opaque data: mssql_sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote }} diff --git a/linux/rancher/templates/service.yaml b/linux/rancher/templates/service.yaml index 58459151..c5b18f30 100644 --- a/linux/rancher/templates/service.yaml +++ b/linux/rancher/templates/service.yaml @@ -1,9 +1,9 @@ apiVersion: v1 kind: Service metadata: - name: {{ include "sql-statefull-deploy.fullname" . }} + name: {{ include "sql-server-rancher.fullname" . }} labels: - {{- include "sql-statefull-deploy.labels" . | nindent 4 }} + {{- include "sql-server-rancher.labels" . | nindent 4 }} spec: clusterIP: None ports: @@ -11,4 +11,4 @@ spec: targetPort: http protocol: TCP selector: - {{- include "sql-statefull-deploy.selectorLabels" . | nindent 4 }} + {{- include "sql-server-rancher.selectorLabels" . | nindent 4 }} diff --git a/linux/rancher/templates/statefulset.yaml b/linux/rancher/templates/statefulset.yaml index bbcb596b..d4e7ff40 100644 --- a/linux/rancher/templates/statefulset.yaml +++ b/linux/rancher/templates/statefulset.yaml @@ -1,15 +1,15 @@ apiVersion: apps/v1 kind: StatefulSet metadata: - name: {{ include "sql-statefull-deploy.fullname" . }} + name: {{ include "sql-server-rancher.fullname" . }} labels: - {{- include "sql-statefull-deploy.labels" . | nindent 4 }} + {{- include "sql-server-rancher.labels" . | nindent 4 }} spec: - serviceName: {{ include "sql-statefull-deploy.fullname" . }} + serviceName: {{ include "sql-server-rancher.fullname" . }} replicas: {{ .Values.replicas }} selector: matchLabels: - {{- include "sql-statefull-deploy.selectorLabels" . | nindent 6 }} + {{- include "sql-server-rancher.selectorLabels" . | nindent 6 }} template: metadata: {{- with .Values.podAnnotations }} @@ -17,7 +17,7 @@ spec: {{- toYaml . | nindent 8 }} {{- end }} labels: - {{- include "sql-statefull-deploy.selectorLabels" . | nindent 8 }} + {{- include "sql-server-rancher.selectorLabels" . | nindent 8 }} spec: securityContext: {{- toYaml .Values.podSecurityContext | nindent 8 }} @@ -60,4 +60,4 @@ spec: - ReadWriteOnce resources: requests: - storage: 8Gi \ No newline at end of file + storage: 8Gi diff --git a/linux/rancher/values.test.yaml b/linux/rancher/values.test.yaml new file mode 100644 index 00000000..69061768 --- /dev/null +++ b/linux/rancher/values.test.yaml @@ -0,0 +1,2 @@ +# since a default SA_PASSWORD is not set, this is used for helm lint and helm debug, otherwise unused +MSSQL_SA_PASSWORD: Sfr9nxVVkbMVGTQweKmD From 136a48ff068f2ea427ea8f5fa2738651764fa95a Mon Sep 17 00:00:00 2001 From: "jamesongithub@users.noreply.github.com" Date: Fri, 15 Apr 2022 19:38:22 -0700 Subject: [PATCH 40/40] formatting --- linux/rancher/templates/mssqlconfig.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/linux/rancher/templates/mssqlconfig.yaml b/linux/rancher/templates/mssqlconfig.yaml index cf877c3e..6fc1c729 100644 --- a/linux/rancher/templates/mssqlconfig.yaml +++ b/linux/rancher/templates/mssqlconfig.yaml @@ -17,4 +17,3 @@ data: [language] lcid = 1033 - \ No newline at end of file