Public Information
This commit is contained in:
2
charts/pipeliner/templates/component.tpl
Normal file
2
charts/pipeliner/templates/component.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
{{- include "nplus.init" $ -}}
|
||||
{{- include "nplus.component" . -}}
|
||||
18
charts/pipeliner/templates/defaultconfig.tpl
Normal file
18
charts/pipeliner/templates/defaultconfig.tpl
Normal file
@@ -0,0 +1,18 @@
|
||||
apiVersion: v1
|
||||
kind: ConfigMap
|
||||
metadata:
|
||||
name: {{ .component.fullName }}-defaultconfig
|
||||
{{- 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 "defaultconfig/*" }}
|
||||
{{- base $path | nindent 2 }}: |
|
||||
{{- tpl ($.Files.Get $path) $ | nindent 4 }}
|
||||
{{- end }}
|
||||
16
charts/pipeliner/templates/ingress.tpl
Normal file
16
charts/pipeliner/templates/ingress.tpl
Normal file
@@ -0,0 +1,16 @@
|
||||
{{- include "nplus.init" $ -}}
|
||||
{{- if ( include "nplus.ingressEnabled" . ) }}
|
||||
{{- include "nplus.ingress" (list . .component.fullName) | nindent 0 }}
|
||||
- path: {{ .Values.ingress.contextPath }}
|
||||
pathType: Prefix
|
||||
backend:
|
||||
service:
|
||||
name: {{ .component.fullName }}
|
||||
port:
|
||||
name: {{ .Values.ingress.backendProtocol | default "http" }}
|
||||
{{- else }}
|
||||
# kind: ingress
|
||||
# Not Generating any Ingress for {{ .component.fullName }} as
|
||||
# Ingress = {{ .this.ingress }}
|
||||
# Service = {{ .this.service }}
|
||||
{{- end }}
|
||||
69
charts/pipeliner/templates/networkpolicy.tpl
Normal file
69
charts/pipeliner/templates/networkpolicy.tpl
Normal file
@@ -0,0 +1,69 @@
|
||||
{{- 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:
|
||||
- Ingress
|
||||
- Egress
|
||||
|
||||
ingress:
|
||||
|
||||
# This is for the WebDAV Service
|
||||
{{- if ( include "nplus.ingressEnabled" . ) }}
|
||||
{{- include "nplus.networkpolicy.allowFromIngress" . | nindent 2 }}
|
||||
{{- end }}
|
||||
|
||||
- from:
|
||||
# access from nappl core in the same instance to setup a cluster
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
nplus/group: {{ .instance.group }}
|
||||
nplus/type: core
|
||||
ports:
|
||||
{{- include "nplus.napplClusterPolicyPorts" . | nindent 4 }}
|
||||
|
||||
{{- include "nplus.networkpolicy.allowFromAdmin" . | nindent 2 }}
|
||||
{{- include "nplus.networkpolicy.allowFromMon" . | nindent 2 }}
|
||||
|
||||
|
||||
egress:
|
||||
- to:
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
nplus/group: {{ .instance.group }}
|
||||
nplus/type: database
|
||||
- to:
|
||||
# access to application-layer in the same instance to setup a cluster
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
nplus/group: {{ .instance.group }}
|
||||
nplus/type: core
|
||||
- to:
|
||||
# access to storage-layer in the same instance
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
nplus/group: {{ .instance.group }}
|
||||
nplus/type: nstl
|
||||
- to:
|
||||
# access to rendition-server in the same namespace
|
||||
- podSelector:
|
||||
matchLabels:
|
||||
nplus/group: {{ .instance.group }}
|
||||
nplus/type: rs
|
||||
{{- end }}
|
||||
2
charts/pipeliner/templates/pdb.tpl
Normal file
2
charts/pipeliner/templates/pdb.tpl
Normal file
@@ -0,0 +1,2 @@
|
||||
{{- include "nplus.init" $ -}}
|
||||
{{- include "nplus.podDisruptionBudget" . -}}
|
||||
1
charts/pipeliner/templates/pvc.tpl
Normal file
1
charts/pipeliner/templates/pvc.tpl
Normal file
@@ -0,0 +1 @@
|
||||
{{- include "nplus.pvc" . }}
|
||||
32
charts/pipeliner/templates/service.tpl
Normal file
32
charts/pipeliner/templates/service.tpl
Normal file
@@ -0,0 +1,32 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
{{- if .this.utils.includeNamespace }}
|
||||
namespace: {{ .Release.Namespace }}
|
||||
{{- end }}
|
||||
name: {{ .component.fullName }}
|
||||
labels:
|
||||
{{- include "nplus.instanceLabels" . | nindent 4 }}
|
||||
annotations:
|
||||
{{- include "nplus.argoWave" . | nindent 4 }}
|
||||
{{- include "nplus.annotations" . | nindent 4 }}
|
||||
{{- include "nplus.securityAnnotations" . | nindent 4 }}
|
||||
{{- include "nplus.serviceAnnotations" . | nindent 4 }}
|
||||
spec:
|
||||
|
||||
# this is a "headless service", no cluster IP is defined
|
||||
# as none of the internal components need to access this service.
|
||||
# It is purely used to collect the EndPointSlices
|
||||
type: ClusterIP
|
||||
clusterIP: None
|
||||
ports:
|
||||
{{- include "nplus.defaultServicePorts" . | nindent 4 }}
|
||||
selector:
|
||||
{{- if eq .this.service.selector "component" }}
|
||||
{{- include "nplus.selectorLabels" . | nindent 4 }}
|
||||
{{- else if eq .this.service.selector "type" }}
|
||||
{{- include "nplus.selectorLabelsNc" . | nindent 4 }}
|
||||
{{- else }}
|
||||
{{- fail (printf "Unknown Service Selector Type: %s - must be component or type" .this.service.selector) }}
|
||||
{{- end }}
|
||||
|
||||
134
charts/pipeliner/templates/statefulset.tpl
Normal file
134
charts/pipeliner/templates/statefulset.tpl
Normal file
@@ -0,0 +1,134 @@
|
||||
{{- include "nplus.init" $ -}}
|
||||
apiVersion: apps/v1
|
||||
kind: StatefulSet
|
||||
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:
|
||||
serviceName: {{ .component.fullName }}
|
||||
selector:
|
||||
matchLabels:
|
||||
{{- include "nplus.selectorLabels" . | nindent 6 }}
|
||||
replicas: {{ .Values.replicaCount }}
|
||||
podManagementPolicy: OrderedReady
|
||||
updateStrategy:
|
||||
type: {{ .Values.updateStrategy | default "OnDelete" }}
|
||||
minReadySeconds: 5
|
||||
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
{{- include "nplus.templateLabels" . | nindent 8 }}
|
||||
annotations:
|
||||
{{- include "nplus.templateAnnotations" . | nindent 8 }}
|
||||
{{- include "nplus.securityAnnotations" . | nindent 8 }}
|
||||
spec:
|
||||
{{- include "nplus.imagePullSecrets" . | nindent 6 }}
|
||||
{{- include "nplus.podSecurityContext" . | nindent 6 }}
|
||||
{{- include "nplus.securityIllumioReadinessGates" . | nindent 6 }}
|
||||
{{- include "nplus.terminationGracePeriodSeconds" . | nindent 6 }}
|
||||
|
||||
initContainers:
|
||||
{{- include "nplus.waitFor" . | nindent 6 }}
|
||||
{{- include "nplus.copyConfig" . | nindent 6 }}
|
||||
|
||||
containers:
|
||||
- name: pipeliner
|
||||
image: {{ include "nplus.image" (dict "global" .Values.global "image" .Values.image) }}
|
||||
imagePullPolicy: {{ include "nplus.imagePullPolicy" .Values.image }}
|
||||
{{- include "nplus.containerSecurityContext" . | nindent 8 }}
|
||||
env:
|
||||
{{- include "nplus.environment" . | nindent 8 }}
|
||||
|
||||
{{- if .this.utils.maintenance }}
|
||||
{{- include "nplus.idle" . | nindent 8 }}
|
||||
{{- else }}
|
||||
startupProbe:
|
||||
exec:
|
||||
command:
|
||||
- "java"
|
||||
- "-jar"
|
||||
- "/opt/ceyoniq/nscale-pipeliner/javalibs/PipelinerCheck.jar"
|
||||
- "localhost"
|
||||
- "4173"
|
||||
initialDelaySeconds: 10
|
||||
failureThreshold: 12
|
||||
periodSeconds: 10
|
||||
readinessProbe:
|
||||
exec:
|
||||
command:
|
||||
- "java"
|
||||
- "-jar"
|
||||
- "/opt/ceyoniq/nscale-pipeliner/javalibs/PipelinerCheck.jar"
|
||||
- "localhost"
|
||||
- "4173"
|
||||
periodSeconds: 30
|
||||
timeoutSeconds: 3
|
||||
# -- Ceyoniq does currently not define an *official* livenessProbe, so we use
|
||||
# one that quickly checks the main socket on Layer 4.
|
||||
livenessProbe:
|
||||
tcpSocket:
|
||||
port: tcp
|
||||
# initialDelaySeconds: 20
|
||||
periodSeconds: 10
|
||||
{{- end }}
|
||||
|
||||
ports:
|
||||
- containerPort: {{ required "Pipeliner tcp port must be set" ((.this.meta).ports).tcp }}
|
||||
name: tcp
|
||||
|
||||
{{- include "nplus.resources" . | nindent 8 }}
|
||||
|
||||
volumeMounts:
|
||||
{{- include "nplus.defaultMounts" . | nindent 8 }}
|
||||
|
||||
{{- if .Values.dav }}
|
||||
- name: {{ .Release.Namespace }}-nplus-webdav-container
|
||||
image: {{ include "nplus.image" (dict "global" .Values.global "image" .Values.dav.image) }}
|
||||
imagePullPolicy: {{ include "nplus.imagePullPolicy" .Values.dav.image }}
|
||||
{{- include "nplus.containerSecurityContext" . | nindent 8 }}
|
||||
{{- include "nplus.sidecarResources" . | nindent 8 }}
|
||||
|
||||
command: [ "/nplus/davserver" ]
|
||||
|
||||
volumeMounts:
|
||||
- name: data
|
||||
mountPath: "/webdav"
|
||||
subPath: {{ .component.storagePath | quote }}
|
||||
|
||||
env:
|
||||
# -- DAV Connection Credentials
|
||||
{{- include "nplus.envCredentials" (list
|
||||
"DAV_USER" ($.this.dav).account
|
||||
"DAV_PASSWORD" ($.this.dav).password
|
||||
($.this.dav).secret
|
||||
) | nindent 10 }}
|
||||
|
||||
- name: DAV_ROOT
|
||||
value: "/{{ .component.name }}"
|
||||
|
||||
ports:
|
||||
{{- if not (.this.security).zeroTrust }}
|
||||
- containerPort: 8080
|
||||
name: http
|
||||
{{- end }}
|
||||
|
||||
readinessProbe:
|
||||
tcpSocket:
|
||||
port: 8080
|
||||
initialDelaySeconds: 15
|
||||
periodSeconds: 10
|
||||
|
||||
{{- end }}
|
||||
|
||||
volumes:
|
||||
{{- include "nplus.defaultVolumes" . | nindent 6 }}
|
||||
|
||||
Reference in New Issue
Block a user