Skip to content

Commit

Permalink
helm: upgrade templates to support networking/v1 and batch/v1 API
Browse files Browse the repository at this point in the history
- sets minimal k8s version to 1.19 and maximum to <1.24.0-0;
- upgrades to traefik 10.3.4;
- updates templates to use batch/v1;
- updates templates to use networking/v1.

closes #482
  • Loading branch information
Vladyslav Moisieienkov authored and tiborsimko committed Feb 26, 2022
1 parent af75ac5 commit 942c8c6
Show file tree
Hide file tree
Showing 8 changed files with 26 additions and 45 deletions.
9 changes: 8 additions & 1 deletion CHANGES.rst
Original file line number Diff line number Diff line change
@@ -1,11 +1,18 @@
Changes
=======

Version 0.9.0 (UNRELEASED)
--------------------------

- Administrators:
- Adds support for Kubernetes version 1.22 and 1.23 clusters.
- Removes support for Kubernetes version prior to 1.19.

Version 0.8.2 (UNRELEASED)
--------------------------

- Administrators:
- Adds configuration environment variable, ``reana_server.environment.REANA_SCHEDULER_REQUEUE_COUNT``, to set requeue count for submitted workflows in case of scheduling error or busy cluster.
- Adds new configuration environment variable ``reana_server.environment.REANA_SCHEDULER_REQUEUE_COUNT`` to set workflow requeue count in case of scheduling errors or busy cluster situations.

Version 0.8.1 (2022-02-15)
--------------------------
Expand Down
6 changes: 3 additions & 3 deletions helm/reana/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ keywords:
type: application
# Chart version.
version: 0.8.1
kubeVersion: ">= 1.13.0-0 < 1.22.0-0"
kubeVersion: ">= 1.19.0-0 < 1.24.0-0"
dependencies:
- name: traefik
version: 1.85.x
repository: https://charts.helm.sh/stable
version: 10.3.4
repository: https://helm.traefik.io/traefik
condition: traefik.enabled
tags:
- ingress
4 changes: 2 additions & 2 deletions helm/reana/templates/cronjobs.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{{- if .Values.notifications.enabled }}
{{- if .Values.notifications.system_status }}
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "reana.prefix" . }}-system-status
Expand Down Expand Up @@ -107,7 +107,7 @@ spec:
{{- end }}
---
{{- if and .Values.quota.enabled (tpl .Values.quota.periodic_update_policy .) }}
apiVersion: batch/v1beta1
apiVersion: batch/v1
kind: CronJob
metadata:
name: {{ include "reana.prefix" . }}-resource-quota-update
Expand Down
26 changes: 0 additions & 26 deletions helm/reana/templates/ingress.yaml
Original file line number Diff line number Diff line change
@@ -1,11 +1,4 @@
{{- if .Values.ingress.enabled }}
{{- 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: {{ include "reana.prefix" . }}-ingress
Expand All @@ -19,47 +12,28 @@ spec:
- http:
paths:
- path: /api
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
name: {{ include "reana.prefix" . }}-server
port:
number: 80
{{- else }}
backend:
serviceName: {{ include "reana.prefix" . }}-server
servicePort: 80
{{- end }}
- path: /oauth
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
name: {{ include "reana.prefix" . }}-server
port:
number: 80
{{- else }}
backend:
serviceName: {{ include "reana.prefix" . }}-server
servicePort: 80
{{- end }}
{{- if .Values.components.reana_ui.enabled }}
- path: /
{{- if semverCompare ">=1.19-0" .Capabilities.KubeVersion.GitVersion }}
pathType: Prefix
backend:
service:
name: {{ include "reana.prefix" . }}-ui
port:
number: 80
{{- else }}
backend:
serviceName: {{ include "reana.prefix" . }}-ui
servicePort: 80
{{- end }}
{{- end }}
{{- if .Values.reana_hostname }}
host: {{ .Values.reana_hostname }}
{{- end }}
{{- end }}
4 changes: 2 additions & 2 deletions helm/reana/templates/roles.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@ rules:
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses"]
verbs: ["*"]
- apiGroups: ["batch", "extensions"]
- apiGroups: ["batch", "networking.k8s.io"]
resources: ["jobs"]
verbs: ["get", "list", "watch", "create", "update", "patch", "delete"]
# Interactive web notebooks permissions
- apiGroups: ["", "extensions", "apps", "networking.k8s.io"]
- apiGroups: ["", "apps", "networking.k8s.io"]
resources: ["deployments", "services", "ingresses"]
verbs: ["get", "create", "delete"]
# Metrics (`kubectl top node/pod`)
Expand Down
18 changes: 9 additions & 9 deletions helm/reana/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -119,19 +119,19 @@ serviceAccount:

# Traefik's chart values.yaml
traefik:
ports:
web:
nodePort: 30080
websecure:
nodePort: 30443
tls:
# without additional configs will use default insecure one
enabled: true
enabled: true
rbac:
enabled: true
dashboard:
enabled: true
serviceType: NodePort
service:
nodePorts:
http: 30080
https: 30443
ssl:
enabled: true
generateTLS: true
type: NodePort

# Quota
quota:
Expand Down
2 changes: 1 addition & 1 deletion reana/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@

from __future__ import absolute_import, print_function

__version__ = "0.8.1"
__version__ = "0.9.0a1"
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
history = open("CHANGES.rst").read()

tests_require = [
"pytest-reana>=0.8.1,<0.9.0",
"pytest-reana>=0.9.0a2,<0.10.0",
]

extras_require = {
Expand Down

0 comments on commit 942c8c6

Please sign in to comment.