diff --git a/charts/hcfmailerplus/Chart.yaml b/charts/hcfmailerplus/Chart.yaml index 2c981f6..c80548d 100644 --- a/charts/hcfmailerplus/Chart.yaml +++ b/charts/hcfmailerplus/Chart.yaml @@ -15,11 +15,11 @@ type: application # This is the chart version. This version number should be incremented each time you make changes # to the chart and its templates, including the app version. # Versions are expected to follow Semantic Versioning (https://semver.org/) -version: 0.1.5 +version: 0.2.0 # This is the version number of the application being deployed. This version number should be # incremented each time you make changes to the application. Versions are not expected to # follow Semantic Versioning. They should reflect the version the application is using. # It is recommended to use it with quotes. -appVersion: "v20230910.1" +appVersion: "v20231216.2" icon: "https://raw.githubusercontent.com/highcanfly-club/hcfmailer-plus/hcf/client/static/hcfmailer%2B.svg" \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/configmap-cloudflared.yaml b/charts/hcfmailerplus/templates/configmap-cloudflared.yaml new file mode 100644 index 0000000..f6a7df0 --- /dev/null +++ b/charts/hcfmailerplus/templates/configmap-cloudflared.yaml @@ -0,0 +1,9 @@ +{{ if .Values.cloudflared.enabled }} +apiVersion: v1 +kind: ConfigMap +metadata: + name: cloudflared +data: + config.yaml: {{ .Values.cloudflared.config | toYaml | indent 2}} + cert.pem: {{ .Values.cloudflared.cert | toYaml | indent 2 }} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/deployment-cloudflared.yaml b/charts/hcfmailerplus/templates/deployment-cloudflared.yaml new file mode 100644 index 0000000..9c3e991 --- /dev/null +++ b/charts/hcfmailerplus/templates/deployment-cloudflared.yaml @@ -0,0 +1,89 @@ +{{ if .Values.cloudflared.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cloudflared +spec: + {{- if not .Values.cloudflared.autoscaling.enabled }} + replicas: {{ .Values.cloudflared.replicaCount }} + {{- end }} + selector: + matchLabels: + app: cloudflared + template: + metadata: + {{- with .Values.cloudflared.podAnnotations }} + annotations: + {{- toYaml . | nindent 8 }} + {{- end }} + labels: + app: cloudflared + spec: + {{- with .Values.cloudflared.imagePullSecrets }} + imagePullSecrets: + {{- toYaml . | nindent 8 }} + {{- end }} + securityContext: + {{- toYaml .Values.cloudflared.podSecurityContext | nindent 8 }} + containers: + - name: {{ printf "%s-%s" .Chart.Name "cloudflared"}} + securityContext: + {{- toYaml .Values.cloudflared.securityContext | nindent 12 }} + image: "{{ .Values.cloudflared.image.repository }}:{{ .Values.cloudflared.image.tag | default .Chart.AppVersion }}" + imagePullPolicy: {{ .Values.cloudflared.image.pullPolicy }} + {{- if .Values.cloudflared.command }} + command: {{- include "common.tplvalues.render" (dict "value" .Values.cloudflared.command "context" $) | nindent 12 }} + {{- else}} + command: + - cloudflared + {{- end }} + {{- if .Values.cloudflared.args }} + args: {{- include "common.tplvalues.render" (dict "value" .Values.cloudflared.args "context" $) | nindent 12 }} + {{- else}} + - tunnel + - --config + - /etc/cloudflared/config/config.yaml + - --origincert=/etc/cloudflared/config/cert.pem + - run + {{- end }} + resources: + {{- toYaml .Values.cloudflared.resources | nindent 12 }} + livenessProbe: + httpGet: + path: /ready + port: 2000 + failureThreshold: 3 + initialDelaySeconds: 10 + periodSeconds: 30 + volumeMounts: + - name: creds + mountPath: /etc/cloudflared/creds + readOnly: true + - name: config + mountPath: /etc/cloudflared/config + readOnly: true + volumes: + - name: creds + secret: + secretName: cloudflared + - name: config + configMap: + name: cloudflared + items: + - key: config.yaml + path: config.yaml + - key: cert.pem + path: cert.pem + {{- with .Values.cloudflared.nodeSelector }} + nodeSelector: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.cloudflared.affinity }} + affinity: + {{- toYaml . | nindent 8 }} + {{- end }} + {{- with .Values.cloudflared.tolerations }} + tolerations: + {{- toYaml . | nindent 8 }} + {{- end }} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/deployments-hcfmailerplus.yaml b/charts/hcfmailerplus/templates/deployments-hcfmailerplus.yaml index 660470c..c7eea06 100644 --- a/charts/hcfmailerplus/templates/deployments-hcfmailerplus.yaml +++ b/charts/hcfmailerplus/templates/deployments-hcfmailerplus.yaml @@ -12,7 +12,7 @@ spec: matchLabels: io.kompose.service: mailtrain strategy: - type: RollingUpdate + type: Recreate template: metadata: labels: @@ -98,13 +98,29 @@ spec: secretKeyRef: name: mysql key: MYSQL_PASSWORD + {{- if .Values.app.RELAY_HOST }} + - name: RELAY_HOST + value: {{.Values.app.RELAY_HOST | quote}} + {{- end }} + {{- if .Values.app.RELAY_HOST_PORT }} + - name: RELAY_HOST_PORT + value: {{.Values.app.RELAY_HOST_PORT | quote}} + {{- end }} + {{- if .Values.app.RELAY_HOST_USER }} + - name: RELAY_HOST_USER + value: {{.Values.app.RELAY_HOST_USER | quote}} + {{- end }} + {{- if .Values.app.RELAY_HOST_PASSWORD }} + - name: RELAY_HOST_PASSWORD + value: {{.Values.app.RELAY_HOST_PASSWORD | quote}} + {{- end }} image: "{{ .Values.image.repository }}:{{ default .Chart.AppVersion .Values.image.tag }}" - {{if .Values.image.debug }} + {{- if .Values.image.debug }} command: - tail - -f - /dev/null - {{end}} + {{- end}} name: mailtrain ports: - containerPort: {{ .Values.service.basePort }} @@ -121,5 +137,5 @@ spec: volumes: - name: mailtrain-files persistentVolumeClaim: - claimName: mailtrain-files + claimName: {{ not .Values.storage.main.existingClaim | ternary .Values.storage.main.claimName .Values.storage.main.existingClaim }} status: {} diff --git a/charts/hcfmailerplus/templates/deployments-mongo.yaml b/charts/hcfmailerplus/templates/deployments-mongo.yaml new file mode 100644 index 0000000..56fcb57 --- /dev/null +++ b/charts/hcfmailerplus/templates/deployments-mongo.yaml @@ -0,0 +1,42 @@ + +{{ $storage := .Values.storage.kvdata.shareKvStorage | ternary .Values.storage.kvdata.claimName .Values.storage.mongo.claimName }} +apiVersion: apps/v1 +kind: Deployment +metadata: + creationTimestamp: null + labels: + io.kompose.service: mongo + name: mongo + namespace: {{ .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: mongo + strategy: + type: Recreate + template: + metadata: + creationTimestamp: null + labels: + io.kompose.network/hcf-default: "true" + io.kompose.service: mongo + spec: + containers: + - image: mongo:latest + name: mongo + ports: + - containerPort: 27019 + resources: + limits: + cpu: 1 + memory: "1Gi" + volumeMounts: + - mountPath: /data + name: {{ $storage }} + restartPolicy: Always + volumes: + - name: {{ $storage }} + persistentVolumeClaim: + claimName: {{ not .Values.storage.mongo.existingClaim | ternary $storage .Values.storage.mongo.existingClaim }} +status: {} diff --git a/charts/hcfmailerplus/templates/deployments-mysql.yaml b/charts/hcfmailerplus/templates/deployments-mysql.yaml new file mode 100644 index 0000000..21e29de --- /dev/null +++ b/charts/hcfmailerplus/templates/deployments-mysql.yaml @@ -0,0 +1,57 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.kompose.service: mysql + name: mysql + namespace: {{ .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: mysql + strategy: + type: Recreate + template: + metadata: + labels: + io.kompose.network/hcf-default: "true" + io.kompose.service: mysql + spec: + containers: + - env: + - name: MYSQL_ROOT_PASSWORD + valueFrom: + secretKeyRef: + name: mysql + key: MYSQL_ROOT_PASSWORD + - name: MYSQL_DATABASE + value: mailtrain + - name: MYSQL_USER + value: mailtrain + - name: MYSQL_PASSWORD + valueFrom: + secretKeyRef: + name: mysql + key: MYSQL_PASSWORD + image: mysql:latest + name: mysql + ports: + - containerPort: {{ .Values.storage.mysql.port }} + # resources: + # limits: + # cpu: "1" + # memory: "2Gi" + volumeMounts: + - mountPath: /var/lib/mysql + name: mailtrain-mysql + securityContext: + runAsUser: 0 + runAsGroup: 0 + restartPolicy: Always + volumes: + - name: mailtrain-mysql + persistentVolumeClaim: + claimName: {{ not .Values.storage.mysql.existingClaim | ternary .Values.storage.mysql.claimName .Values.storage.mysql.existingClaim }} +status: {} diff --git a/charts/hcfmailerplus/templates/deployments-phpmyadmin.yaml b/charts/hcfmailerplus/templates/deployments-phpmyadmin.yaml new file mode 100644 index 0000000..2f38770 --- /dev/null +++ b/charts/hcfmailerplus/templates/deployments-phpmyadmin.yaml @@ -0,0 +1,37 @@ +--- +{{ if .Values.phpmyadmin.enabled }} +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.kompose.service: phpmyadmin + name: phpmyadmin + namespace: {{ .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: phpmyadmin + strategy: + type: RollingUpdate + template: + metadata: + labels: + io.kompose.network/hcf-default: "true" + io.kompose.service: phpmyadmin + spec: + containers: + - env: + - name: PMA_HOST + value: {{ .Values.app.MYSQL_HOST | quote }} + image: phpmyadmin:latest + name: phpmyadmin + ports: + - containerPort: {{ .Values.phpmyadmin.port }} + # resources: + # limits: + # cpu: "0.25" + # memory: "512M" + restartPolicy: Always +status: {} +{{ end }} diff --git a/charts/hcfmailerplus/templates/deployments-redis.yaml b/charts/hcfmailerplus/templates/deployments-redis.yaml new file mode 100644 index 0000000..b60971b --- /dev/null +++ b/charts/hcfmailerplus/templates/deployments-redis.yaml @@ -0,0 +1,39 @@ +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + io.kompose.service: redis + name: redis + namespace: {{ .Release.Namespace }} +spec: + replicas: 1 + selector: + matchLabels: + io.kompose.service: redis + strategy: + type: Recreate + template: + metadata: + labels: + io.kompose.network/hcf-default: "true" + io.kompose.service: redis + spec: + containers: + - image: redis:latest + name: redis + ports: + - containerPort: {{ .Values.storage.kvdata.redisPort }} + # resources: + # limits: + # cpu: 1 + # memory: "1Gi" + volumeMounts: + - mountPath: /data + name: mailtrain-kvdata + restartPolicy: Always + volumes: + - name: mailtrain-kvdata + persistentVolumeClaim: + claimName: {{ not .Values.storage.kvdata.existingClaim | ternary .Values.storage.kvdata.claimName .Values.storage.kvdata.existingClaim }} +status: {} diff --git a/charts/hcfmailerplus/templates/ingress-hcfmailerplus-public.yaml b/charts/hcfmailerplus/templates/ingress-hcfmailerplus-public.yaml new file mode 100644 index 0000000..8e7d464 --- /dev/null +++ b/charts/hcfmailerplus/templates/ingress-hcfmailerplus-public.yaml @@ -0,0 +1,33 @@ +{{ if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: mailtrain-public + namespace: {{ .Release.Namespace }} + annotations: + {{ if .Values.ingress.clusterIssuer -}} + cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} + {{ end -}} + {{ if .Values.ingress.annotations -}} + {{ .Values.ingress.annotations | toYaml | nindent 4}} + {{ end -}} + external-dns.alpha.kubernetes.io/hostname: {{ .Values.app.HOST_BASE_PUBLIC }} +spec: + ingressClassName: {{ .Values.ingress.className }} + rules: + - host: {{ .Values.app.HOST_BASE_PUBLIC }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: mailtrain + port: + number: {{ .Values.service.publicPort }} + {{ if .Values.ingress.clusterIssuer -}} + tls: + - hosts: [{{ .Values.app.HOST_BASE_PUBLIC }}] + secretName: mailtrain-public-tls-cert + {{ end }} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/ingress-hcfmailerplus-sandbox.yaml b/charts/hcfmailerplus/templates/ingress-hcfmailerplus-sandbox.yaml new file mode 100644 index 0000000..485f0b0 --- /dev/null +++ b/charts/hcfmailerplus/templates/ingress-hcfmailerplus-sandbox.yaml @@ -0,0 +1,33 @@ +{{ if .Values.ingress.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: mailtrain-sandbox + namespace: {{ .Release.Namespace }} + annotations: + {{ if .Values.ingress.clusterIssuer -}} + cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} + {{ end -}} + {{ if .Values.ingress.annotations -}} + {{ .Values.ingress.annotations | toYaml | nindent 4}} + {{ end -}} + external-dns.alpha.kubernetes.io/hostname: {{ .Values.app.HOST_BASE_SANDBOX }} +spec: + ingressClassName: {{ .Values.ingress.className }} + rules: + - host: {{ .Values.app.HOST_BASE_SANDBOX }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: mailtrain + port: + number: {{ .Values.service.sandboxPort }} + {{ if .Values.ingress.clusterIssuer -}} + tls: + - hosts: [{{ .Values.app.HOST_BASE_SANDBOX }}] + secretName: mailtrain-sandbox-tls-cert + {{ end }} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/ingress-hcfmailerplus-trusted.yaml b/charts/hcfmailerplus/templates/ingress-hcfmailerplus-trusted.yaml new file mode 100644 index 0000000..f6e8d69 --- /dev/null +++ b/charts/hcfmailerplus/templates/ingress-hcfmailerplus-trusted.yaml @@ -0,0 +1,35 @@ +{{ if .Values.ingress.enabled }} +--- +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: mailtrain-trusted + namespace: {{ .Release.Namespace }} + annotations: + {{ if .Values.ingress.clusterIssuer -}} + cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} + {{ end -}} + {{ if .Values.ingress.annotations -}} + {{ .Values.ingress.annotations | toYaml | nindent 4}} + {{ end -}} + # external-dns.alpha.kubernetes.io/hostname: {{ .Values.app.HOST_BASE_TRUSTED }} +spec: + ingressClassName: {{ .Values.ingress.className }} + rules: + - host: {{ .Values.app.HOST_BASE_TRUSTED }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: mailtrain + port: + number: {{ .Values.service.basePort }} + {{ if .Values.ingress.clusterIssuer -}} + tls: + - hosts: [{{ .Values.app.HOST_BASE_TRUSTED }}] + secretName: mailtrain-trusted-tls-cert + {{ end }} + +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/ingress-phpmyadmin.yaml b/charts/hcfmailerplus/templates/ingress-phpmyadmin.yaml new file mode 100644 index 0000000..efae5cf --- /dev/null +++ b/charts/hcfmailerplus/templates/ingress-phpmyadmin.yaml @@ -0,0 +1,36 @@ +--- +{{ if .Values.ingress.enabled }} +{{- if .Values.phpmyadmin.enabled }} +apiVersion: networking.k8s.io/v1 +kind: Ingress +metadata: + name: mailtrain-phpmyadmin + namespace: {{ .Release.Namespace }} + annotations: + {{ if .Values.ingress.clusterIssuer -}} + cert-manager.io/cluster-issuer: {{ .Values.ingress.clusterIssuer }} + {{ end -}} + {{ if .Values.ingress.annotations -}} + {{ .Values.ingress.annotations | toYaml | nindent 4}} + {{ end -}} + external-dns.alpha.kubernetes.io/hostname: {{ .Values.app.HOST_BASE_PHPMYADMIN }} +spec: + ingressClassName: traefik + rules: + - host: {{ .Values.app.HOST_BASE_PHPMYADMIN }} + http: + paths: + - path: / + pathType: Prefix + backend: + service: + name: phpmyadmin + port: + number: {{ .Values.phpmyadmin.port }} + {{ if .Values.ingress.clusterIssuer -}} + tls: + - hosts: [{{ .Values.app.HOST_BASE_PHPMYADMIN }}] + secretName: mailtrain-phpmyadmin-tls-cert + {{ end }} +{{ end }} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/pvc-files.yaml b/charts/hcfmailerplus/templates/pvc-files.yaml new file mode 100644 index 0000000..4516baf --- /dev/null +++ b/charts/hcfmailerplus/templates/pvc-files.yaml @@ -0,0 +1,20 @@ +--- +{{- if and .Values.storage.persistence.enabled (not .Values.storage.main.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: mailtrain-files + name: {{ .Values.storage.main.claimName }} +spec: + accessModes: {{ .Values.storage.main.accessModes | toYaml | nindent 4 }} + {{ if .Values.storage.main.storageClassName }} + storageClassName: {{ .Values.storage.main.storageClassName }} + {{ end }} + resources: + requests: + storage: {{ .Values.storage.main.size }} + volumeMode: Filesystem +status: {} +{{ end }} +--- diff --git a/charts/hcfmailerplus/templates/pvc-mongo.yaml b/charts/hcfmailerplus/templates/pvc-mongo.yaml new file mode 100644 index 0000000..ff178f8 --- /dev/null +++ b/charts/hcfmailerplus/templates/pvc-mongo.yaml @@ -0,0 +1,22 @@ + +{{ if not .Values.storage.kvdata.shareKvStorage }} +--- +{{- if and .Values.storage.persistence.enabled (not .Values.storage.mongo.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: mailtrain-mongo + name: {{ .Values.storage.mongo.claimName }} +spec: + accessModes: {{ .Values.storage.kvdata.accessModes | toYaml | nindent 4 }} + {{- if .Values.storage.kvdata.storageClassName }} + storageClassName: {{ .Values.storage.kvdata.storageClassName }} + {{- end }} + resources: + requests: + storage: {{ .Values.storage.kvdata.size }} + volumeMode: Filesystem +status: {} +{{- end }} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/pvc-mysql.yaml b/charts/hcfmailerplus/templates/pvc-mysql.yaml new file mode 100644 index 0000000..2d4f5c3 --- /dev/null +++ b/charts/hcfmailerplus/templates/pvc-mysql.yaml @@ -0,0 +1,19 @@ +--- +{{- if and .Values.storage.persistence.enabled (not .Values.storage.mysql.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: {{ .Values.storage.mysql.claimName }} + name: {{ .Values.storage.mysql.claimName }} +spec: + accessModes: {{ .Values.storage.mysql.accessModes | toYaml | nindent 4 }} + {{ if .Values.storage.mysql.storageClassName }} + storageClassName: {{ .Values.storage.mysql.storageClassName }} + {{ end }} + resources: + requests: + storage: {{ .Values.storage.mysql.size }} + volumeMode: Filesystem +status: {} +{{ end }} diff --git a/charts/hcfmailerplus/templates/pvc-redis.yaml b/charts/hcfmailerplus/templates/pvc-redis.yaml new file mode 100644 index 0000000..228b9aa --- /dev/null +++ b/charts/hcfmailerplus/templates/pvc-redis.yaml @@ -0,0 +1,18 @@ +{{- if and .Values.storage.persistence.enabled (not .Values.storage.kvdata.existingClaim) }} +apiVersion: v1 +kind: PersistentVolumeClaim +metadata: + labels: + io.kompose.service: mailtrain-kvdata + name: {{ .Values.storage.kvdata.claimName }} +spec: + accessModes: {{ .Values.storage.kvdata.accessModes | toYaml | nindent 4 }} + {{- if .Values.storage.kvdata.storageClassName }} + storageClassName: {{ .Values.storage.kvdata.storageClassName }} + {{- end }} + resources: + requests: + storage: {{ .Values.storage.kvdata.size }} + volumeMode: Filesystem +status: {} +{{- end }} diff --git a/charts/hcfmailerplus/templates/secret-cloudflared.yaml b/charts/hcfmailerplus/templates/secret-cloudflared.yaml new file mode 100644 index 0000000..fa83cc8 --- /dev/null +++ b/charts/hcfmailerplus/templates/secret-cloudflared.yaml @@ -0,0 +1,11 @@ +{{ if .Values.cloudflared.enabled }} +apiVersion: v1 +kind: Secret +metadata: + name: cloudflared + namespace: {{ .Release.Namespace }} +data: + {{ .Values.cloudflared.TunnelID | required "Cloudflared TunnelID is required"}}.json: {{ .Values.cloudflared.credentials | toJson | b64enc | quote }} + credentials.json: {{ .Values.cloudflared.credentials | toJson | b64enc | quote }} +type: Opaque +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/secret-mailtrain.yaml b/charts/hcfmailerplus/templates/secret-mailtrain.yaml new file mode 100644 index 0000000..888f969 --- /dev/null +++ b/charts/hcfmailerplus/templates/secret-mailtrain.yaml @@ -0,0 +1,20 @@ +apiVersion: v1 +kind: Secret +metadata: + name: mailtrain + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: mailtrain + app.kubernetes.io/instance: mailtrain +type: Opaque +data: + {{- if not .Values.app.ADMIN_PASSWORD }} + ADMIN_PASSWORD: {{ randAlphaNum 12 | b64enc }} + {{- else }} + ADMIN_PASSWORD: {{ .Values.app.ADMIN_PASSWORD | b64enc }} + {{- end }} + CLOUDFLARE_API_KEY: {{ .Values.cloudflare.apiKey | b64enc }} + CLOUDFLARE_ZONE_ID: {{ .Values.cloudflare.zoneId | b64enc }} + CLOUDFLARE_DNS_RECORDS: {{ .Values.cloudflare.dnsRecord | first | b64enc }} + BACKUP_TO: {{ .Values.backup.to | b64enc }} + BACKUP_FROM: {{ .Values.backup.from | b64enc }} diff --git a/charts/hcfmailerplus/templates/secret-mysql.yaml b/charts/hcfmailerplus/templates/secret-mysql.yaml new file mode 100644 index 0000000..e829e92 --- /dev/null +++ b/charts/hcfmailerplus/templates/secret-mysql.yaml @@ -0,0 +1,22 @@ + +--- +apiVersion: v1 +kind: Secret +metadata: + name: mysql + namespace: {{ .Release.Namespace }} + labels: + app.kubernetes.io/name: mysql + app.kubernetes.io/instance: mysql +type: Opaque +data: + {{- if not .Values.app.MYSQL_ROOT_PASSWORD}} + MYSQL_ROOT_PASSWORD: {{ randAlphaNum 12 | b64enc }} + {{- else }} + MYSQL_ROOT_PASSWORD: {{ .Values.app.MYSQL_ROOT_PASSWORD | b64enc }} + {{- end }} + {{- if not .Values.app.MYSQL_PASSWORD}} + MYSQL_PASSWORD: {{ randAlphaNum 12 | b64enc }} + {{- else }} + MYSQL_PASSWORD: {{ .Values.app.MYSQL_PASSWORD| b64enc }} + {{- end }} diff --git a/charts/hcfmailerplus/templates/service-hfcmailerplus.yaml b/charts/hcfmailerplus/templates/service-hfcmailerplus.yaml new file mode 100644 index 0000000..d2718f6 --- /dev/null +++ b/charts/hcfmailerplus/templates/service-hfcmailerplus.yaml @@ -0,0 +1,23 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: mailtrain + name: mailtrain + namespace: {{ .Release.Namespace }} +spec: + type: ClusterIP + ports: + - name: {{ .Values.service.basePort | quote }} + port: {{ .Values.service.basePort }} + targetPort: {{ .Values.service.basePort }} + - name: {{ .Values.service.sandboxPort | quote }} + port: {{ .Values.service.sandboxPort }} + targetPort: {{ .Values.service.sandboxPort }} + - name: {{ .Values.service.publicPort | quote }} + port: {{ .Values.service.publicPort }} + targetPort: {{ .Values.service.publicPort }} + selector: + io.kompose.service: mailtrain +status: + loadBalancer: {} diff --git a/charts/hcfmailerplus/templates/service-mongo.yaml b/charts/hcfmailerplus/templates/service-mongo.yaml new file mode 100644 index 0000000..774acfe --- /dev/null +++ b/charts/hcfmailerplus/templates/service-mongo.yaml @@ -0,0 +1,17 @@ +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: mongo + name: mongo + namespace: {{ .Release.Namespace }} +spec: + type: ClusterIP + ports: + - name: {{ .Values.storage.kvdata.mongoPort | quote }} + port: {{ .Values.storage.kvdata.mongoPort }} + targetPort: {{ .Values.storage.kvdata.mongoPort }} + selector: + io.kompose.service: mongo +status: + loadBalancer: {} diff --git a/charts/hcfmailerplus/templates/service-mysql.yaml b/charts/hcfmailerplus/templates/service-mysql.yaml new file mode 100644 index 0000000..7a1304d --- /dev/null +++ b/charts/hcfmailerplus/templates/service-mysql.yaml @@ -0,0 +1,18 @@ +--- +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: mysql + name: mysql + namespace: {{ .Release.Namespace }} +spec: + type: ClusterIP + ports: + - name: {{ .Values.storage.mysql.port | quote }} + port: {{ .Values.storage.mysql.port }} + targetPort: {{ .Values.storage.mysql.port }} + selector: + io.kompose.service: mysql +status: + loadBalancer: {} diff --git a/charts/hcfmailerplus/templates/service-phpmyadmin.yaml b/charts/hcfmailerplus/templates/service-phpmyadmin.yaml new file mode 100644 index 0000000..67656ec --- /dev/null +++ b/charts/hcfmailerplus/templates/service-phpmyadmin.yaml @@ -0,0 +1,19 @@ +{{ if .Values.phpmyadmin.enabled }} +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: phpmyadmin + name: phpmyadmin + namespace: {{ .Release.Namespace }} +spec: + type: ClusterIP + ports: + - name: {{ .Values.phpmyadmin.port | quote }} + port: {{ .Values.phpmyadmin.port }} + targetPort: {{ .Values.phpmyadmin.port }} + selector: + io.kompose.service: phpmyadmin +status: + loadBalancer: {} +{{ end }} \ No newline at end of file diff --git a/charts/hcfmailerplus/templates/service-redis.yaml b/charts/hcfmailerplus/templates/service-redis.yaml new file mode 100644 index 0000000..e809cb1 --- /dev/null +++ b/charts/hcfmailerplus/templates/service-redis.yaml @@ -0,0 +1,18 @@ + +apiVersion: v1 +kind: Service +metadata: + labels: + io.kompose.service: redis + name: redis + namespace: {{ .Release.Namespace }} +spec: + type: ClusterIP + ports: + - name: {{ .Values.storage.kvdata.redisPort | quote }} + port: {{ .Values.storage.kvdata.redisPort }} + targetPort: {{ .Values.storage.kvdata.redisPort }} + selector: + io.kompose.service: redis +status: + loadBalancer: {} diff --git a/charts/hcfmailerplus/values.yaml b/charts/hcfmailerplus/values.yaml index 9f772c0..486c2f4 100644 --- a/charts/hcfmailerplus/values.yaml +++ b/charts/hcfmailerplus/values.yaml @@ -9,7 +9,7 @@ image: repository: highcanfly/hcfmailer-plus pullPolicy: IfNotPresent # Overrides the image tag whose default is the chart appVersion. - tag: "v20230910.1" + tag: "v20231216.2" imagePullSecrets: [] nameOverride: "" @@ -38,12 +38,18 @@ securityContext: {} # runAsUser: 1000 storage: + persistence: + enabled: true main: size: 1Gi #Size for the mailtrain storage + claimName: mailtrain-files + existingClaim: null accessModes: - ReadWriteOnce mysql: size: 1Gi #Size for the mysql storage + claimName: mailtrain-mysql + existingClaim: null accessModes: - ReadWriteOnce port: 3306 @@ -51,9 +57,14 @@ storage: redisPort: 6379 mongoPort: 27017 size: 1Gi #Size for the kv storage + claimName: mailtrain-kvdata + existingClaim: null shareKvStorage: false accessModes: - ReadWriteOnce + mongo: + claimName: mailtrain-mongo + existingClaim: null service: @@ -81,7 +92,7 @@ cloudflare: ingress: clusterIssuer: "" #may be set if certificate ClusterIssuer can deliver certificate for host enabled: true - className: "traefik" #defaulting to traefik + className: "nginx" #defaulting to nginx annotations: {} # traefik.ingress.kubernetes.io/router.entrypoints: websecure #for traefik # external-dns.alpha.kubernetes.io/target: 1.2.3.4 #Ip for creating A record for host (if external-dns is availaible) or CNAME if fqdn @@ -132,3 +143,81 @@ app: URL_BASE_TRUSTED: "https://hcfmailer-plus.example.com" URL_BASE_SANDBOX: "https://sandbox-hcfmailer-plus.example.com" URL_BASE_PUBLIC: "https://list-hcfmailer-plus.example.com/" + RELAY_HOST: "" + RELAY_HOST_PORT: "" + RELAY_HOST_USER: "" + RELAY_HOST_PASSWORD: "" + ADMIN_PASSWORD: "" + MYSQL_ROOT_PASSWORD: "" + MYSQL_PASSWORD: "" + +cloudflared: + enabled: false + autoscaling: + enabled: false + image: + repository: highcanfly/net-tools + tag: latest + config: | + # Name of the tunnel you want to run + tunnel: s3-tunnel + credentials-file: /etc/cloudflared/creds/credentials.json + metrics: 0.0.0.0:2000 + no-autoupdate: true + ingress: + - hostname: s3.chart-example.local + service: http://minio:9000 + - hostname: s3-console.chart-example.local + service: http://minio-console:9001 + # This rule matches any traffic which didn't match a previous rule, and responds with HTTP 404. + - service: http_status:404 + credentials: {"AccountTag": "none", "TunnelSecret": "none=", "TunnelID": ""} + cert: | + -----BEGIN PRIVATE KEY----- + MIIBVgIBADANBgkqhkiG9w0BAQEFAASCAUAwggE8AgEAAkEA6q+dGMx28Sw30Sm3 + 09NOvNPIMuujZaA1yvQ0EHAd9adN7sNreo0PwwbsOcofKmTnl0+jr0kgo96/7aWs + CK/UkQIDAQABAkEAye1iaUT8DlTyjdisX+lPtS8v8YhIZhesUT0/Uul1DbhJbVQQ + RsyF3WgYBz0P1ADJEOQ2JjhAugE6+5rDpb0OsQIhAPr/ry+DpgmsA1PZTLWC/oSt + P2fn4p7X6yQy7cEvjcqNAiEA71y4Qf+khBFUjZtV6ADcO4u7dbzdtOkAp/FDCDuM + 0xUCIQCe937ZhfSL3aDB4zddIljWaO9mfIuf9LpdU9AW8WpJJQIgBmnZlgsfgVpl + hZXP63N6cy3/S9xPpHVJyzYvsZzG3TECIQDQRA24/D9E+2Xw5nJLS0pD6kAgOGi5 + 9aGxUUBVB7jF4Q== + -----END PRIVATE KEY----- + -----BEGIN CERTIFICATE----- + MIICxzCCAnGgAwIBAgIUOp5ZxkMH+gAThWwfRQfk5vECEvEwDQYJKoZIhvcNAQEL + BQAwgbcxCzAJBgNVBAYTAlVTMRMwEQYDVQQIDApDYWxpZm9ybmlhMRYwFAYDVQQH + DA1TYW4gRnJhbmNpc2NvMRkwFwYDVQQKDBBDbG91ZEZsYXJlLCBJbmMuMTgwNgYD + VQQLDC9DbG91ZEZsYXJlIE9yaWdpbiBTU0wgRUNDIENlcnRpZmljYXRlIEF1dGhv + cml0eTEmMCQGA1UEAwwdQ2xvdWRGbGFyZSBPcmlnaW4gQ2VydGlmaWNhdGUwHhcN + MjMxMTE4MDcyMzIxWhcNMjQxMTE3MDcyMzIxWjCBtzELMAkGA1UEBhMCVVMxEzAR + BgNVBAgMCkNhbGlmb3JuaWExFjAUBgNVBAcMDVNhbiBGcmFuY2lzY28xGTAXBgNV + BAoMEENsb3VkRmxhcmUsIEluYy4xODA2BgNVBAsML0Nsb3VkRmxhcmUgT3JpZ2lu + IFNTTCBFQ0MgQ2VydGlmaWNhdGUgQXV0aG9yaXR5MSYwJAYDVQQDDB1DbG91ZEZs + YXJlIE9yaWdpbiBDZXJ0aWZpY2F0ZTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgCQQDq + r50YzHbxLDfRKbfT006808gy66NloDXK9DQQcB31p03uw2t6jQ/DBuw5yh8qZOeX + T6OvSSCj3r/tpawIr9SRAgMBAAGjUzBRMB0GA1UdDgQWBBTSCk/pNTwU1wN4ocDq + lz7yno+2yTAfBgNVHSMEGDAWgBTSCk/pNTwU1wN4ocDqlz7yno+2yTAPBgNVHRMB + Af8EBTADAQH/MA0GCSqGSIb3DQEBCwUAA0EAOyeDz+gMO9AfNPuQYDyojYWs58jL + qJUUzvY9YPiJwFcJcqgZ7up1gwA/xcGi7SsdRHLMVPDikRqtfdDO/HNjYA== + -----END CERTIFICATE----- + -----BEGIN ARGO TUNNEL TOKEN----- + eWFlNGthcGFpMXJlaTZhaFdpMldlZXk3dWhvbzlhaXF1YWk3WG91RjdFZXF1b2FmYWlGb2hQaDZh + aUdpZXlldGg5bG9vN3lhc2g5b29naGFpcGlldDlnYTBpZXYzb2Rvbmczb2h5ZUtlaWgyYWVjM2hp + ZTVlZW5lZTNlZW1vNW9oY2hhaWNoYWk3QmVlcjFvb0RpZVBoZWUzY2h1MXNvb3BoOW9vVmlpMWVl + RGFlOG5ldVBhaDVQZWk5d2VlOGFpbmVpN2hpZW1vaGhvc2hlaTdhZWJvaGJhaHNvaHphU2hlaW4y + YWlnaGFoMG9zaHVhOHdhZUY5b29aNFB1OXRob29jb29rM2VlbmdvaDVzaG9oejZlVGFoQmVlNGll + R2hpZWs4aWV0aGVlY2hvaE01b3VmaWVLNmpvaG5nYWk1b2hoZWlOYTVlaVJpcXVpWmF2NWVlbmdl + ZTdzb2ljOUFpc2FpbmFoYmVpcnVvdjd3ZWlnaDRBZVY0b2h4b3VzaDR1ZGkzTmV5ZWUwYmVlc2gx + aUNvaHNoZWVtYWk0YWl5YWVzNkVpZDNhaGNoZWViZWV0aGVlMUFpRmllOWhlaWpvaHBlZWZvb2No + aTBhZWphdmFocDBlZUJvYWxhZTFTaGFoYzF6ZWl0aDhqYWhsb2h0aTBvb3RoaWVrZWkwZWl4NkwK + -----END ARGO TUNNEL TOKEN----- + 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: 400m + memory: 256Mi + requests: + memory: 256Mi \ No newline at end of file diff --git a/repo/cert-manager-webhook-oci-1.3.1.tgz b/repo/cert-manager-webhook-oci-1.3.1.tgz index ddec46f..3ea8b24 100644 Binary files a/repo/cert-manager-webhook-oci-1.3.1.tgz and b/repo/cert-manager-webhook-oci-1.3.1.tgz differ diff --git a/repo/crontab-ui-1.0.0.tgz b/repo/crontab-ui-1.0.0.tgz index db7607b..fc98447 100644 Binary files a/repo/crontab-ui-1.0.0.tgz and b/repo/crontab-ui-1.0.0.tgz differ diff --git a/repo/dolidock-0.9.13.tgz b/repo/dolidock-0.9.13.tgz index d78502c..404ec60 100644 Binary files a/repo/dolidock-0.9.13.tgz and b/repo/dolidock-0.9.13.tgz differ diff --git a/repo/easyappointments-0.2.0.tgz b/repo/easyappointments-0.2.0.tgz index 6f87a80..43abf38 100644 Binary files a/repo/easyappointments-0.2.0.tgz and b/repo/easyappointments-0.2.0.tgz differ diff --git a/repo/gitea-0.7.1.tgz b/repo/gitea-0.7.1.tgz index 805b34c..2693f84 100644 Binary files a/repo/gitea-0.7.1.tgz and b/repo/gitea-0.7.1.tgz differ diff --git a/repo/hcf-coder-0.2.0.tgz b/repo/hcf-coder-0.2.0.tgz index 9bab19b..255b382 100644 Binary files a/repo/hcf-coder-0.2.0.tgz and b/repo/hcf-coder-0.2.0.tgz differ diff --git a/repo/hcfmailer-1.0.0.tgz b/repo/hcfmailer-1.0.0.tgz index 93f187b..6a6b502 100644 Binary files a/repo/hcfmailer-1.0.0.tgz and b/repo/hcfmailer-1.0.0.tgz differ diff --git a/repo/hcfmailerplus-0.2.0.tgz b/repo/hcfmailerplus-0.2.0.tgz new file mode 100644 index 0000000..eeefee7 Binary files /dev/null and b/repo/hcfmailerplus-0.2.0.tgz differ diff --git a/repo/hcfschedule-0.1.0.tgz b/repo/hcfschedule-0.1.0.tgz index 1f6e1b5..d04789e 100644 Binary files a/repo/hcfschedule-0.1.0.tgz and b/repo/hcfschedule-0.1.0.tgz differ diff --git a/repo/helm-dashboard-0.1.9.tgz b/repo/helm-dashboard-0.1.9.tgz index d043715..f2d4d53 100644 Binary files a/repo/helm-dashboard-0.1.9.tgz and b/repo/helm-dashboard-0.1.9.tgz differ diff --git a/repo/index.html b/repo/index.html index 3af3c21..ce436f9 100644 --- a/repo/index.html +++ b/repo/index.html @@ -138,10 +138,10 @@
hcfmailerplus - ( - 0.1.5 + ( + 0.2.0 @ - v20230910.1 + v20231216.2 )
@@ -249,6 +249,6 @@