Fábio Kaiser Rauber
3 years ago
13 changed files with 357 additions and 0 deletions
@ -0,0 +1,22 @@ |
|||
# Patterns to ignore when building packages. |
|||
# This supports shell glob matching, relative path matching, and |
|||
# negation (prefixed with !). Only one pattern per line. |
|||
.DS_Store |
|||
# Common VCS dirs |
|||
.git/ |
|||
.gitignore |
|||
.bzr/ |
|||
.bzrignore |
|||
.hg/ |
|||
.hgignore |
|||
.svn/ |
|||
# Common backup files |
|||
*.swp |
|||
*.bak |
|||
*.tmp |
|||
*~ |
|||
# Various IDEs |
|||
.project |
|||
.idea/ |
|||
*.tmproj |
|||
.vscode/ |
@ -0,0 +1,6 @@ |
|||
apiVersion: v1 |
|||
appVersion: "1.12.2" |
|||
description: OSTicket Open Source Ticket System |
|||
name: osticket |
|||
icon: https://osticket.com/wp-content/uploads/2017/03/osticket-supsys.png |
|||
version: 0.2.0 |
@ -0,0 +1,24 @@ |
|||
# OSTicket support ticket system Helm chart |
|||
|
|||
This is a Helm chart to install OSTicket with MySQL as database and memcached as session storage. |
|||
Requirements: |
|||
|
|||
- Default persistent storage class (StorageClass) |
|||
- Ingress Controller (ex: nginx) |
|||
|
|||
## Parameters and default values |
|||
|
|||
| Parametro | Description | Default | |
|||
|---------------------------|--------------------------------------------|--------------------------| |
|||
| image.repository | Repository of docker image | `interlegis/osticket` | |
|||
| image.tag | Docker image version | `1.12.2` | |
|||
| image.pullPolicy | Docker image Pull Policy | `IfNotPresent` | |
|||
| replicaCount | Number of OSTicket replicas | `1` | |
|||
| persistence.enabled | Enable persistent volumes | `true` | |
|||
| persistence.storageClass | Persistent volume storage class | `` | |
|||
| 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` | |
Binary file not shown.
Binary file not shown.
@ -0,0 +1,9 @@ |
|||
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" |
@ -0,0 +1,9 @@ |
|||
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 |
@ -0,0 +1,45 @@ |
|||
{{/* vim: set filetype=mustache: */}} |
|||
{{/* |
|||
Expand the name of the chart. |
|||
*/}} |
|||
{{- define "osticket.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 "osticket.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 "osticket.chart" -}} |
|||
{{- printf "%s-%s" .Chart.Name .Chart.Version | replace "+" "_" | trunc 63 | trimSuffix "-" -}} |
|||
{{- end -}} |
|||
|
|||
{{/* |
|||
Common labels |
|||
*/}} |
|||
{{- define "osticket.labels" -}} |
|||
app.kubernetes.io/name: {{ include "osticket.name" . }} |
|||
helm.sh/chart: {{ include "osticket.chart" . }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
{{- if .Chart.AppVersion }} |
|||
app.kubernetes.io/version: {{ .Chart.AppVersion | quote }} |
|||
{{- end }} |
|||
app.kubernetes.io/managed-by: {{ .Release.Service }} |
|||
{{- end -}} |
@ -0,0 +1,97 @@ |
|||
apiVersion: apps/v1 |
|||
kind: Deployment |
|||
metadata: |
|||
name: {{ include "osticket.fullname" . }} |
|||
labels: |
|||
{{ include "osticket.labels" . | indent 4 }} |
|||
spec: |
|||
replicas: {{ .Values.replicaCount }} |
|||
selector: |
|||
matchLabels: |
|||
app.kubernetes.io/name: {{ include "osticket.name" . }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
template: |
|||
metadata: |
|||
labels: |
|||
app.kubernetes.io/name: {{ include "osticket.name" . }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
|||
spec: |
|||
{{- with .Values.imagePullSecrets }} |
|||
imagePullSecrets: |
|||
{{- toYaml . | nindent 8 }} |
|||
{{- end }} |
|||
initContainers: |
|||
- name: {{ .Chart.Name }}-install |
|||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
|||
imagePullPolicy: {{ .Values.image.pullPolicy }} |
|||
env: |
|||
- name: INSTALL_SECRET |
|||
value: "{{ .Values.installSecret }}" |
|||
- name: MYSQL_HOST |
|||
value: "{{ include "osticket.name" . }}-mysql" |
|||
- name: MYSQL_PASSWORD |
|||
value: "{{ .Values.mysql.mysqlPassword }}" |
|||
- name: USE_MEMCACHE |
|||
value: "true" |
|||
- name: MEMCACHE_NAME |
|||
value: "{{ include "osticket.name" . }}-memcached" |
|||
command: |
|||
- "php" |
|||
- "/data/bin/install.php" |
|||
containers: |
|||
- name: {{ .Chart.Name }} |
|||
image: "{{ .Values.image.repository }}:{{ .Values.image.tag }}" |
|||
imagePullPolicy: {{ .Values.image.pullPolicy }} |
|||
ports: |
|||
- name: http |
|||
containerPort: 80 |
|||
protocol: TCP |
|||
env: |
|||
- name: INSTALL_SECRET |
|||
value: "{{ .Values.installSecret }}" |
|||
- name: MYSQL_HOST |
|||
value: "{{ include "osticket.name" . }}-mysql" |
|||
- name: MYSQL_PASSWORD |
|||
value: "{{ .Values.mysql.mysqlPassword }}" |
|||
- name: USE_MEMCACHE |
|||
value: "true" |
|||
- name: MEMCACHE_NAME |
|||
value: "{{ include "osticket.name" . }}-memcached" |
|||
livenessProbe: |
|||
failureThreshold: 3 |
|||
httpGet: |
|||
path: / |
|||
port: http |
|||
initialDelaySeconds: 30 |
|||
periodSeconds: 10 |
|||
successThreshold: 1 |
|||
timeoutSeconds: 1 |
|||
httpGet: |
|||
path: / |
|||
port: http |
|||
readinessProbe: |
|||
failureThreshold: 3 |
|||
httpGet: |
|||
path: / |
|||
port: http |
|||
initialDelaySeconds: 30 |
|||
periodSeconds: 10 |
|||
successThreshold: 2 |
|||
timeoutSeconds: 1 |
|||
httpGet: |
|||
path: / |
|||
port: http |
|||
resources: |
|||
{{- toYaml .Values.resources | nindent 12 }} |
|||
{{- with .Values.nodeSelector }} |
|||
nodeSelector: |
|||
{{- toYaml . | nindent 8 }} |
|||
{{- end }} |
|||
{{- with .Values.affinity }} |
|||
affinity: |
|||
{{- toYaml . | nindent 8 }} |
|||
{{- end }} |
|||
{{- with .Values.tolerations }} |
|||
tolerations: |
|||
{{- toYaml . | nindent 8 }} |
|||
{{- end }} |
@ -0,0 +1,35 @@ |
|||
{{- if .Values.ingress.enabled -}} |
|||
{{- $fullName := include "osticket.fullname" . -}} |
|||
{{- $ingressPath := .Values.ingress.path -}} |
|||
apiVersion: extensions/v1beta1 |
|||
kind: Ingress |
|||
metadata: |
|||
name: {{ $fullName }} |
|||
labels: |
|||
{{ include "osticket.labels" . | indent 4 }} |
|||
{{- with .Values.ingress.annotations }} |
|||
annotations: |
|||
{{ toYaml . | indent 4 }} |
|||
{{- end }} |
|||
spec: |
|||
{{- if .Values.ingress.tls }} |
|||
tls: |
|||
{{- range .Values.ingress.tls }} |
|||
- hosts: |
|||
{{- range .hosts }} |
|||
- {{ . }} |
|||
{{- end }} |
|||
secretName: {{ .secretName }} |
|||
{{- end }} |
|||
{{- end }} |
|||
rules: |
|||
{{- range .Values.ingress.hosts }} |
|||
- host: {{ . }} |
|||
http: |
|||
paths: |
|||
- path: {{ $ingressPath }} |
|||
backend: |
|||
serviceName: {{ $fullName }} |
|||
servicePort: http |
|||
{{- end }} |
|||
{{- end }} |
@ -0,0 +1,16 @@ |
|||
apiVersion: v1 |
|||
kind: Service |
|||
metadata: |
|||
name: {{ include "osticket.fullname" . }} |
|||
labels: |
|||
{{ include "osticket.labels" . | indent 4 }} |
|||
spec: |
|||
type: {{ .Values.service.type }} |
|||
ports: |
|||
- port: {{ .Values.service.port }} |
|||
targetPort: http |
|||
protocol: TCP |
|||
name: http |
|||
selector: |
|||
app.kubernetes.io/name: {{ include "osticket.name" . }} |
|||
app.kubernetes.io/instance: {{ .Release.Name }} |
@ -0,0 +1,15 @@ |
|||
apiVersion: v1 |
|||
kind: Pod |
|||
metadata: |
|||
name: "{{ include "osticket.fullname" . }}-test-connection" |
|||
labels: |
|||
{{ include "osticket.labels" . | indent 4 }} |
|||
annotations: |
|||
"helm.sh/hook": test-success |
|||
spec: |
|||
containers: |
|||
- name: wget |
|||
image: busybox |
|||
command: ['wget'] |
|||
args: ['{{ include "osticket.fullname" . }}:{{ .Values.service.port }}'] |
|||
restartPolicy: Never |
@ -0,0 +1,79 @@ |
|||
# Default values for osticket. |
|||
# This is a YAML-formatted file. |
|||
# Declare variables to be passed into your templates. |
|||
|
|||
replicaCount: 1 |
|||
|
|||
image: |
|||
repository: interlegis/osticket |
|||
tag: 1.12.2 |
|||
pullPolicy: IfNotPresent |
|||
|
|||
imagePullSecrets: [] |
|||
nameOverride: "" |
|||
fullnameOverride: "" |
|||
|
|||
installSecret: "" |
|||
|
|||
persistence: |
|||
enabled: true |
|||
#storageClass: "" |
|||
accessMode: ReadWriteOnce |
|||
size: 10Gi |
|||
|
|||
service: |
|||
type: ClusterIP |
|||
port: 80 |
|||
|
|||
ingress: |
|||
enabled: true |
|||
annotations: {} |
|||
# kubernetes.io/ingress.class: nginx |
|||
# kubernetes.io/tls-acme: "true" |
|||
hosts: |
|||
- host: chart-example.local |
|||
paths: [] |
|||
|
|||
tls: [] |
|||
# - secretName: chart-example-tls |
|||
# hosts: |
|||
# - chart-example.local |
|||
|
|||
resources: |
|||
# We usually recommend not to specify default resources and to leave this as a conscious |
|||
# choice for the user. This also increases chances charts run on environments with little |
|||
# resources, such as Minikube. If you do want to specify resources, uncomment the following |
|||
# lines, adjust them as necessary, and remove the curly braces after 'resources:'. |
|||
# limits: |
|||
# cpu: 100m |
|||
# memory: 128Mi |
|||
requests: |
|||
cpu: 100m |
|||
memory: 128Mi |
|||
|
|||
mysql: |
|||
internal: true |
|||
image: mysql |
|||
imageTag: 5.7.14 |
|||
mysqlDatabase: osticket |
|||
mysqlUser: osticket |
|||
mysqlPassword: mysecretpw |
|||
persistence: |
|||
enabled: true |
|||
resources: |
|||
requests: |
|||
memory: 700Mi |
|||
cpu: 100m |
|||
|
|||
memcached: |
|||
internal: true |
|||
image: memcached:1.5.12-alpine |
|||
replicaCount: 1 |
|||
pdbMinAvailable: 1 |
|||
|
|||
|
|||
nodeSelector: {} |
|||
|
|||
tolerations: [] |
|||
|
|||
affinity: {} |
Loading…
Reference in new issue