From a3eb139c439af033796aa22a14075f28e19c86b3 Mon Sep 17 00:00:00 2001 From: Javier Cortejoso Date: Tue, 22 Aug 2023 11:51:29 +0200 Subject: [PATCH 1/2] Undo shared template for delete pod cj --- charts/common/Chart.yaml | 2 +- charts/common/templates/_helpers.tpl | 97 ---------------------------- 2 files changed, 1 insertion(+), 98 deletions(-) diff --git a/charts/common/Chart.yaml b/charts/common/Chart.yaml index 57643c0d..63c78483 100644 --- a/charts/common/Chart.yaml +++ b/charts/common/Chart.yaml @@ -1,7 +1,7 @@ --- apiVersion: v2 name: common -version: 0.3.4 +version: 0.3.5 type: library home: https://celo.org icon: https://pbs.twimg.com/profile_images/1613170131491848195/InjXBNx9_400x400.jpg diff --git a/charts/common/templates/_helpers.tpl b/charts/common/templates/_helpers.tpl index 1b11f297..5b4c46a3 100644 --- a/charts/common/templates/_helpers.tpl +++ b/charts/common/templates/_helpers.tpl @@ -619,100 +619,3 @@ else ADDITIONAL_FLAGS="${ADDITIONAL_FLAGS} --ws --wsaddr $LISTEN_ADDRESS --wsorigins=* --wsapi=$RPC_APIS --wsport=$WS_PORT" fi {{- end }} - -{{- define "common.delete-pod-cronjob" -}} -{{- /* -This CronJob in intended to delete regularly a geth pod -in order to force geth to flush the data to disk, so it can -be used as an snapshot -*/}} -apiVersion: batch/v1 -kind: CronJob -metadata: - labels: - {{- include "common.standard.labels" . | nindent 4 }} - component: restart-geth - name: {{ template "common.fullname" . }}-restart-geth -spec: - concurrencyPolicy: Forbid - failedJobsHistoryLimit: 1 - jobTemplate: - spec: - backoffLimit: 1 - template: - metadata: - labels: - {{- include "common.standard.labels" . | nindent 12 }} - component: restart-geth - spec: - containers: - - name: restart-geth - command: - - /bin/sh - - -c - args: - - | - kubectl delete pod -n {{ .Release.Namespace }} {{ .podName }} - image: bitnami/kubectl:latest - imagePullPolicy: Always - terminationMessagePath: /dev/termination-log - terminationMessagePolicy: File - dnsPolicy: ClusterFirst - restartPolicy: Never - schedulerName: default-scheduler - serviceAccountName: {{ template "common.fullname" . }}-restart-geth - terminationGracePeriodSeconds: 30 - schedule: "{{ .schedule }}" - successfulJobsHistoryLimit: 3 - suspend: true ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - labels: - {{- include "common.standard.labels" . | nindent 4 }} - component: restart-geth - name: {{ template "common.fullname" . }}-restart-geth ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: Role -metadata: - labels: - {{- include "common.standard.labels" . | nindent 4 }} - component: restart-geth - name: {{ template "common.fullname" . }}-restart-geth -rules: -- apiGroups: - - "" - resources: - - namespaces - verbs: - - get -- apiGroups: - - "" - resources: - - pods - verbs: - - get - - list - - watch - - delete - - update - - patch ---- -apiVersion: rbac.authorization.k8s.io/v1 -kind: RoleBinding -metadata: - labels: - {{- include "common.standard.labels" . | nindent 4 }} - component: restart-geth - name: {{ template "common.fullname" . }}-restart-geth -roleRef: - apiGroup: rbac.authorization.k8s.io - kind: ClusterRole - name: {{ template "common.fullname" . }}-restart-geth -subjects: -- kind: ServiceAccount - name: {{ template "common.fullname" . }}-restart-geth - namespace: {{ .Release.Namespace }} -{{- end }} From 7e12ae35840433f0fe2ab02181f50f8363b322ce Mon Sep 17 00:00:00 2001 From: jcortejoso Date: Tue, 22 Aug 2023 09:53:55 +0000 Subject: [PATCH 2/2] [Automatic] - Update chart README.md --- charts/common/README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/charts/common/README.md b/charts/common/README.md index 871e1451..3f00ce09 100644 --- a/charts/common/README.md +++ b/charts/common/README.md @@ -2,7 +2,7 @@ Helm chart with helper templates and functions for Celo nodes. Import into your chart with `dependencies` and use the templates and functions -![Version: 0.3.4](https://img.shields.io/badge/Version-0.3.4-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) +![Version: 0.3.5](https://img.shields.io/badge/Version-0.3.5-informational?style=flat-square) ![Type: library](https://img.shields.io/badge/Type-library-informational?style=flat-square) - [common](#common) - [Chart releases](#chart-releases) @@ -23,7 +23,7 @@ To import this chart into your chart, add the following to your `requirements.ya dependencies: - name: common repository: oci://us-west1-docker.pkg.dev/celo-testnet/clabs-public-oci - version: 0.3.4 + version: 0.3.5 ``` ## Values