Skip to content
Merged

Test #89

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/workflows/kube-linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Kube-Linter

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: read

jobs:
linting:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Scan repo with kube-linter
uses: stackrox/kube-linter-action@v1.0.4
with:
directory: helm-chart
2 changes: 1 addition & 1 deletion helm-chart/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ name: hivebox
description: A Helm chart for HiveBox application
type: application
version: 0.1.0
appVersion: "0.7.0"
appVersion: "0.7.1"
4 changes: 4 additions & 0 deletions helm-chart/templates/cronjob.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,10 @@ spec:
sleep 5
fi
done
securityContext:
{{- include "common.containerSecurityContext" . | nindent 16 }}
resources:
{{- include "common.resources" (dict "Values" .Values "name" "cronjob") | nindent 16 }}
containers:
- name: temperature-storage
image: {{ .Values.images.cronjob }}
Expand Down
14 changes: 14 additions & 0 deletions helm-chart/templates/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,20 @@ spec:
labels:
app: hivebox
spec:
{{- if gt (int .Values.replicas.hivebox) 1 }}
affinity:
podAntiAffinity:
preferredDuringSchedulingIgnoredDuringExecution:
- weight: 100
podAffinityTerm:
labelSelector:
matchExpressions:
- key: app
operator: In
values:
- hivebox
topologyKey: kubernetes.io/hostname
{{- end }}
securityContext:
{{- include "common.podSecurityContext" . | nindent 8 }}
containers:
Expand Down
2 changes: 1 addition & 1 deletion kustomize/base/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ spec:
runAsGroup: 1000
containers:
- name: hivebox
image: ghcr.io/gabrielpalmar/hivebox:latest@sha256:c731999c3fd9b757e2fd816e3c9dcf645dba56647d8a921cb567ece3cf378dc3
image: ghcr.io/gabrielpalmar/hivebox:0.7.1@sha256:c731999c6fac6f2f17f746aea7fafe073cf608c49729eb1e189ecf3551c62646
ports:
- containerPort: 5000
env:
Expand Down
2 changes: 1 addition & 1 deletion kustomize/overlays/prod/deployment-patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
spec:
containers:
- name: hivebox
image: ghcr.io/gabrielpalmar/hivebox:0.7.0
image: ghcr.io/gabrielpalmar/hivebox:0.7.1@sha256:c731999c6fac6f2f17f746aea7fafe073cf608c49729eb1e189ecf3551c62646
2 changes: 1 addition & 1 deletion kustomize/overlays/staging/deployment-patch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ spec:
spec:
containers:
- name: hivebox
image: ghcr.io/gabrielpalmar/hivebox:0.7.0@sha256:c731999c3fd9b757e2fd816e3c9dcf645dba56647d8a921cb567ece3cf378dc3
image: ghcr.io/gabrielpalmar/hivebox:0.7.1@sha256:c731999c6fac6f2f17f746aea7fafe073cf608c49729eb1e189ecf3551c62646