Skip to content

Commit 3182033

Browse files
authored
Merge pull request #16 from bryopsida/14-configurable-cron-for-check-interval
Add configurable cron for update checks
2 parents fdc19f3 + b4d342e commit 3182033

File tree

6 files changed

+83
-4
lines changed

6 files changed

+83
-4
lines changed

charts/patchwork/Chart.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ apiVersion: v2
22
name: patchwork
33
description: A Helm chart for Kubernetes
44
type: application
5-
version: 0.2.2
5+
version: 0.3.0
66
appVersion: '0.1.0'
77
dependencies:
88
- name: redis

charts/patchwork/README.md

+70
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# patchwork
2+
3+
![Version: 0.3.0](https://img.shields.io/badge/Version-0.3.0-informational?style=flat-square) ![Type: application](https://img.shields.io/badge/Type-application-informational?style=flat-square) ![AppVersion: 0.1.0](https://img.shields.io/badge/AppVersion-0.1.0-informational?style=flat-square)
4+
5+
A Helm chart for Kubernetes
6+
7+
## Maintainers
8+
9+
| Name | Email | Url |
10+
| ---- | ------ | --- |
11+
| bryopsida | | |
12+
13+
## Requirements
14+
15+
| Repository | Name | Version |
16+
|------------|------|---------|
17+
| https://groundhog2k.github.io/helm-charts/ | redis | 0.6.12 |
18+
19+
## Values
20+
21+
| Key | Type | Default | Description |
22+
|-----|------|---------|-------------|
23+
| affinity | object | `{}` | |
24+
| autoscaling.enabled | bool | `false` | |
25+
| autoscaling.maxReplicas | int | `100` | |
26+
| autoscaling.minReplicas | int | `1` | |
27+
| autoscaling.targetCPUUtilizationPercentage | int | `80` | |
28+
| fullnameOverride | string | `""` | |
29+
| image.pullPolicy | string | `"Always"` | |
30+
| image.repository | string | `"ghcr.io/bryopsida/patchwork"` | |
31+
| image.tag | string | `"main"` | |
32+
| imagePullSecrets | list | `[]` | |
33+
| ingress.annotations | object | `{}` | |
34+
| ingress.className | string | `""` | |
35+
| ingress.enabled | bool | `false` | |
36+
| ingress.hosts[0].host | string | `"chart-example.local"` | |
37+
| ingress.hosts[0].paths[0].path | string | `"/"` | |
38+
| ingress.hosts[0].paths[0].pathType | string | `"ImplementationSpecific"` | |
39+
| ingress.tls | list | `[]` | |
40+
| nameOverride | string | `""` | |
41+
| nodeSelector | object | `{}` | |
42+
| podAnnotations | object | `{}` | |
43+
| podSecurityContext.fsGroup | int | `1001` | |
44+
| podSecurityContext.seccompProfile.type | string | `"RuntimeDefault"` | |
45+
| rbac.create | string | `"truewq"` | |
46+
| redis.image.pullPolicy | string | `"Always"` | |
47+
| redis.image.registry | string | `"ghcr.io"` | |
48+
| redis.image.repository | string | `"bryopsida/redis"` | |
49+
| redis.image.tag | string | `"main"` | |
50+
| replicaCount | int | `1` | |
51+
| resources.limits.cpu | string | `"500m"` | |
52+
| resources.limits.memory | string | `"256Mi"` | |
53+
| resources.requests.cpu | string | `"250m"` | |
54+
| resources.requests.memory | string | `"256Mi"` | |
55+
| securityContext.allowPrivilegeEscalation | bool | `false` | |
56+
| securityContext.capabilities.drop[0] | string | `"ALL"` | |
57+
| securityContext.privileged | bool | `false` | |
58+
| securityContext.readOnlyRootFilesystem | bool | `true` | |
59+
| securityContext.runAsNonRoot | bool | `true` | |
60+
| securityContext.runAsUser | int | `1001` | |
61+
| service.port | int | `3000` | |
62+
| service.type | string | `"ClusterIP"` | |
63+
| serviceAccount.annotations | object | `{}` | |
64+
| serviceAccount.create | bool | `true` | |
65+
| serviceAccount.name | string | `""` | |
66+
| tolerations | list | `[]` | |
67+
| updateCron | string | `"*/30 * * * *"` | |
68+
69+
----------------------------------------------
70+
Autogenerated from chart metadata using [helm-docs v1.11.0](https://github.com/norwoodj/helm-docs/releases/v1.11.0)

charts/patchwork/templates/dotenv.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ stringData:
88
.env: |-
99
PATCHWORK_REDIS_HOST={{ default (printf "%s-redis.%s.svc" .Release.Name .Release.Namespace) .Values.redis.host }}
1010
PATCHWORK_REDIS_PORT={{ default "6379" .Values.redis.port | int }}
11+
PATCHWORK_UPDATE_CRON={{ .Values.updateCron }}
1112
1213
{{- end }}

charts/patchwork/values.yaml

+9-1
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,10 @@ imagePullSecrets: []
1313
nameOverride: ''
1414
fullnameOverride: ''
1515

16+
# - The cron string for update check frequency
17+
updateCron: '*/30 * * * *'
1618
rbac:
17-
# if set, the chart will create a clusterrole and rolebinding to give it the permissions its needs
19+
# - if set, the chart will create a clusterrole and rolebinding to give it the permissions its needs
1820
create: truewq
1921
serviceAccount:
2022
# Specifies whether a service account should be created
@@ -83,3 +85,9 @@ nodeSelector: {}
8385
tolerations: []
8486

8587
affinity: {}
88+
redis:
89+
image:
90+
registry: ghcr.io
91+
repository: bryopsida/redis
92+
tag: main
93+
pullPolicy: Always

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "patchwork",
3-
"version": "0.0.1",
3+
"version": "0.1.0",
44
"description": "",
55
"author": "",
66
"private": true,

src/analyzer/task-register.service.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ export class TaskRegisterService {
1919
{},
2020
{
2121
repeat: {
22-
every: 120000,
22+
cron: process.env.PATCHWORK_UPDATE_CRON ?? '*/30 * * * *',
2323
},
2424
attempts: -1,
2525
backoff: {

0 commit comments

Comments
 (0)