From befc09bba026eddf08b1d9ef5de03062aab143b1 Mon Sep 17 00:00:00 2001 From: Frederic Gurr Date: Fri, 8 Sep 2023 16:58:40 +0200 Subject: [PATCH] Deploy infocenters 2023-06 and 2023-09 with Helm Chart Change-Id: Ic67a4e834670114afe92374e455c663f8573694f --- infoCenter/charts/infocenter/.helmignore | 23 ++++++ infoCenter/charts/infocenter/Chart.yaml | 6 ++ .../infocenter/templates/deployment.yaml | 75 +++++++++++++++++++ .../charts/infocenter/templates/route.yaml | 30 ++++++++ .../charts/infocenter/templates/service.yaml | 24 ++++++ .../charts/infocenter/values-2023-06.yaml | 20 +++++ .../charts/infocenter/values-2023-09.yaml | 20 +++++ 7 files changed, 198 insertions(+) create mode 100644 infoCenter/charts/infocenter/.helmignore create mode 100644 infoCenter/charts/infocenter/Chart.yaml create mode 100644 infoCenter/charts/infocenter/templates/deployment.yaml create mode 100644 infoCenter/charts/infocenter/templates/route.yaml create mode 100644 infoCenter/charts/infocenter/templates/service.yaml create mode 100644 infoCenter/charts/infocenter/values-2023-06.yaml create mode 100644 infoCenter/charts/infocenter/values-2023-09.yaml diff --git a/infoCenter/charts/infocenter/.helmignore b/infoCenter/charts/infocenter/.helmignore new file mode 100644 index 0000000..0e8a0eb --- /dev/null +++ b/infoCenter/charts/infocenter/.helmignore @@ -0,0 +1,23 @@ +# Patterns to ignore when building packages. +# This supports shell glob matching, relative path matching, and +# negation (prefixed with !). Only one pattern per line. +.DS_Store +# Common VCS dirs +.git/ +.gitignore +.bzr/ +.bzrignore +.hg/ +.hgignore +.svn/ +# Common backup files +*.swp +*.bak +*.tmp +*.orig +*~ +# Various IDEs +.project +.idea/ +*.tmproj +.vscode/ diff --git a/infoCenter/charts/infocenter/Chart.yaml b/infoCenter/charts/infocenter/Chart.yaml new file mode 100644 index 0000000..9e4a847 --- /dev/null +++ b/infoCenter/charts/infocenter/Chart.yaml @@ -0,0 +1,6 @@ +apiVersion: v2 +name: infocenter +description: A Helm chart for Infocenter +type: application +version: 0.1.0 +appVersion: "1.16.0" diff --git a/infoCenter/charts/infocenter/templates/deployment.yaml b/infoCenter/charts/infocenter/templates/deployment.yaml new file mode 100644 index 0000000..150c28d --- /dev/null +++ b/infoCenter/charts/infocenter/templates/deployment.yaml @@ -0,0 +1,75 @@ +#******************************************************************************* +# Copyright (c) 2023 Eclipse Foundation and others. +# This program and the accompanying materials are made available +# under the terms of the Eclipse Public License 2.0 +# which is available at http://www.eclipse.org/legal/epl-v20.html, +# or the MIT License which is available at https://opensource.org/licenses/MIT. +# SPDX-License-Identifier: EPL-2.0 OR MIT +#******************************************************************************* +apiVersion: apps/v1 +kind: Deployment +metadata: + labels: + infocenter.version: {{ .Values.infocenterVersion | quote }} + namespace: {{ .Values.namespace | quote }} + name: "{{ .Chart.Name }}-{{ .Values.infocenterVersion }}" +spec: + replicas: {{ .Values.replicaCount }} + selector: + matchLabels: + infocenter.version: {{ .Values.infocenterVersion | quote }} + #serviceName: "{{ .Chart.Name }}-{{ .Values.infocenterVersion}}" + template: + metadata: + name: "{{ .Chart.Name }}-{{ .Values.infocenterVersion }}" + labels: + infocenter.version: {{ .Values.infocenterVersion | quote }} + spec: + affinity: + nodeAffinity: + preferredDuringSchedulingIgnoredDuringExecution: + - weight: 1 + preference: + matchExpressions: + - key: speed + operator: NotIn + values: + - fast + terminationGracePeriodSeconds: 180 + containers: + - name: {{ .Chart.Name }}-{{ .Values.infocenterVersion }} + image: {{ .Values.image.repository }}:{{ .Values.image.tag }} + imagePullPolicy: {{ .Values.image.pullPolicy }} + command: + - /infocenter/startDockerInfoCenter.sh + livenessProbe: + httpGet: + path: /help/index.jsp + port: 8086 + scheme: HTTP + initialDelaySeconds: 480 + periodSeconds: 60 + failureThreshold: 2 + timeoutSeconds: 90 + readinessProbe: + httpGet: + path: /help/index.jsp + port: 8086 + periodSeconds: 60 + timeoutSeconds: 90 + initialDelaySeconds: 60 + ports: + - containerPort: 8086 + protocol: TCP + resources: + requests: + cpu: 500m + limits: + cpu: 2 + memory: 1.5Gi + volumeMounts: + - name: workspace + mountPath: "/infocenter/workspace" + volumes: + - name: workspace + emptyDir: {} diff --git a/infoCenter/charts/infocenter/templates/route.yaml b/infoCenter/charts/infocenter/templates/route.yaml new file mode 100644 index 0000000..72c35d7 --- /dev/null +++ b/infoCenter/charts/infocenter/templates/route.yaml @@ -0,0 +1,30 @@ +#******************************************************************************* +# Copyright (c) 2023 Eclipse Foundation and others. +# This program and the accompanying materials are made available +# under the terms of the Eclipse Public License 2.0 +# which is available at http://www.eclipse.org/legal/epl-v20.html, +# or the MIT License which is available at https://opensource.org/licenses/MIT. +# SPDX-License-Identifier: EPL-2.0 OR MIT +#******************************************************************************* +apiVersion: "route.openshift.io/v1" +kind: "Route" +metadata: + labels: + infocenter.version: {{ .Values.infocenterVersion | quote }} + namespace: {{ .Values.namespace | quote }} + annotations: + haproxy.router.openshift.io/timeout: 60s + haproxy.router.openshift.io/rewrite-target: /help + name: "{{ .Chart.Name }}-{{ .Values.infocenterVersion }}" +spec: + host: {{ .Values.route.host | quote }} + path: "/{{ .Values.infocenterVersion }}" + port: + targetPort: "http" + tls: + insecureEdgeTerminationPolicy: "Redirect" + termination: "edge" + to: + kind: "Service" + name: "{{ .Chart.Name }}-{{ .Values.infocenterVersion }}" + weight: 100 diff --git a/infoCenter/charts/infocenter/templates/service.yaml b/infoCenter/charts/infocenter/templates/service.yaml new file mode 100644 index 0000000..3450898 --- /dev/null +++ b/infoCenter/charts/infocenter/templates/service.yaml @@ -0,0 +1,24 @@ +#******************************************************************************* +# Copyright (c) 2023 Eclipse Foundation and others. +# This program and the accompanying materials are made available +# under the terms of the Eclipse Public License 2.0 +# which is available at http://www.eclipse.org/legal/epl-v20.html, +# or the MIT License which is available at https://opensource.org/licenses/MIT. +# SPDX-License-Identifier: EPL-2.0 OR MIT +#******************************************************************************* +apiVersion: "v1" +kind: "Service" +metadata: + labels: + infocenter.version: {{ .Values.infocenterVersion | quote }} + namespace: {{ .Values.namespace | quote }} + name: "{{ .Chart.Name }}-{{ .Values.infocenterVersion }}" +spec: + type: {{ .Values.service.type }} + ports: + - name: "http" + port: {{ .Values.service.port }} + protocol: "TCP" + targetPort: {{ .Values.service.targetPort }} + selector: + infocenter.version: {{ .Values.infocenterVersion | quote }} diff --git a/infoCenter/charts/infocenter/values-2023-06.yaml b/infoCenter/charts/infocenter/values-2023-06.yaml new file mode 100644 index 0000000..a6f1e6c --- /dev/null +++ b/infoCenter/charts/infocenter/values-2023-06.yaml @@ -0,0 +1,20 @@ +# Default values for infocenter. + +namespace: infocenter +infocenterVersion: 2023-06 +replicaCount: 1 + +image: + repository: eclipsecbi/eclipse-infocenter + pullPolicy: IfNotPresent + tag: "2023-06@sha256:e4d89882e99a76e68bbdb5c8656076085cd003304179a9f47b0496eb19e8b929" + +service: + type: ClusterIP + port: 80 + targetPort: 8086 + +route: + host: help.eclipse.org + +affinity: {} diff --git a/infoCenter/charts/infocenter/values-2023-09.yaml b/infoCenter/charts/infocenter/values-2023-09.yaml new file mode 100644 index 0000000..e5e1e21 --- /dev/null +++ b/infoCenter/charts/infocenter/values-2023-09.yaml @@ -0,0 +1,20 @@ +# Default values for infocenter. + +namespace: infocenter +infocenterVersion: 2023-09 +replicaCount: 1 + +image: + repository: eclipsecbi/eclipse-infocenter + pullPolicy: IfNotPresent + tag: "2023-09@sha256:ea500dcb3ee2ccdee140109e56c01745135262e3ed17088675a423bc9903e033" + +service: + type: ClusterIP + port: 80 + targetPort: 8086 + +route: + host: help.eclipse.org + +affinity: {}