Public Information

This commit is contained in:
2025-01-24 16:18:47 +01:00
commit 0bd2038c86
449 changed files with 108655 additions and 0 deletions

View File

@@ -0,0 +1,14 @@
{{- if .Values.docAreas }}
{{- range $docArea := .Values.docAreas }}
Created Document Area {{ $docArea.id }} on Server {{ $.this.nappl.host }}
{{- if $docArea.apps }}
{{- range $app := $docArea.apps }}
- Installed App {{ $app }} into {{ $docArea.id }}
{{- end }}
{{- else }}
- No Apps in Document Area {{ $docArea.id }} specified
{{- end }}
{{- end }}
{{- else }}
No Document Areas specified
{{- end }}

View File

@@ -0,0 +1,19 @@
apiVersion: nplus.cloud/v1beta1
kind: Application
metadata:
{{- if .this.utils.includeNamespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
name: {{ .component.fullName }}
labels:
{{- include "nplus.instanceLabels" . | nindent 4 }}
annotations:
{{- include "nplus.annotations" . | nindent 4 }}
argocd.argoproj.io/sync-wave: "1"
spec:
docAreas:
{{- toYaml .Values.docAreas | nindent 4 }}
run:
{{- toYaml .Values.run | nindent 4 }}
selector:
{{- include "nplus.selectorLabels" . | nindent 4 }}

View File

@@ -0,0 +1,18 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .component.fullName }}-config
{{- if .this.utils.includeNamespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "nplus.instanceLabels" . | nindent 4 }}
annotations:
{{- include "nplus.argoWave" . | nindent 4 }}
{{- include "nplus.annotations" . | nindent 4 }}
{{- include "nplus.securityAnnotations" . | nindent 4 }}
data:
{{- range $path, $bytes := .Files.Glob "config/*" }}
{{- base $path | nindent 2 }}: |
{{- tpl ($.Files.Get $path) $ | nindent 4 }}
{{- end }}

View File

@@ -0,0 +1,89 @@
{{- include "nplus.init" $ -}}
# Component: {{ .component.chartName }}
# will connect to:
{{- if (.this.nappl).host }}
# nappl: {{ if ($.this.nappl).ssl -}}https{{- else -}}http{{- end -}}://{{ ($.this.nappl).host }}:{{ (.this.nappl).port }}/{{ (.this.nappl).instance }}
{{- else }}
# defined by config file in conf PV.
{{- end }}
#
{{- if (.this.utils).maintenance -}}
# Job must not be running, as we are in maintenance mode and there might not even be a nappl service
{{- else }}
apiVersion: batch/v1
kind: Job
metadata:
name: {{ .component.fullName }}
{{- if .this.utils.includeNamespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "nplus.instanceLabels" . | nindent 4 }}
annotations:
argocd.argoproj.io/hook: PostSync
argocd.argoproj.io/hook-delete-policy: HookSucceeded
{{- include "nplus.annotations" . | nindent 4 }}
{{- include "nplus.securityAnnotations" . | nindent 4 }}
spec:
# Deletion ist done by Operator when successful, so no ttl necessary.
# ttlSecondsAfterFinished: 60
template:
metadata:
labels:
app.kubernetes.io/version: {{ .Chart.AppVersion }}
app.kubernetes.io/managed-by: {{ .Release.Service }}
app.kubernetes.io/instance: {{ .instance.group | default .instance.name | default .Release.Name }}
app.kubernetes.io/component: {{ .component.chartName }}
{{- include "nplus.templateLabels" . | nindent 8 }}
spec:
# hostname: {{ .component.fullName }}
{{- include "nplus.imagePullSecrets" . | nindent 6 }}
{{- include "nplus.podSecurityContext" . | nindent 6 }}
{{- include "nplus.terminationGracePeriodSeconds" . | nindent 6 }}
initContainers:
{{- if (or .this.utils.disableWave (not (and .component.isArgo .this.meta.wave))) }}
{{- include "nplus.waitOneMinute" . | nindent 6 }}
{{- else }}
# -- wait-one-minute - not waiting as {{ .this.utils.disableWave }} {{ .component.isArgo }} {{ .this.meta.wave }}
{{- end }}
{{- include "nplus.waitFor" . | nindent 6 }}
containers:
- name: run
image: {{ include "nplus.image" (dict "global" .Values.global "image" .Values.image) }}
imagePullPolicy: {{ include "nplus.imagePullPolicy" .Values.image }}
{{- include "nplus.containerSecurityContext" . | nindent 8 }}
env:
# -- NAPPL Connection Credentials
{{- include "nplus.envCredentials" (list
"APP_AL_USER" ($.this.nappl).account
"APP_AL_PASSWORD" ($.this.nappl).password
($.this.nappl).secret
) | nindent 10 }}
{{- include "nplus.environment" . | nindent 8 }}
command: ["/bin/sh", "-c", "/config/run"]
{{- include "nplus.resources" . | nindent 8 }}
volumeMounts:
{{- include "nplus.defaultMounts" . | nindent 8 }}
- name: config
mountPath: /config
- name: conf
subPath: {{ .this.instance.name }}
mountPath: /instance
volumes:
{{- include "nplus.defaultVolumes" . | nindent 6 }}
- name: config
configMap:
name: {{ .component.fullName }}-config
defaultMode: 0777
restartPolicy: Never
backoffLimit: 0
{{- end }}

View File

@@ -0,0 +1,28 @@
{{- include "nplus.init" $ -}}
{{- if ((.this.security).cni).createNetworkPolicy }}
kind: NetworkPolicy
apiVersion: networking.k8s.io/v1
metadata:
name: {{ .component.fullName }}
{{- if .this.utils.includeNamespace }}
namespace: {{ .Release.Namespace }}
{{- end }}
labels:
{{- include "nplus.instanceLabels" . | nindent 4 }}
annotations:
{{- include "nplus.argoWave" . | nindent 4 }}
{{- include "nplus.annotations" . | nindent 4 }}
{{- include "nplus.securityAnnotations" . | nindent 4 }}
spec:
podSelector:
matchLabels:
{{- include "nplus.selectorLabels" . | nindent 6 }}
policyTypes:
- Egress
egress:
- to:
- podSelector:
matchLabels:
nplus/group: {{ .instance.group }}
nplus/type: core
{{- end }}