Skip to content

Commit 2ec7396

Browse files
authored
helm charts for k8s deployment (#59)
1 parent 8c5d7fb commit 2ec7396

39 files changed

+1768
-105
lines changed

.dockerignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,5 @@ docker-compose.override.yml
3030
docker-compose.dev.yml
3131
.dockerignore
3232
.gitignore
33-
*.patch
33+
*.patch
34+
TODO

.github/workflows/docker.yml

Lines changed: 44 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,28 @@ on:
44
push:
55
branches:
66
- main
7+
paths:
8+
- Dockerfile
9+
- .github/workflows/docker.yml
10+
- cron_entrypoint.sh
11+
# only build without pushing on PRs
712
pull_request:
13+
paths:
14+
- Dockerfile
15+
- .github/workflows/docker.yml
16+
- cron_entrypoint.sh
817
workflow_dispatch:
918
schedule:
1019
- cron: "0 0 * * *"
1120

1221
permissions:
1322
contents: read
1423

24+
# only allow one build at a time per branch
25+
concurrency:
26+
group: ci-${{ github.ref }}
27+
cancel-in-progress: true
28+
1529
env:
1630
DO_PUSH: ${{ github.ref == 'refs/heads/main' }} # do not push on PRs
1731

@@ -20,6 +34,17 @@ jobs:
2034
timeout-minutes: 80
2135
runs-on: ubuntu-latest
2236

37+
strategy:
38+
matrix:
39+
versions:
40+
- rt: "5.0.8"
41+
rtir: "5.0.8"
42+
- rt: "6.0.0"
43+
rtir: "5.0.8"
44+
- rt: "6.0.1"
45+
rtir: "6.0.1"
46+
latest: "true"
47+
2348
steps:
2449
- name: checkout sources
2550
uses: actions/checkout@v5
@@ -33,26 +58,22 @@ jobs:
3358
with:
3459
install: true
3560

36-
- name: Docker rt5 meta
37-
id: metart5
38-
uses: docker/metadata-action@v5
39-
with:
40-
images: firefart/requesttracker
41-
tags: |
42-
type=raw,value=5
43-
type=raw,value=5.0.8
44-
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=nightly-5-
45-
46-
- name: Docker rt6 meta
47-
id: metart6
61+
- name: Docker meta
62+
id: meta
4863
uses: docker/metadata-action@v5
4964
with:
5065
images: firefart/requesttracker
66+
flavor: |
67+
# disable setting the latest tag by default
68+
latest=false
5169
tags: |
52-
type=raw,value=latest
53-
type=raw,value=6
54-
type=raw,value=6.0.0
55-
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=nightly-
70+
# Enable latest tag if set
71+
type=raw,value=latest,enable=${{ matrix.versions.latest == 'true' }}
72+
# Create a tag for the major version
73+
type=semver,pattern={{major}},value=${{ matrix.versions.rt }}
74+
# Create a tag for the full version
75+
type=raw,value=${{ matrix.versions.rt }}
76+
type=schedule,pattern={{date 'YYYYMMDD'}},prefix=nightly-${{ matrix.versions.major }}-
5677
5778
- name: Login to Docker Hub
5879
uses: docker/login-action@v3.5.0
@@ -61,22 +82,16 @@ jobs:
6182
username: ${{ secrets.DOCKERHUB_USERNAME }}
6283
password: ${{ secrets.DOCKERHUB_TOKEN }}
6384

64-
- name: Build and push RT5
85+
- name: Build and push
6586
uses: docker/build-push-action@v6
6687
with:
6788
build-args: |
68-
RT_VERSION=5.0.8
69-
context: .
70-
file: Dockerfile
71-
push: ${{ env.DO_PUSH }}
72-
tags: ${{ steps.metart5.outputs.tags }}
73-
labels: ${{ steps.metart5.outputs.labels }}
74-
75-
- name: Build and push RT6
76-
uses: docker/build-push-action@v6
77-
with:
89+
RT_VERSION=${{ matrix.versions.rt }}
90+
RTIR_VERSION=${{ matrix.versions.rtir }}
7891
context: .
7992
file: Dockerfile
93+
sbom: true
94+
provenance: mode=max
8095
push: ${{ env.DO_PUSH }}
81-
tags: ${{ steps.metart6.outputs.tags }}
82-
labels: ${{ steps.metart6.outputs.labels }}
96+
tags: ${{ steps.meta.outputs.tags }}
97+
labels: ${{ steps.meta.outputs.labels }}

.github/workflows/hadolint.yml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: hadolint
2+
on:
3+
push:
4+
paths:
5+
- "**/Dockerfile"
6+
pull_request:
7+
workflow_dispatch:
8+
permissions:
9+
contents: read
10+
jobs:
11+
hadolint:
12+
name: hadolint
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v4
16+
- uses: hadolint/hadolint-action@v3.1.0
17+
with:
18+
dockerfile: Dockerfile
19+
# DL3007: Using latest is prone to errors if the image will ever update. Pin the version explicitly to a release tag
20+
# DL3018: Pin versions in apk add. Instead of `apk add <package>` use `apk add <package>=<version>`
21+
# DL3008: Pin versions in apt get install. Instead of `apt-get install <package>` use `apt-get install <package>=<version>`
22+
# DL3003: Use WORKDIR to switch to a directory
23+
ignore: DL3007,DL3008,DL3018,DL3003

.github/workflows/kubelint.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: kubelint
2+
on:
3+
push:
4+
paths:
5+
- "helm/**.yml"
6+
- "helm/**.yaml"
7+
pull_request:
8+
workflow_dispatch:
9+
permissions:
10+
contents: read
11+
jobs:
12+
kubelint:
13+
name: kubelint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: checkout
17+
uses: actions/checkout@v4
18+
19+
- name: Scan repo with kube-linter
20+
uses: stackrox/kube-linter-action@v1.0.7
21+
with:
22+
directory: helm

.github/workflows/yamllint.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: yamllint
2+
on:
3+
push:
4+
paths:
5+
- "**.yml"
6+
- "**.yaml"
7+
pull_request:
8+
workflow_dispatch:
9+
permissions:
10+
contents: read
11+
jobs:
12+
yamllint:
13+
name: yamllint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: karancode/yamllint-github-action@master
18+
with:
19+
# fail on warnings and errors
20+
yamllint_strict: true
21+
yamllint_config_filepath: ".yamllint.yml"

.gitignore

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
*.sh
22
!dev.sh
3+
!dev-helm.sh
34
!prod.sh
5+
!k8s-jobs/install-ingress.sh
46
RT_SiteConfig.pm
57
*.pem
68
*.key
7-
TODO
89
!dev.sh
910
!prod.sh
1011
!logs_prod.sh
@@ -28,4 +29,6 @@ shredder/*.sql
2829
*.pgpass
2930
*.json
3031
docker-compose.override.yml
31-
*.patch
32+
*.patch
33+
# Added by goreleaser init:
34+
dist/

.goreleaser.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
4+
# The lines below are called `modelines`. See `:help modeline`
5+
# Feel free to remove those if you don't want/need to use them.
6+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
8+
9+
version: 2
10+
11+
before:
12+
hooks:
13+
# You may remove this if you don't use go modules.
14+
- go mod tidy
15+
# you may remove this if you don't need go generate
16+
- go generate ./...
17+
18+
builds:
19+
- env:
20+
- CGO_ENABLED=0
21+
goos:
22+
- linux
23+
- windows
24+
- darwin
25+
26+
archives:
27+
- formats: [tar.gz]
28+
# this name template makes the OS and Arch compatible with the results of `uname`.
29+
name_template: >-
30+
{{ .ProjectName }}_
31+
{{- title .Os }}_
32+
{{- if eq .Arch "amd64" }}x86_64
33+
{{- else if eq .Arch "386" }}i386
34+
{{- else }}{{ .Arch }}{{ end }}
35+
{{- if .Arm }}v{{ .Arm }}{{ end }}
36+
# use zip for windows archives
37+
format_overrides:
38+
- goos: windows
39+
formats: [zip]
40+
41+
changelog:
42+
sort: asc
43+
filters:
44+
exclude:
45+
- "^docs:"
46+
- "^test:"

.kube-linter.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
checks:
2+
exclude:
3+
- latest-tag

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
README.md
2+
helm

.yamllint.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
extends: default
3+
4+
ignore:
5+
- helm/
6+
7+
rules:
8+
truthy: disable
9+
line-length: disable
10+
document-start: disable
11+
comments:
12+
min-spaces-from-content: 1

0 commit comments

Comments
 (0)