Skip to content
Snippets Groups Projects
Commit 110b3ff0 authored by maik.schaefer's avatar maik.schaefer
Browse files

Integrate ox common

parent 9d448077
No related branches found
No related tags found
No related merge requests found
...@@ -8,7 +8,10 @@ manifests: ...@@ -8,7 +8,10 @@ manifests:
ingress: ingress:
enabled: false enabled: false
defaultRegistry: ""
image: image:
registry: ""
repository: ${CI_REGISTRY_IMAGE} repository: ${CI_REGISTRY_IMAGE}
pullPolicy: Always pullPolicy: Always
tag: ${TAG_NAME} tag: ${TAG_NAME}
......
dependencies:
- name: ox-common
repository: oci://registry.open-xchange.com//common/charts
version: 1.0.9
digest: sha256:e204cbfc5c68f4cd492bd4c5eaa87ad685ed1403e921b05c0fb2498b0aa9f299
generated: "2021-10-13T16:00:59.193216+02:00"
...@@ -15,10 +15,14 @@ type: application ...@@ -15,10 +15,14 @@ type: application
# This is the chart version. This version number should be incremented each time you make changes # 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. # to the chart and its templates, including the app version.
# Versions are expected to follow Semantic Versioning (https://semver.org/) # Versions are expected to follow Semantic Versioning (https://semver.org/)
version: 1.1.0 version: 2.0.0
# This is the version number of the application being deployed. This version number should be # 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 # 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. # follow Semantic Versioning. They should reflect the version the application is using.
# It is recommended to use it with quotes. # It is recommended to use it with quotes.
appVersion: "1.1.0" appVersion: "1.1.0"
dependencies:
- name: ox-common
version: 1.0.9
repository: "oci://registry.open-xchange.com//common/charts"
{{- define "core-manifest-service.ingressPathMappings" -}}
paths:
- path: /
{{- end -}}
apiVersion: v1 apiVersion: v1
kind: ConfigMap kind: ConfigMap
metadata: metadata:
name: {{ include "core-manifest-service.fullname" . }} name: {{ include "ox-common.names.fullname" . }}
data: data:
urls.yaml: | urls.yaml: |
manifests: manifests:
......
apiVersion: apps/v1 apiVersion: apps/v1
kind: Deployment kind: Deployment
metadata: metadata:
name: {{ include "core-manifest-service.fullname" . }} name: {{ include "ox-common.names.fullname" . }}
labels: labels:
{{- include "core-manifest-service.labels" . | nindent 4 }} {{- include "ox-common.labels.standard" . | nindent 4 }}
{{- with .Values.deploymentAnnotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec: spec:
{{- if not .Values.autoscaling.enabled }}
replicas: {{ .Values.replicaCount }} replicas: {{ .Values.replicaCount }}
{{- end }}
selector: selector:
matchLabels: matchLabels:
{{- include "core-manifest-service.selectorLabels" . | nindent 6 }} {{- include "ox-common.labels.matchLabels" . | nindent 6 }}
template: template:
metadata: metadata:
{{- with .Values.podAnnotations }} annotations: {{ toYaml .Values.podAnnotations | nindent 8 }}
annotations:
{{- toYaml . | nindent 8 }}
{{- end }}
labels: labels:
{{- include "core-manifest-service.selectorLabels" . | nindent 8 }} {{- include "ox-common.labels.matchLabels" . | nindent 8 }}
spec: spec: {{ include "ox-common.pods.podSpec" (dict "podRoot" .Values "global" $ "context" . ) | nindent 6 }}
{{- with .Values.imagePullSecrets }}
imagePullSecrets:
{{- toYaml . | nindent 8 }}
{{- end }}
serviceAccountName: {{ include "core-manifest-service.serviceAccountName" . }}
securityContext:
{{- toYaml .Values.podSecurityContext | nindent 8 }}
containers: containers:
- name: {{ .Chart.Name }} - name: main
securityContext: securityContext: {{ toYaml .Values.securityContext | nindent 12 }}
{{- toYaml .Values.securityContext | nindent 12 }} image: {{ include "ox-common.images.image" (dict "imageRoot" .Values.image "global" $ "context" . ) }}
image: "{{ .Values.image.repository }}:{{ .Values.image.tag | default .Chart.AppVersion }}"
imagePullPolicy: {{ .Values.image.pullPolicy }} imagePullPolicy: {{ .Values.image.pullPolicy }}
env: env:
- name: CACHE_TTL - name: CACHE_TTL
...@@ -46,14 +29,20 @@ spec: ...@@ -46,14 +29,20 @@ spec:
- name: http - name: http
containerPort: {{ .Values.containerPort | default 8080 }} containerPort: {{ .Values.containerPort | default 8080 }}
protocol: TCP protocol: TCP
{{- if .Values.probe.liveness.enabled }}
livenessProbe: livenessProbe:
httpGet: httpGet:
path: /healthy path: /
port: http port: http
{{- omit .Values.probe.liveness "enabled" | toYaml | nindent 12 }}
{{- end }}
{{- if .Values.probe.readiness.enabled }}
readinessProbe: readinessProbe:
httpGet: httpGet:
path: /ready path: /
port: http port: http
{{- omit .Values.probe.readiness "enabled" | toYaml | nindent 12 }}
{{- end }}
resources: resources:
{{- toYaml .Values.resources | nindent 12 }} {{- toYaml .Values.resources | nindent 12 }}
volumeMounts: volumeMounts:
...@@ -62,16 +51,5 @@ spec: ...@@ -62,16 +51,5 @@ spec:
volumes: volumes:
- name: manifest-config - name: manifest-config
configMap: configMap:
name: {{ include "core-manifest-service.fullname" . }} name: {{ include "ox-common.names.fullname" . }}
{{- with .Values.nodeSelector }}
nodeSelector:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.affinity }}
affinity:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- with .Values.tolerations }}
tolerations:
{{- toYaml . | nindent 8 }}
{{- end }}
{{- if .Values.ingress.enabled -}} {{- if .Values.ingress.enabled -}}
{{- $fullName := include "core-manifest-service.fullname" . -}} {{ include "ox-common.ingress.defaultIngress" (dict "ingress" .Values.ingress "context" . "global" $) }}
{{- $svcPort := .Values.service.port -}}
{{- if and .Values.ingress.className (not (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion)) }}
{{- if not (hasKey .Values.ingress.annotations "kubernetes.io/ingress.class") }}
{{- $_ := set .Values.ingress.annotations "kubernetes.io/ingress.class" .Values.ingress.className}}
{{- end }}
{{- end }}
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1
{{- else if semverCompare ">=1.14-0" .Capabilities.KubeVersion.GitVersion -}}
apiVersion: networking.k8s.io/v1beta1
{{- else -}}
apiVersion: extensions/v1beta1
{{- end }}
kind: Ingress
metadata:
name: {{ $fullName }}
labels:
{{- include "core-manifest-service.labels" . | nindent 4 }}
{{- with .Values.ingress.annotations }}
annotations:
{{- toYaml . | nindent 4 }}
{{- end }}
spec:
{{- if and .Values.ingress.className (semverCompare ">=1.18-0" .Capabilities.KubeVersion.GitVersion) }}
ingressClassName: {{ .Values.ingress.className }}
{{- end }}
{{- if .Values.ingress.tls }}
tls:
{{- range .Values.ingress.tls }}
- hosts:
{{- range .hosts }}
- {{ . | quote }}
{{- end }}
secretName: {{ .secretName }}
{{- end }}
{{- end }}
rules:
{{- range .Values.ingress.hosts }}
- host: {{ .host | quote }}
http:
paths:
{{- range .paths }}
- path: {{ .path }}
{{- if and .pathType (semverCompare ">=1.18-0" $.Capabilities.KubeVersion.GitVersion) }}
pathType: {{ .pathType }}
{{- end }}
backend:
{{- if semverCompare ">=1.19-0" $.Capabilities.KubeVersion.GitVersion }}
service:
name: {{ $fullName }}
port:
number: {{ $svcPort }}
{{- else }}
serviceName: {{ $fullName }}
servicePort: {{ $svcPort }}
{{- end }}
{{- end }}
{{- end }}
{{- end }} {{- end }}
apiVersion: v1 apiVersion: v1
kind: Service kind: Service
metadata: metadata:
name: {{ include "core-manifest-service.fullname" . }} name: {{ include "ox-common.names.fullname" . }}
labels: labels:
{{- include "core-manifest-service.labels" . | nindent 4 }} {{- include "ox-common.labels.standard" . | nindent 4 }}
spec: spec:
type: {{ .Values.service.type }} type: {{ .Values.service.type }}
ports: ports:
...@@ -12,4 +12,4 @@ spec: ...@@ -12,4 +12,4 @@ spec:
protocol: TCP protocol: TCP
name: http name: http
selector: selector:
{{- include "core-manifest-service.selectorLabels" . | nindent 4 }} {{- include "ox-common.labels.matchLabels" . | nindent 4 }}
...@@ -4,10 +4,12 @@ ...@@ -4,10 +4,12 @@
replicaCount: 1 replicaCount: 1
defaultRegistry: registry.open-xchange.com
containerPort: 8080 containerPort: 8080
image: image:
repository: gitlab.open-xchange.com:4567/frontend/infrastructure/manifest-service repository: "core-manifest-service"
pullPolicy: IfNotPresent pullPolicy: IfNotPresent
# Overrides the image tag whose default is the chart appVersion. # Overrides the image tag whose default is the chart appVersion.
tag: "" tag: ""
...@@ -44,15 +46,13 @@ service: ...@@ -44,15 +46,13 @@ service:
ingress: ingress:
enabled: true enabled: true
className: "" pathMappings: "core-manifest-service.ingressPathMappings"
annotations: {} annotations: {}
# kubernetes.io/ingress.class: nginx # kubernetes.io/ingress.class: nginx
# kubernetes.io/tls-acme: "true" # kubernetes.io/tls-acme: "true"
hosts: hosts:
- host: chart-example.local - host: chart-example.local
paths:
- path: /
pathType: ImplementationSpecific
tls: [] tls: []
# - secretName: chart-example-tls # - secretName: chart-example-tls
# hosts: # hosts:
...@@ -83,6 +83,18 @@ tolerations: [] ...@@ -83,6 +83,18 @@ tolerations: []
affinity: {} affinity: {}
# service specific configuration probe:
liveness:
enabled: true
periodSeconds: 10
failureThreshold: 15
readiness:
enabled: true
initialDelaySeconds: 30
periodSeconds: 5
failureThreshold: 2
timeoutSeconds: 5
cacheTTL: 30000 cacheTTL: 30000
logLevel: info logLevel: info
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment