Skip to content

Commit 86fddda

Browse files
authored
Merge pull request #756 from jamesongithub/jy/rancher3
Structure values.yaml file. Add csi storage options for aks/eks/gke. Document mssql-conf file. Add extra volume and extra volume mounts.
2 parents d145a4f + 7f26fc3 commit 86fddda

File tree

12 files changed

+294
-108
lines changed

12 files changed

+294
-108
lines changed

linux/rancher/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
jy-sql.yaml

linux/rancher/Chart.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ type: application
1515
# This is the chart version. This version number should be incremented each time you make changes
1616
# to the chart and its templates, including the app version.
1717
# Versions are expected to follow Semantic Versioning (https://semver.org/)
18-
version: 0.0.1
18+
version: 0.0.2
1919

2020
# This is the version number of the application being deployed. This version number should be
2121
# incremented each time you make changes to the application. Versions are not expected to

linux/rancher/questions.yml

Lines changed: 84 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
questions:
2-
- variable: ACCEPT_EULA
3-
label: ACCEPT_EULA
2+
- variable: mssql.conf.eula.accepteula
3+
label: Accept the SQL Server EULA
44
# no current support for html
55
# description: Accepts the SQL Server <a href="http://go.microsoft.com/fwlink/?LinkId=746388">EULA</a> (any value confirms acceptance).
66
description: Accepts the SQL Server EULA (any value confirms acceptance). The EULA is posted @ http://go.microsoft.com/fwlink/?LinkId=746388
77
required: true
8+
default: true
89
group: SQL Server options
910

1011
- variable: USE_PRODUCT_KEY
@@ -14,7 +15,7 @@ questions:
1415
default: false
1516
group: SQL Server options
1617

17-
- variable: MSSQL_PID
18+
- variable: mssql.pid
1819
label: SQL Server Edition aka. MSSQL_PID
1920
description: Select a SQL Server Edition
2021
type: enum
@@ -25,18 +26,19 @@ questions:
2526
- Web
2627
- Standard
2728
- Enterprise
28-
required: true
29+
required: true
30+
default: Developer
2931
show_if: USE_PRODUCT_KEY=false
3032
group: SQL Server options
3133

32-
- variable: MSSQL_PID
34+
- variable: mssql.pid
3335
label: SQL Server License Key
3436
description: Enter a Product Key of the format "#####-#####-#####-#####-#####"
3537
required: true
3638
show_if: USE_PRODUCT_KEY=true
3739
group: SQL Server options
3840

39-
- variable: MSSQL_SA_PASSWORD
41+
- variable: mssql.sa.password
4042
label: MSSQL SA user password
4143
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
4244
type: password
@@ -47,10 +49,16 @@ questions:
4749
required: true
4850
group: SQL Server options
4951

50-
- variable: MSSQL_AGENT_ENABLED
52+
- variable: mssql.conf.lcid
53+
label: SQL Server Locale
54+
description: Sets SQL Server Locale
55+
group: SQL Server options
56+
57+
- variable: mssql.conf.sqlagent.enabled
5158
label: Enable SQL Server Agent
5259
description: Enables the SQL Server Agent
5360
type: boolean
61+
default: true
5462
group: SQL Server options
5563

5664
- variable: defaultContainerImage
@@ -60,44 +68,92 @@ questions:
6068
show_subquestion_if: false
6169
group: Container Image Options
6270
subquestions:
63-
- variable: image.repository
64-
default: mcr.microsoft.com/mssql/server
71+
- variable: statefulset.template.spec.containers.sqlServer.image.repository
6572
description: Image Repository
6673
label: Image Repository
67-
- variable: image.pullPolicy
68-
default: IfNotPresent
74+
- variable: statefulset.template.spec.containers.sqlServer.image.pullPolicy
6975
label: Image Pull Policy
7076
type: enum
7177
options:
7278
- IfNotPresent
7379
- Always
7480
- Never
75-
- variable: image.tag
76-
default: 2019-latest
81+
- variable: statefulset.template.spec.containers.sqlServer.image.tag
7782
label: Image Tag
78-
79-
- variable: replicas
80-
description: Replicas of the SQL Server StatefulSet
81-
label: Replicas
82-
type: int
83-
group: Kubernetes StatefulSet options
8483

85-
- variable: podSecurityContext.fsGroup
84+
- variable: statefulset.template.spec.securityContext.fsGroup
8685
description: |
87-
Specifies a supplementary group id for all processes of the container.
86+
Specifies a supplementary group id for all pod processes
8887
See https://kubernetes.io/docs/tasks/configure-pod-container/security-context for
8988
additional details.
90-
label: podSecurityContext.fsGroup
91-
group: Kubernetes Pod options
89+
label: statefulset.template.spec.securityContext.fsGroup
90+
group: Kubernetes Statefulset options
9291

93-
- variable: containers.ports.containerPort
92+
- variable: statefulset.template.spec.containers.sqlServer.ports.databaseEngineContainerPort
9493
description: >
95-
Specifies containerPort for SQL Server
96-
label: SQL Server Container Port
97-
group: Kubernetes Pod Options
94+
Specifies containerPort for SQL Server Database Engine
95+
label: SQL Server Database Engine Container Port
96+
group: Kubernetes Statefulset Options
9897

99-
- variable: service.port
98+
- variable: service.spec.ports.sqlServerDatabasePort
10099
description: Kubernetes service port for SQL Server
101100
group: Kubernetes Service Options
102101
label: Kubernetes Service Port
103102
type: int
103+
104+
- variable: storageClass.provisioner
105+
description: StorageClass provisioner for SQL Server
106+
group: Kubernetes Storage Options
107+
label: Kubernetes StorageClass Provisioner
108+
type: enum
109+
options:
110+
- disk.csi.azure.com
111+
- ebs.csi.aws.com
112+
- pd.csi.storage.gke.io
113+
114+
- variable: storageClass.type
115+
description: StorageClass Type for Azure Disk CSI. CSI Drivers are default after k8s v1.21
116+
group: Kubernetes Storage Options
117+
label: Kubernetes StorageClass Type
118+
show_if: "storageClass.provisioner=disk.csi.azure.com"
119+
type: enum
120+
default: Standard_LRS
121+
options:
122+
- Standard_LRS
123+
- Premium_LRS
124+
- StandardSSD_LRS
125+
- UltraSSD_LRS
126+
127+
- variable: storageClass.type
128+
description: StorageClass Type for AWS EBS CSI. Install the csi driver on the target cluster first. https://docs.aws.amazon.com/eks/latest/userguide/managing-ebs-csi.html#adding-ebs-csi-eks-add-on
129+
group: Kubernetes Storage Options
130+
label: Kubernetes StorageClass Type
131+
show_if: "storageClass.provisioner=ebs.csi.aws.com"
132+
type: enum
133+
default: standard
134+
options:
135+
- io1
136+
- io2
137+
- gp2
138+
- gp3
139+
- sc1
140+
- st1
141+
- standard
142+
143+
- variable: storageClass.type
144+
description: StorageClass Type for GCE PD CSI. CSI Driver are default after Linux clusters 1.18.10-gke.2100 or 1.19.3-gke.2100
145+
group: Kubernetes Storage Options
146+
label: Kubernetes StorageClass Type
147+
show_if: "storageClass.provisioner=pd.csi.storage.gke.io"
148+
type: enum
149+
default: pd-standard
150+
options:
151+
- pd-standard
152+
- pd-balanced
153+
- pd-ssd
154+
- pd-extreme
155+
156+
- variable: storage.size
157+
description: Size for Storage Volume in Gibibytes (Gi)
158+
group: Kubernetes Storage Options
159+
label: Kubernetes Storage Size
Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
kind: ConfigMap
2+
apiVersion: v1
3+
metadata:
4+
name: mssql
5+
data:
6+
mssql.conf: |
7+
[EULA]
8+
accepteula = {{ .Values.mssql.conf.eula.accepteula }}
9+
accepteulaml = {{ .Values.mssql.conf.eula.accepteulaml }}
10+
11+
[coredump]
12+
captureminiandfull = true
13+
coredumptype = full
14+
15+
[hadr]
16+
hadrenabled = 1
17+
18+
[language]
19+
lcid = {{ .Values.mssql.conf.lcid }}
20+
21+
[sqlagent]
22+
enabled = {{ .Values.mssql.conf.sqlagent.enabled }}
23+
24+
25+
# control.alternatewritethrough Enable optimized write through flush for O_DSYNC requests
26+
# control.hestacksize Host extension stack size in KB
27+
# control.stoponguestprocessfault Stops the process if any guest process reports unhandled exception
28+
# control.writethrough Use O_DSYNC for file flag write through requests
29+
# coredump.captureminiandfull Capture both mini and full core dumps
30+
# coredump.coredumptype Core dump type to capture: mini, miniplus, filtered, full
31+
# distributedtransaction.allowonlysecurerpccalls Configure secure only rpc calls for distributed transactions
32+
# distributedtransaction.fallbacktounsecurerpcifnecessary Configure security only rpc calls for distributed transactions
33+
# distributedtransaction.maxlogsize DTC log file size in MB. Default is 64MB
34+
# distributedtransaction.memorybuffersize Circular buffer size in which traces are stored. This size is in MB and default is 10MB
35+
# distributedtransaction.servertcpport MSDTC rpc server port
36+
# distributedtransaction.trace_cm Traces in the connection manager
37+
# distributedtransaction.trace_contact Traces the contact pool and contacts
38+
# distributedtransaction.trace_gateway Traces Gateway source
39+
# distributedtransaction.trace_log Log tracing
40+
# distributedtransaction.trace_misc Traces that cannot be categorized into the other categories
41+
# distributedtransaction.trace_proxy Traces that are generated in the MSDTC proxy
42+
# distributedtransaction.trace_svc Traces service and .exe file startup
43+
# distributedtransaction.trace_trace The trace infrastructure itself
44+
# distributedtransaction.trace_util Traces utility routines that are called from multiple locations
45+
# distributedtransaction.trace_xa XA Transaction Manager (XATM) tracing source
46+
# distributedtransaction.tracefilepath Folder in which trace files should be stored
47+
# distributedtransaction.turnoffrpcsecurity Enable or disable RPC security for distributed transactions
48+
# errorlog.numerrorlogs Number of error log maintained before cycling the log.
49+
# extensibility.datadirectories Colon separated directory paths available to sp_execute_external_script
50+
# extensibility.outboundnetworkaccess Enable outbound network access for sp_execute_external_script
51+
# filelocation.defaultbackupdir Default directory for backup files
52+
# filelocation.defaultdatadir Default directory for data files
53+
# filelocation.defaultdumpdir Default directory for crash dump files
54+
# filelocation.defaultlogdir Default directory for log files
55+
# filelocation.errorlogfile Error log file location
56+
# filelocation.masterdatafile Master database data file location
57+
# filelocation.masterlogfile Master database log file location
58+
# hadr.hadrenabled Allow SQL Server to use availability groups for high availability and disaster recovery
59+
# language.lcid Locale identifier for SQL Server to use (e.g. 1033 for US - English)
60+
# memory.disablememorypressure SQL Server disable memory pressure
61+
# memory.memory_optimized Enable or disable SQL Server memory optimized features - persistent memory file enlightenment, memory protection
62+
# memory.memorylimitmb SQL Server memory limit (megabytes)
63+
# network.disablesssd Disable querying SSSD for AD account information and default to LDAP calls
64+
# network.enablekdcfromkrb5conf Enable looking up KDC information from krb5.conf
65+
# network.forceencryption Force encryption of incoming client connections
66+
# network.forcesecureldap Force using LDAPS to contact domain controller
67+
# network.ipaddress IP address for incoming connections
68+
# network.kerberoscredupdatefrequency Time in seconds between checks for kerberos credentials that need to be updated
69+
# network.kerberoskeytabfile Kerberos keytab file location
70+
# network.privilegedadaccount Privileged AD user to use for AD authentication
71+
# network.rpcport TCP port for Rpc endpoint mapper
72+
# network.tcpport TCP port for incoming connections
73+
# network.tlscert Path to certificate file for encrypting incoming client connections
74+
# network.tlsciphers TLS ciphers allowed for encrypted incoming client connections
75+
# network.tlskey Path to private key file for encrypting incoming client connections
76+
# network.tlsprotocols TLS protocol versions allowed for encrypted incoming client connections
77+
# sqlagent.databasemailprofile SQL Agent Database Mail profile name
78+
# sqlagent.enabled Enable or disable SQLAgent
79+
# sqlagent.errorlogfile SQL Agent log file path
80+
# sqlagent.errorlogginglevel SQL Agent logging level bitmask - 1=Errors, 2=Warnings, 4=Info
81+
# sqlagent.startupwaitforalldb Set to 1 (default) if SqlAgent should wait for all databases on startup; set to 0 to wait for MSDB only
82+
# telemetry.customerfeedback Telemetry status
83+
# telemetry.userrequestedlocalauditdirectory Directory for telemetry local audit cache
84+
# uncmapping. Maps UNC path to a local path. (e.g. ./mssql-conf set uncmapping //servername/sharename /tmp/folder)

linux/rancher/templates/mssqlconfig.yaml

Lines changed: 0 additions & 19 deletions
This file was deleted.

linux/rancher/templates/sc.yaml

Lines changed: 0 additions & 8 deletions
This file was deleted.

linux/rancher/templates/secret.yml renamed to linux/rancher/templates/secret.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ metadata:
66
{{- include "sql-server-rancher.labels" . | nindent 4 }}
77
type: Opaque
88
data:
9-
mssql_sa_password : {{ .Values.MSSQL_SA_PASSWORD | b64enc | quote }}
9+
mssql_sa_password : {{ .Values.mssql.sa.password | b64enc | quote }}

linux/rancher/templates/service.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ metadata:
77
spec:
88
clusterIP: None
99
ports:
10-
- port: {{ .Values.service.port }}
10+
- port: {{ .Values.service.spec.ports.sqlServerDatabasePort }}
1111
targetPort: http
1212
protocol: TCP
1313
selector:

0 commit comments

Comments
 (0)