Skip to content

Commit

Permalink
Add manifest for estimator
Browse files Browse the repository at this point in the history
Signed-off-by: John Strunk <[email protected]>
  • Loading branch information
JohnStrunk committed Jun 5, 2024
1 parent 3d0bb04 commit 26ef54c
Show file tree
Hide file tree
Showing 4 changed files with 78 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/renovate.json5
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
},
"kubernetes": {
"fileMatch": [
"^jira-summarizer\\.yaml$"
"^jira-summarizer\\.yaml$",
"^jira-estimator\\.yaml$"
]
},
"packageRules": [
Expand Down
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ def main() -> None: # pylint: disable=too-many-locals,too-many-statements
"--modified-since",
type=str,
default="2024-01-01",
help="Summarize issues that have been modified since this date/time",
help="Summarize issues that have been modified since this date/time (YYYY-MM-DD)",
)
parser.add_argument(
"-n",
Expand Down
73 changes: 73 additions & 0 deletions jira-estimator.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: jira-estimator-pvc
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi

---
apiVersion: apps/v1
kind: Deployment
metadata:
name: jira-estimator
labels:
app: jira-estimator
spec:
replicas: 1
selector:
matchLabels:
app: jira-estimator
strategy:
type: Recreate
template:
metadata:
labels:
app: jira-estimator
spec:
containers:
- name: estimator
image: ghcr.io/johnstrunk/jira-summarizer:1.2.1
command:
- "/app/.venv/bin/python"
- "estimator.py"
args:
- "--log-level"
- "INFO"
- "--seconds"
- "1800"
- "--window"
- "300"
- "--output"
- "/data/estimates.csv"
envFrom:
- secretRef:
name: jira-summarizer-secret
optional: false
resources:
requests:
memory: "64Mi"
cpu: "10m"
limits:
memory: "512Mi"
cpu: "1000m"
securityContext:
allowPrivilegeEscalation: false
capabilities:
drop:
- ALL
readOnlyRootFilesystem: true
volumeMounts:
- name: data
mountPath: "/data"
securityContext:
runAsNonRoot: true
terminationGracePeriodSeconds: 5
volumes:
- name: data
persistentVolumeClaim:
claimName: jira-estimator-pvc
2 changes: 2 additions & 0 deletions jira-summarizer.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ spec:
- "INFO"
- "--seconds"
- "120"
- "--modified-since"
- "2024-06-03"
envFrom:
- secretRef:
name: jira-summarizer-secret
Expand Down

0 comments on commit 26ef54c

Please sign in to comment.