Skip to content

Commit eeb3964

Browse files
LiseMachetelenys
authored andcommitted
OPS-2727: add backup by ns
fix some errors disable velero backupby default update README fix typo add checks only backup ns fix name of schedule
1 parent a1bc74f commit eeb3964

4 files changed

Lines changed: 96 additions & 8 deletions

File tree

charts/linkurious-enterprise/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.2.42
18+
version: 0.2.43
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

charts/linkurious-enterprise/README.md

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# linkurious-enterprise
22

3-
![Version: 0.2.36](https://img.shields.io/badge/Version-0.2.36-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.10.18](https://img.shields.io/badge/AppVersion-2.10.18-informational?style=flat-square)
3+
![Version: 0.2.43](https://img.shields.io/badge/Version-0.2.43-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 2.10.18](https://img.shields.io/badge/AppVersion-2.10.18-informational?style=flat-square)
44

55
A Helm chart for Linkurious Enterprise
66

@@ -31,7 +31,7 @@ To install a very basic version of Linkurious enterprise, please set your privat
3131
and then run:
3232

3333
```console
34-
helm upgrade --install my-release linkurious-enterprise-0.2.36.tgz -f chart-value-examples/basic/values.yaml
34+
helm upgrade --install my-release linkurious-enterprise-0.2.43.tgz -f chart-value-examples/basic/values.yaml
3535
```
3636

3737
## Values
@@ -52,17 +52,32 @@ helm upgrade --install my-release linkurious-enterprise-0.2.36.tgz -f chart-valu
5252
| backup.litestream.livenessProbe.failureThreshold | int | `3` | |
5353
| backup.litestream.livenessProbe.initialDelaySeconds | int | `5` | |
5454
| backup.litestream.livenessProbe.periodSeconds | int | `15` | |
55-
| backup.litestream.livenessProbe.timeoutSeconds | int | `5` | |
55+
| backup.litestream.livenessProbe.timeoutSeconds | int | `10` | |
5656
| backup.litestream.readinessProbe.exec.command[0] | string | `"litestream"` | |
5757
| backup.litestream.readinessProbe.exec.command[1] | string | `"snapshots"` | |
5858
| backup.litestream.readinessProbe.exec.command[2] | string | `"/data/server/database.sqlite"` | |
5959
| backup.litestream.readinessProbe.failureThreshold | int | `3` | |
6060
| backup.litestream.readinessProbe.initialDelaySeconds | int | `5` | |
6161
| backup.litestream.readinessProbe.periodSeconds | int | `15` | |
62-
| backup.litestream.readinessProbe.timeoutSeconds | int | `5` | |
63-
| backup.litestream.resources | object | `{}` | |
62+
| backup.litestream.readinessProbe.timeoutSeconds | int | `10` | |
63+
| backup.litestream.resources.limits.cpu | string | `"1500m"` | |
64+
| backup.litestream.resources.limits.memory | string | `"1000Mi"` | |
65+
| backup.litestream.resources.requests.cpu | string | `"100m"` | |
66+
| backup.litestream.resources.requests.memory | string | `"100Mi"` | |
6467
| backup.litestream.secretRef.name | string | `"litestream-lke-secret"` | |
68+
| backup.velero.defaultVolumesToFsBackup | bool | `false` | |
6569
| backup.velero.enabled | bool | `false` | |
70+
| backup.velero.includedResources[0] | string | `"pvc"` | |
71+
| backup.velero.includedResources[1] | string | `"pv"` | |
72+
| backup.velero.instance | string | `"velero-preprod"` | |
73+
| backup.velero.labels."app.kubernetes.io/name" | string | `"linkurious-enterprise"` | |
74+
| backup.velero.labelsSelector."app.kubernetes.io/name" | string | `"linkurious-enterprise"` | |
75+
| backup.velero.name | string | `"velero"` | |
76+
| backup.velero.schedule | string | `"55 3 */2 * *"` | |
77+
| backup.velero.skipImmediately | bool | `false` | |
78+
| backup.velero.snapshotVolume | bool | `true` | |
79+
| backup.velero.ttl | string | `"168h"` | |
80+
| backup.velero.veleroNamespace | string | `"backup"` | |
6681
| config.access.authRequired | string | `"$ENV:LKE_AUTH_REQUIRED"` | |
6782
| config.access.autoRefreshGroupMapping | string | `"$ENV-JSON:LKE_OAUTH2_AUTO_REFRESH_GROUP_MAPPING"` | |
6883
| config.access.oauth2.authorizationURL | string | `"$ENV:LKE_OAUTH2_AUTHORIZATION_URL"` | |
@@ -101,7 +116,7 @@ helm upgrade --install my-release linkurious-enterprise-0.2.36.tgz -f chart-valu
101116
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
102117
| ingress.labels | object | `{}` | Additional ingress labels |
103118
| ingress.tls[0].secretName | string | `"wildcard-default-cert"` | |
104-
| ipWhiteList | object | `{}` | |
119+
| ipAllowList | object | `{}` | |
105120
| livenessProbe.enabled | bool | `true` | Enable Kubernetes liveness probe for server |
106121
| livenessProbe.failureThreshold | int | `3` | |
107122
| livenessProbe.initialDelaySeconds | int | `10` | |
@@ -123,6 +138,7 @@ helm upgrade --install my-release linkurious-enterprise-0.2.36.tgz -f chart-valu
123138
| persistentVolume.annotations | object | `{}` | |
124139
| persistentVolume.enabled | bool | `false` | Enable persistent volume for Linkurious server |
125140
| persistentVolume.size | string | `"5Gi"` | |
141+
| plugins.enabled | bool | `true` | |
126142
| podAnnotations | object | `{}` | |
127143
| podSecurityContext.fsGroup | int | `2000` | |
128144
| podSecurityContext.runAsNonRoot | bool | `true` | |
@@ -139,7 +155,7 @@ helm upgrade --install my-release linkurious-enterprise-0.2.36.tgz -f chart-valu
139155
| resources | object | `{}` | |
140156
| securityContext.allowPrivilegeEscalation | bool | `false` | |
141157
| securityContext.capabilities.drop[0] | string | `"ALL"` | |
142-
| service | object | `{"metricsPort":9400,"port":80,"type":"ClusterIP"}` | Existing secret to use for license licenseFromSecret: '{{ printf "%s-lke-license-secret" .Release.Name }}' |
158+
| service | object | `{"annotations":{},"metricsPort":9400,"port":80,"type":"ClusterIP"}` | Existing secret to use for license licenseFromSecret: '{{ printf "%s-lke-license-secret" .Release.Name }}' |
143159
| serviceAccount.annotations | object | `{}` | Annotations to add to the service account |
144160
| serviceAccount.create | bool | `false` | Specifies whether a service account should be created |
145161
| serviceAccount.name | string | `""` | The name of the service account to use. If not set and create is true, a name is generated using the fullname template |
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
{{- if .Values.backup.velero.enabled }}
2+
{{- if (not (.Capabilities.APIVersions.Has "velero.io/v1")) }}
3+
{{- fail "ERROR: You have to deploy velero.io/v1 first or disable velero backup" }}
4+
{{- end }}
5+
apiVersion: velero.io/v1
6+
kind: Schedule
7+
metadata:
8+
name: {{ printf "velero-schedule-%s" $.Release.Namespace }}
9+
namespace: {{ .Values.backup.velero.veleroNamespace }}
10+
{{- if .Values.backup.velero.annotations }}
11+
annotations:
12+
{{- toYaml .Values.backup.velero.annotations | nindent 4 }}
13+
{{- end }}
14+
labels:
15+
app.kubernetes.io/name: {{ .Values.backup.velero.name }}
16+
app.kubernetes.io/instance: {{ .Values.backup.velero.instance }}
17+
app.kubernetes.io/managed-by: {{ $.Release.Service }}
18+
{{- if .Values.backup.velero.labels }}
19+
{{- toYaml .Values.backup.velero.labels | nindent 4 }}
20+
{{- end }}
21+
22+
spec:
23+
{{- if .Values.backup.velero.paused }}
24+
paused: {{ .Values.backup.velero.paused }}
25+
{{- end }}
26+
{{- if .Values.backup.velero.useOwnerReferencesInBackup }}
27+
useOwnerReferencesInBackup: {{ .Values.backup.velero.useOwnerReferencesInBackup }}
28+
{{- end }}
29+
schedule: {{ .Values.backup.velero.schedule }}
30+
skipImmediately: {{ .Values.backup.velero.skipImmediately }}
31+
template:
32+
defaultVolumesToFsBackup: {{ .Values.backup.velero.defaultVolumesToFsBackup }}
33+
includedNamespaces:
34+
- {{ $.Release.Namespace }}
35+
{{- if .Values.backup.velero.includedResources }}
36+
includedResources:
37+
{{- range .Values.backup.velero.includedResources }}
38+
- {{ . }}
39+
{{- end }}
40+
{{- end }}
41+
{{- if .Values.backup.velero.excludedResources }}
42+
excludedResources:
43+
{{- range .Values.backup.velero.excludedResources }}
44+
- {{ . }}
45+
{{- end }}
46+
{{- end }}
47+
{{- if .Values.backup.velero.labelsSelector }}
48+
labelSelector:
49+
matchLabels:
50+
{{- toYaml .Values.backup.velero.labelsSelector | nindent 8 }}
51+
{{- end }}
52+
snapshotVolumes: {{ .Values.backup.velero.snapshotVolume }}
53+
ttl: {{ .Values.backup.velero.ttl }}
54+
{{- end }}

charts/linkurious-enterprise/values.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,24 @@ backup:
285285
velero:
286286
## -- Enable backup for Linkurious server lke-data volume with velero
287287
enabled: false
288+
name: velero
289+
instance: velero-preprod
290+
veleroNamespace: backup
291+
ttl: "168h"
292+
includedResources:
293+
- pvc
294+
- pv
295+
#excludedResources:
296+
# - secrets
297+
snapshotVolume: true
298+
defaultVolumesToFsBackup: false
299+
labels:
300+
app.kubernetes.io/name: linkurious-enterprise
301+
schedule: "55 3 */2 * *"
302+
skipImmediately: false
303+
labelsSelector:
304+
# backup.velero.io/backup-volumes: lke-data
305+
app.kubernetes.io/name: linkurious-enterprise
288306

289307
hostAliases: []
290308

0 commit comments

Comments
 (0)