diff --git a/charts/osticket/Chart.lock b/charts/osticket/Chart.lock new file mode 100644 index 0000000..54435c9 --- /dev/null +++ b/charts/osticket/Chart.lock @@ -0,0 +1,9 @@ +dependencies: +- name: mariadb + repository: https://charts.bitnami.com/bitnami + version: 10.4.4 +- name: memcached + repository: https://charts.bitnami.com/bitnami + version: 6.0.10 +digest: sha256:82bd28a75702fa0313d8aedd8686527365365c914f2a5776e722da436e45135c +generated: "2022-04-01T11:42:33.634085-03:00" diff --git a/charts/osticket/Chart.yaml b/charts/osticket/Chart.yaml index f37a112..6b1ec6d 100644 --- a/charts/osticket/Chart.yaml +++ b/charts/osticket/Chart.yaml @@ -1,6 +1,16 @@ -apiVersion: v1 -appVersion: "1.12.2" +apiVersion: v2 +appVersion: "1.14.1" description: OSTicket Open Source Ticket System name: osticket -icon: https://osticket.com/wp-content/uploads/2017/03/osticket-supsys.png -version: 0.1.7 +icon: https://osticket.com/wp-content/uploads/2021/03/osticket-supsys-new-1-e1616621912452.png +version: 0.2.0 + +dependencies: +- name: mariadb + version: 10.4.4 + repository: https://charts.bitnami.com/bitnami + condition: mariadb.internal +- name: memcached + version: 6.0.10 + repository: https://charts.bitnami.com/bitnami + condition: memcached.internal \ No newline at end of file diff --git a/charts/osticket/README.md b/charts/osticket/README.md index 20090a1..2748724 100644 --- a/charts/osticket/README.md +++ b/charts/osticket/README.md @@ -11,7 +11,7 @@ Requirements: | Parametro | Description | Default | |---------------------------|--------------------------------------------|--------------------------| | image.repository | Repository of docker image | `interlegis/osticket` | -| image.tag | Docker image version | `1.12.2` | +| image.tag | Docker image version | `1.14.1` | | image.pullPolicy | Docker image Pull Policy | `IfNotPresent` | | replicaCount | Number of OSTicket replicas | `1` | | persistence.enabled | Enable persistent volumes | `true` | @@ -19,6 +19,6 @@ Requirements: | persistence.accessMode | Persistent volume acces mode | `ReadWriteOnce` | | persistence.size | Persistent volume size | `10Gi ` | | installSecret | OSTicket install secret | `` | -| mysql.mysqlDatabase | OSTicket database name | `osticket` | -| mysql.mysqlUser | OSTicket database user name | `osticket` | -| mysql.mysqlPassword | OSTicket database user password | `mysecretpw` | +| mariadb.auth.database | OSTicket database name | `osticket` | +| mariadb.auth.username | OSTicket database user name | `osticket` | +| mariadb.auth.password | OSTicket database user password | `mysecretpw` | diff --git a/charts/osticket/charts/mariadb-10.4.4.tgz b/charts/osticket/charts/mariadb-10.4.4.tgz new file mode 100644 index 0000000..8a7c5f4 Binary files /dev/null and b/charts/osticket/charts/mariadb-10.4.4.tgz differ diff --git a/charts/osticket/charts/memcached-2.9.0.tgz b/charts/osticket/charts/memcached-2.9.0.tgz deleted file mode 100644 index fd73721..0000000 Binary files a/charts/osticket/charts/memcached-2.9.0.tgz and /dev/null differ diff --git a/charts/osticket/charts/memcached-6.0.10.tgz b/charts/osticket/charts/memcached-6.0.10.tgz new file mode 100644 index 0000000..5e5e11a Binary files /dev/null and b/charts/osticket/charts/memcached-6.0.10.tgz differ diff --git a/charts/osticket/charts/mysql-1.3.1.tgz b/charts/osticket/charts/mysql-1.3.1.tgz deleted file mode 100644 index fa16b6e..0000000 Binary files a/charts/osticket/charts/mysql-1.3.1.tgz and /dev/null differ diff --git a/charts/osticket/requirements.lock b/charts/osticket/requirements.lock deleted file mode 100644 index 36ed6c4..0000000 --- a/charts/osticket/requirements.lock +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: mysql - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 1.3.1 -- name: memcached - repository: https://kubernetes-charts.storage.googleapis.com/ - version: 2.9.0 -digest: sha256:e41ae60976c0217918d8840b88a426a4cfb05bebc8748d6e8cdd0ff247d9028d -generated: "2019-08-26T12:10:02.952415-03:00" diff --git a/charts/osticket/requirements.yaml b/charts/osticket/requirements.yaml deleted file mode 100644 index 5672789..0000000 --- a/charts/osticket/requirements.yaml +++ /dev/null @@ -1,9 +0,0 @@ -dependencies: -- name: mysql - version: 1.3.1 - repository: https://kubernetes-charts.storage.googleapis.com/ - condition: mysql.internal -- name: memcached - version: 2.9.0 - repository: https://kubernetes-charts.storage.googleapis.com/ - condition: memcached.internal diff --git a/charts/osticket/templates/deployment.yaml b/charts/osticket/templates/deployment.yaml index d4ff3ce..6ad39dd 100644 --- a/charts/osticket/templates/deployment.yaml +++ b/charts/osticket/templates/deployment.yaml @@ -28,9 +28,9 @@ spec: - name: INSTALL_SECRET value: "{{ .Values.installSecret }}" - name: MYSQL_HOST - value: "{{ include "osticket.name" . }}-mysql" + value: "{{ include "osticket.name" . }}-mariadb" - name: MYSQL_PASSWORD - value: "{{ .Values.mysql.mysqlPassword }}" + value: "{{ .Values.mariadb.auth.password }}" - name: USE_MEMCACHE value: "true" - name: MEMCACHE_NAME @@ -50,9 +50,9 @@ spec: - name: INSTALL_SECRET value: "{{ .Values.installSecret }}" - name: MYSQL_HOST - value: "{{ include "osticket.name" . }}-mysql" + value: "{{ include "osticket.name" . }}-mariadb" - name: MYSQL_PASSWORD - value: "{{ .Values.mysql.mysqlPassword }}" + value: "{{ .Values.mariadb.auth.password }}" - name: USE_MEMCACHE value: "true" - name: MEMCACHE_NAME diff --git a/charts/osticket/templates/velero-schedule-weekdays.yaml b/charts/osticket/templates/velero-schedule-weekdays.yaml new file mode 100644 index 0000000..84bc547 --- /dev/null +++ b/charts/osticket/templates/velero-schedule-weekdays.yaml @@ -0,0 +1,39 @@ +{{- if .Values.velero.backup.enabled }} +apiVersion: velero.io/v1 +kind: Schedule +metadata: + name: {{ include "osticket.fullname" . }}-weekdays + namespace: {{ .Values.velero.namespace }} +spec: + # generate a random backup time between 1 and 5 AM on weekdays + schedule: {{ mod (randNumeric 2) 60 }} {{ mod (randNumeric 1) 6 }} * * 1-5 + template: + includedNamespaces: + - {{ .Release.Namespace }} + {{- with .Values.velero.backup.excludedResources }} + excludedResources: + {{- toYaml . | nindent 8 }} + {{- end }} + snapshotVolumes: {{ .Values.velero.backup.snapshotVolumes }} + # every weekday backup is good for the next week (7 days) + ttl: 168h0m0s + defaultVolumesToRestic: {{ .Values.velero.backup.defaultVolumesToRestic }} + hooks: + resources: + - name: mysqldump + includedResources: + - pods + labelSelector: + matchLabels: + app.kubernetes.io/instance: {{ .Release.Name }} + app.kubernetes.io/name: mariadb + pre: + - exec: + command: + - "/bin/bash" + - "-c" + - "/opt/bitnami/mariadb/bin/mysqldump osticket -u osticket -p$MARIADB_PASSWORD > /bitnami/mariadb/osticket.dump" + timeout: 360s + onError: Continue + useOwnerReferencesInBackup: false +{{- end }} \ No newline at end of file diff --git a/charts/osticket/values.yaml b/charts/osticket/values.yaml index dfe89c5..d78d262 100644 --- a/charts/osticket/values.yaml +++ b/charts/osticket/values.yaml @@ -6,7 +6,7 @@ replicaCount: 1 image: repository: interlegis/osticket - tag: 1.12.2 + tag: 1.14.1 pullPolicy: IfNotPresent imagePullSecrets: [] @@ -21,6 +21,19 @@ persistence: accessMode: ReadWriteOnce size: 10Gi +velero: + namespace: velero + backup: + enabled: true + snapshotVolumes: false + defaultVolumesToRestic: true + # cert-manager objects are usually blocked during backup + excludedResources: + - certificates.cert-manager.io + - orders.acme.cert-manager.io + - certificaterequests.cert-manager.io + - challenges.acme.cert-manager.io + service: type: ClusterIP port: 80 @@ -51,26 +64,36 @@ resources: cpu: 100m memory: 128Mi -mysql: +mariadb: internal: true - image: mysql - imageTag: 5.7.14 - mysqlDatabase: osticket - mysqlUser: osticket - mysqlPassword: mysecretpw - persistence: - enabled: true - resources: - requests: - memory: 700Mi - cpu: 100m + image: + tag: 10.5.13-debian-10-r58 + architecture: standalone + auth: + database: osticket + username: osticket + password: mysecretpw + primary: + persistence: + enabled: true + accessModes: + - ReadWriteOnce + size: 20Gi + resources: + requests: + memory: 700Mi + cpu: 100m + service: + type: ClusterIP memcached: internal: true - image: memcached:1.5.12-alpine + image: + tag: 1.6.13-debian-10-r0 + architecture: standalone replicaCount: 1 - pdbMinAvailable: 1 - + pdb: + minAvailable: 1 nodeSelector: {}