forked from rstudio/helm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path_templates.gotmpl
163 lines (123 loc) · 5.07 KB
/
_templates.gotmpl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
{{- define "rstudio.blurb" }}
{{- if eq .Name "rstudio-connect" -}}
Business Users and Collaborators use R and Python data products on [Posit Connect](https://posit.co/products/enterprise/connect/)
that are published by Data Scientists.
{{- else if eq .Name "rstudio-pm" -}}
IT Administrators use [Posit Package Manager](https://posit.co/products/enterprise/package-manager/) to control and manage
R and Python packages that Data Scientists need to create and share data products.
{{- else if eq .Name "rstudio-workbench" -}}
Data Scientists use [Posit Workbench](https://posit.co/products/enterprise/workbench/) to analyze data and create data
products using R and Python.
{{- else if eq .Name "posit-chronicle" -}}
Chronicle helps data science managers and other stakeholders understand their
organization's use of other Posit products, primarily Posit Connect and
Workbench.
{{- end -}}
{{- end }}
{{- define "rstudio.description" }}
{{- print "#### _" }}{{- template "chart.description" . }}_
{{- print "" | nindent 0 }}
{{- print "" | nindent 0 }}
{{- template "rstudio.blurb" . }}
{{- end }}
{{- define "rstudio.header" }}
{{- if eq .Name "rstudio-connect" -}}
# Posit Connect
{{- else if eq .Name "rstudio-pm" -}}
# Posit Package Manager
{{- else if eq .Name "rstudio-workbench" -}}
# Posit Workbench
{{- else if eq .Name "posit-chronicle" -}}
# Posit Chronicle
{{- else -}}
{{ template "chart.header" . }}
{{- end }}
{{ print "" | nindent 0 }}
{{- end }}
{{- define "rstudio.disclaimer" }}
## For production
To ensure a stable production deployment:
* "Pin" the version of the Helm chart that you are using. You can do this using the:
* `helm dependency` command *and* the associated "Chart.lock" files *or*
* the `--version` flag.
::: {.callout-important}
This protects you from breaking changes.
:::
* Before upgrading check for breaking changes using `helm-diff` plugin and `helm diff upgrade`.
* Read [`NEWS.md`](./NEWS.md) for updates on breaking changes and the documentation below on how to use the chart.
{{- end }}
{{- define "rstudio.best-practices" }}
## Best practices
Helm charts are very useful tools for deploying resources into Kubernetes, however, they do require
some familiarity with kubernetes and `helm` itself. Please ensure you have adequate training and
IT support before deploying these charts into production environments. Reach out to your account representative
if you need help deciding whether Helm is a good choice for your deployment.
To ensure reproducibility in your environment and insulate yourself from future changes, please:
* "Pin" the version of the Helm chart that you are using. You can do
this using the:
* `helm dependency` command and the associated "Chart.lock" files _or_
* the `--version` flag.
:::{.callout-important}
This protects you from breaking changes**
:::
* Before upgrading check for breaking changes using `helm-diff` plugin and `helm diff upgrade`.
* Read [`NEWS.md`](./NEWS.md) for updates on breaking changes and the documentation below on how to use the chart.
{{- end }}
{{- define "rstudio.install" }}
{{- $isDev := (regexMatch "[0-9]+\\.[0-9]+\\.[0-9]+-[a-zA-Z\\.0-9]+" .Version) }}
## Installing the chart
To install the chart with the release name `my-release` at version {{ template "chart.version" . }}:
```{.bash}
helm repo add rstudio https://helm.rstudio.com
{{- if not $isDev }}
helm upgrade --install my-release rstudio/{{ template "chart.name" . }} --version={{ template "chart.version" . }}
{{- else }}
# to install latest release (NOTE: `--version` flag still recommended!)
helm upgrade --install my-release rstudio/{{ template "chart.name" . }}
# WARNING: to install devel version / release candidate / etc.
helm upgrade --install --devel my-release rstudio/{{ template "chart.name" . }} --version={{ template "chart.version" . }}
{{- end }}
```
To explore other chart versions, look at:
```{.bash}
helm search repo {{ if $isDev }}--devel {{ end }}rstudio/{{ template "chart.name" . }} -l
```
{{- end }}
{{- define "rstudio.licensing" }}
## Licensing
This chart supports activating the product using a *license file*.
We recommend storing a license file as a `Secret` and setting the `license.file.secret` and `license.file.secretKey` values accordingly.
First, create the secret declaratively with YAML or imperatively using the following command:
```{.bash}
kubectl create secret generic {{ .Name }}-license --from-file=licenses/{{ .Name }}.lic
```
Second, specify the following values:
```yaml
license:
file:
secret: {{ .Name }}-license
secretKey: {{ .Name }}.lic
```
Alternatively, license files can be set during `helm install` with the following argument:
```{.bash}
--set-file license.file.contents=licenses/{{ .Name }}.lic
```
{{- end }}
{{ define "rstudio.examples1" -}}
{{ . }}
{{ kindOf . }}
{{ typeOf . }}
{{ typeOf .Values }}
{{ .ChartDirectory }}
{{ toPrettyJson . }}
# Examples
{{- end }}
{{ define "rstudio.examples" -}}
{{ . }}
{{ kindOf . }}
{{ typeOf . }}
{{ typeOf .Values }}
{{ .ChartDirectory }}
{{ toPrettyJson . }}
# Examples
{{- end }}