-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SS 841 Add new app type TissUUmaps (#150)
* Added a new chart and app fixture for the TissUUmaps app type. Co-authored-by: Viktor Sandström <[email protected]>
- Loading branch information
1 parent
96ad470
commit 4de2778
Showing
10 changed files
with
374 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
apiVersion: v1 | ||
appVersion: "0.1" | ||
description: A Helm chart tissuumaps apps | ||
name: tissuumaps App | ||
version: 0.0.1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.appname }} | ||
namespace: {{ .Values.namespace }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
release: {{ $.Release.Name }} | ||
app: {{ .Values.appname }} | ||
project: {{ $.Values.project.slug }} | ||
type: app | ||
pod: {{ .Values.appname }} | ||
template: | ||
metadata: | ||
annotations: | ||
prometheus.io/scrape: "true" | ||
prometheus.io/path: /metrics | ||
# prometheus.io/port: "8501" | ||
labels: | ||
release: {{ $.Release.Name }} | ||
app: {{ .Values.appname }} | ||
project: {{ $.Values.project.slug }} | ||
networking/allow-internet-egress: "true" | ||
networking/allow-egress-to-studio-web: "true" | ||
type: app | ||
pod: {{ .Values.appname }} | ||
spec: | ||
{{- with .Values.imagePullSecrets }} | ||
imagePullSecrets: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
automountServiceAccountToken: false | ||
securityContext: | ||
{{- toYaml .Values.podSecurityContext | nindent 8 }} | ||
containers: | ||
- name: {{ .Values.appname }} | ||
image: {{ .Values.appconfig.image }} | ||
imagePullPolicy: Always | ||
ports: | ||
- containerPort: {{ .Values.service.targetport }} | ||
securityContext: | ||
{{- toYaml .Values.securityContext | nindent 10 }} | ||
resources: | ||
{{- toYaml .Values.flavor | nindent 10 }} | ||
{{- if .Values.apps.volumeK8s }} | ||
volumeMounts: | ||
{{- range $key, $value := .Values.apps.volumeK8s }} | ||
- name: {{ $key }} | ||
mountPath: {{ $.Values.appconfig.path }} | ||
{{- end }} | ||
{{- end }} | ||
- name: tmp-empty | ||
mountPath: /tmp | ||
- name: {{ .Release.Name }}-tissuumaps-configmap | ||
mountPath: /tissuumaps.cfg | ||
subPath: tissuumaps.cfg | ||
terminationGracePeriodSeconds: 30 | ||
dnsPolicy: ClusterFirst | ||
{{ if .Values.apps.volumeK8s }} | ||
volumes: | ||
{{- range $key, $value := .Values.apps.volumeK8s }} | ||
- name: {{ $key }} | ||
persistentVolumeClaim: | ||
claimName: {{ $value.release }} | ||
{{- end }} | ||
{{ end }} | ||
- name: tmp-empty | ||
emptyDir: {} | ||
- name: {{ .Release.Name }}-tissuumaps-configmap | ||
configMap: | ||
name: {{ .Release.Name }}-tissuumaps-configmap | ||
items: | ||
- key: tissuumaps.cfg | ||
path: tissuumaps.cfg |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ .Release.Name }}-ingress | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
io.kompose.service: {{ .Release.Name }}-ingress | ||
annotations: | ||
{{ if ne .Values.permission "public" }} | ||
nginx.ingress.kubernetes.io/auth-url: "{{ .Values.global.protocol }}://{{ .Values.global.auth_domain }}:8080/auth/?release={{ .Values.release }}" | ||
nginx.ingress.kubernetes.io/auth-signin: "https://{{ .Values.global.domain }}/accounts/login/?next=$scheme%3A%2F%2F$host" | ||
{{- end }} | ||
spec: | ||
rules: | ||
- host: {{ .Release.Name }}.{{ .Values.global.domain }} | ||
http: | ||
paths: | ||
- path: / | ||
backend: | ||
service: | ||
name: {{ .Values.service.name }} | ||
port: | ||
number: {{ .Values.service.port }} | ||
pathType: ImplementationSpecific | ||
tls: | ||
- secretName: {{ .Values.ingress.secretName }} | ||
hosts: | ||
- {{ .Values.global.domain }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.service.name }} | ||
namespace: {{ .Values.namespace }} | ||
labels: | ||
run: {{ .Release.Name }}-tissuumaps | ||
spec: | ||
ports: | ||
- protocol: TCP | ||
port: {{ .Values.service.port }} | ||
targetPort: {{ .Values.service.targetport }} | ||
selector: | ||
release: {{ $.Release.Name }} |
11 changes: 11 additions & 0 deletions
11
charts/apps/tissuumaps/chart/templates/tissuumaps-configmap.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Release.Name }}-tissuumaps-configmap | ||
namespace: {{ .Values.namespace }} | ||
data: | ||
tissuumaps.cfg: |- | ||
READ_ONLY = True | ||
PLUGIN_FOLDER = "/mnt/data/plugins/" | ||
SLIDE_DIR = "/mnt/data/shared/" | ||
DEFAULT_PROJECT = "project.tmap" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
namespace: default | ||
appname: tissuumaps | ||
project: | ||
name: project | ||
slug: project-slug | ||
|
||
global: | ||
protocol: TCP | ||
|
||
apps: | ||
volumek8s: | ||
|
||
appconfig: | ||
#port: 80 Instead uses the port and target port defined in the fixture | ||
image: docker.io/cavenel/tissuumaps:3.2.0.4 # ghcr.io/tissuumaps/tissuumaps:3 | ||
path: /mnt/data/ | ||
|
||
service: | ||
name: tissuumaps-svc | ||
|
||
imagePullSecrets: | ||
- name: regcred | ||
|
||
ingress: | ||
secretName: prod-ingress | ||
|
||
podSecurityContext: | ||
seccompProfile: | ||
type: RuntimeDefault | ||
fsGroup: 1000 | ||
|
||
securityContext: | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
runAsGroup: 1000 | ||
allowPrivilegeEscalation: false | ||
privileged: false | ||
capabilities: | ||
drop: | ||
- all |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
{ | ||
"category": "serve", | ||
"description": "", | ||
"name": "Dash App", | ||
"priority": "400", | ||
"settings": { | ||
"appconfig": { | ||
"image": { | ||
"default": "registry/repository/image:tag", | ||
"title": "Image", | ||
"type": "string" | ||
}, | ||
"meta": { | ||
"title": "Configurations" | ||
}, | ||
"port": { | ||
"default": "8000", | ||
"title": "Port", | ||
"type": "number" | ||
} | ||
}, | ||
"default_values": { | ||
"port": "80", | ||
"targetport": "8000" | ||
}, | ||
"flavor": "one", | ||
"logs": [ | ||
"serve" | ||
], | ||
"permissions": { | ||
"private": { | ||
"option": "true", | ||
"value": "false" | ||
}, | ||
"project": { | ||
"option": "true", | ||
"value": "true" | ||
}, | ||
"public": { | ||
"option": "true", | ||
"value": "false" | ||
} | ||
} | ||
}, | ||
"slug": "tissuumaps", | ||
"table_field": { | ||
"url": "https://{{ release }}.{{ global.domain }}" | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.