Skip to content

Commit d5fe8fa

Browse files
Make API container fully stateless and independent of frontend (#8708)
* configure dev pipeline to use kong gateway * fix make run and use kong gateway to expose dashboard * update auth service and web * add todo * update web serve * skip posinstall for dev serve * build api in docker * build apps in docker to simplify docker handling and release pipeline * remove plugins * fix run/serve * add common client * move settings to web container * make api fully stateless and use common client * refactor * refactor settings * refactor settings * fix api unit tests * minor updates * refactor api types and helpers into common packages * fix serve and update angular proxy config * multiple fixes * fix patch * add version endpoint to be used in footer * refactor pinned resources * fix pinned resources * rename * add version support to module dockerfiles and fix locale handler * keep only token auth * make fix * update workflows * run go lint for the whole project * Refactor csrf protection handling * fix autologout on token expiration * update login guard * do not log sensitive data for lower log levels * fix some cross-site scripting issues * add noopener and noreferer to missing external links * fix i18n and angular checks * update checks * fix checks * fix tests * make fix & yarn fix * fix APILogLevel getter * clean up build pipeline * fix static check * fix int conversion issue * fix codecov * Remove single yaml installation * update helm ci/cd * fix helm ci * fix helm ci * fix helm ci * fix helm ci * fix helm ci * fix helm ci * fix codecov * bump codecov and use correct token * fix web unit tests * fix static check * fix web ts check * update workflows * clean helm workflow * disable cd until fixed * update docs * use eslint directly, without gts * use prettier for stylesheets formatting * use prettier for html formatting * update dependencies * update documentation * update overview image * remove file * fix web build * fix i18n and scss * fix scss * fix static check --------- Co-authored-by: Marcin Maciaszczyk <[email protected]>
1 parent 2878d15 commit d5fe8fa

File tree

663 files changed

+28270
-28573
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

663 files changed

+28270
-28573
lines changed

.codecov.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@
1313
# limitations under the License.
1414
#
1515
codecov:
16-
notify:
17-
require_ci_to_pass: yes
16+
require_ci_to_pass: true
1817

1918
coverage:
2019
precision: 2

charts/helm-chart/.helm-chart-testing.yaml renamed to .ct.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,11 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414
#
15-
chart-dirs:
16-
- charts/helm-chart
15+
1716
chart-repos:
1817
- metrics-server=https://kubernetes-sigs.github.io/metrics-server/
1918
- cert-manager=https://charts.jetstack.io
2019
- ingress-nginx=https://kubernetes.github.io/ingress-nginx
2120
debug: false
2221
# additional-commands:
23-
# - helm kubeconform {{ .Path }} --config charts/helm-chart/.kubeconforma
22+
# - helm kubeconform {{ .Path }} --config charts/helm-chart/.kubeconform

hack/gateway/Dockerfile renamed to .dockerignore

+5-5
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@
1111
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
14-
#
15-
FROM nginx
1614

17-
COPY hack/gateway/config /etc/nginx
18-
COPY .dist/certificates/private.key /etc/ssl/private/localhost.key
19-
COPY .dist/certificates/public.crt /etc/ssl/certs/localhost.crt
15+
# Web module
16+
modules/web/.angular/
17+
modules/web/node_modules/
18+
modules/web/dist/
19+
modules/web/tmp/

.github/workflows/cd-helm.yml

+62-49
Original file line numberDiff line numberDiff line change
@@ -12,52 +12,65 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: CD / Helm
16-
on:
17-
push:
18-
branches: [master]
19-
paths:
20-
- "charts/helm-chart/**"
21-
- "hack/scripts/helm-release-chart.sh"
22-
- ".github/workflows/cd-helm.yml"
23-
permissions:
24-
contents: write
25-
pull-requests: write
26-
jobs:
27-
release:
28-
name: Helm chart release
29-
runs-on: ubuntu-latest
30-
steps:
31-
- name: Check out repository
32-
uses: actions/checkout@v4
33-
with:
34-
fetch-depth: 0
35-
36-
- name: Set up Git user
37-
run: |
38-
git config user.name "$GITHUB_ACTOR"
39-
git config user.email "[email protected]"
40-
41-
- name: Release new Helm chart
42-
shell: bash
43-
run: hack/scripts/helm-release-chart.sh
44-
env:
45-
TERM: xterm-256color
46-
47-
- name: Check out gh-pages-pull-request branch # It will fail if branch already exists
48-
run: git checkout -b gh-pages-pull-request
49-
50-
- name: Push changes to gh-pages-pull-request branch # It will silently fail if pull request already exists
51-
uses: ad-m/[email protected]
52-
with:
53-
github_token: ${{ secrets.GITHUB_TOKEN }}
54-
branch: gh-pages-pull-request
55-
56-
- name: Create pull request
57-
uses: repo-sync/pull-request@v2
58-
with:
59-
github_token: ${{ secrets.GITHUB_TOKEN }}
60-
source_branch: gh-pages-pull-request
61-
destination_branch: gh-pages
62-
pr_title: "Update Helm repository"
63-
pr_body: "Automatically created from Helm CD workflow."
15+
# TODO: Enable once helm chart is updated
16+
#name: CD / Helm
17+
#
18+
#on:
19+
# push:
20+
# branches: [ master ]
21+
#
22+
#jobs:
23+
# lint-test:
24+
# name: Lint and test
25+
# runs-on: ubuntu-latest
26+
# steps:
27+
# - uses: actions/[email protected]
28+
# with:
29+
# fetch-depth: 0
30+
# - uses: azure/[email protected]
31+
# with:
32+
# version: v3.12.1
33+
# - uses: helm/[email protected]
34+
# - id: list-changed
35+
# run: |
36+
# changed=$(ct list-changed --config=.ct.yml --target-branch ${{ github.event.repository.default_branch }})
37+
# if [[ -n "$changed" ]]; then
38+
# echo "changed=true" >> "$GITHUB_OUTPUT"
39+
# fi
40+
# - if: steps.list-changed.outputs.changed == 'true'
41+
# run: ct lint --config=.ct.yml --target-branch ${{ github.event.repository.default_branch }}
42+
# - if: steps.list-changed.outputs.changed == 'true'
43+
# uses: helm/[email protected]
44+
# with:
45+
# node_image: kindest/node:v1.29.0
46+
# - if: steps.list-changed.outputs.changed == 'true'
47+
# run: ct install --target-branch ${{ github.event.repository.default_branch }}
48+
#
49+
# release:
50+
# name: Helm chart release
51+
# runs-on: ubuntu-latest
52+
# needs: [ 'lint-test' ]
53+
# permissions:
54+
# contents: write
55+
# steps:
56+
# - name: Check out repository
57+
# uses: actions/[email protected]
58+
# with:
59+
# fetch-depth: 0
60+
#
61+
# - name: Set up Git user
62+
# run: |
63+
# git config user.name "$GITHUB_ACTOR"
64+
# git config user.email "[email protected]"
65+
#
66+
# - name: Set up Helm
67+
# uses: azure/[email protected]
68+
# with:
69+
# version: v3.12.1
70+
#
71+
# - name: Run chart-releaser
72+
# uses: helm/[email protected]
73+
# with:
74+
# skip_existing: true
75+
# env:
76+
# CR_TOKEN: "${{ secrets.GITHUB_TOKEN }}"

.github/workflows/cd.yml

+73-72
Original file line numberDiff line numberDiff line change
@@ -12,75 +12,76 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
name: CD
16-
on:
17-
push:
18-
branches: [master]
19-
create:
20-
tags:
21-
- "v*.*.*"
22-
permissions:
23-
contents: read
24-
packages: write
25-
env:
26-
GOPATH: /home/runner/go/
27-
GOPROXY: "https://proxy.golang.org"
28-
NG_CLI_ANALYTICS: ci
29-
NODE_OPTIONS: "--max-old-space-size=8192"
30-
TERM: xterm
31-
jobs:
32-
release:
33-
name: Release
34-
runs-on: ubuntu-latest
35-
steps:
36-
- name: Check out repository
37-
uses: actions/checkout@v4
38-
with:
39-
fetch-depth: 0
40-
41-
- name: Set up Go
42-
uses: actions/setup-go@v5
43-
with:
44-
go-version-file: modules/api/go.mod
45-
check-latest: true
46-
cache-dependency-path: modules/api/go.sum
47-
48-
- name: Install API dependencies
49-
working-directory: modules/api
50-
run: go mod download
51-
52-
- name: Set up Node.js
53-
uses: actions/setup-node@v4
54-
with:
55-
node-version: 18.14.0
56-
57-
- name: Install web dependencies
58-
working-directory: modules/web
59-
run: yarn
60-
61-
- name: Set up QEMU
62-
uses: docker/[email protected]
63-
64-
- name: Set up Docker Buildx
65-
uses: docker/[email protected]
66-
67-
- name: Log in to Docker Hub
68-
uses: docker/[email protected]
69-
with:
70-
username: ${{ secrets.DOCKER_RELEASE_USER }}
71-
password: ${{ secrets.DOCKER_RELEASE_PASS }}
72-
73-
- name: Log in to GitHub Container Registry
74-
uses: docker/[email protected]
75-
with:
76-
registry: ghcr.io
77-
username: ${{ github.actor }}
78-
password: ${{ secrets.GITHUB_TOKEN }}
79-
80-
- name: Build and deploy development release
81-
if: github.event_name == 'push' && contains(github.ref, 'master')
82-
run: PATH=$PATH:$GOPATH/bin make deploy-dev
83-
84-
- name: Build and deploy official release
85-
if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
86-
run: PATH=$PATH:$GOPATH/bin make deploy
15+
# TODO: Release pipeline needs to be updated to work with architecture changes
16+
#name: CD
17+
#on:
18+
# push:
19+
# branches: [master]
20+
# create:
21+
# tags:
22+
# - "v*.*.*"
23+
#permissions:
24+
# contents: read
25+
# packages: write
26+
#env:
27+
# GOPATH: /home/runner/go/
28+
# GOPROXY: "https://proxy.golang.org"
29+
# NG_CLI_ANALYTICS: ci
30+
# NODE_OPTIONS: "--max-old-space-size=8192"
31+
# TERM: xterm
32+
#jobs:
33+
# release:
34+
# name: Release
35+
# runs-on: ubuntu-latest
36+
# steps:
37+
# - name: Check out repository
38+
# uses: actions/checkout@v4
39+
# with:
40+
# fetch-depth: 0
41+
#
42+
# - name: Set up Go
43+
# uses: actions/setup-go@v5
44+
# with:
45+
# go-version-file: modules/api/go.mod
46+
# check-latest: true
47+
# cache-dependency-path: modules/api/go.sum
48+
#
49+
# - name: Install API dependencies
50+
# working-directory: modules/api
51+
# run: go mod download
52+
#
53+
# - name: Set up Node.js
54+
# uses: actions/setup-node@v4
55+
# with:
56+
# node-version: 18.14.0
57+
#
58+
# - name: Install web dependencies
59+
# working-directory: modules/web
60+
# run: yarn
61+
#
62+
# - name: Set up QEMU
63+
# uses: docker/[email protected]
64+
#
65+
# - name: Set up Docker Buildx
66+
# uses: docker/[email protected]
67+
#
68+
# - name: Log in to Docker Hub
69+
# uses: docker/[email protected]
70+
# with:
71+
# username: ${{ secrets.DOCKER_RELEASE_USER }}
72+
# password: ${{ secrets.DOCKER_RELEASE_PASS }}
73+
#
74+
# - name: Log in to GitHub Container Registry
75+
# uses: docker/[email protected]
76+
# with:
77+
# registry: ghcr.io
78+
# username: ${{ github.actor }}
79+
# password: ${{ secrets.GITHUB_TOKEN }}
80+
#
81+
# - name: Build and deploy development release
82+
# if: github.event_name == 'push' && contains(github.ref, 'master')
83+
# run: PATH=$PATH:$GOPATH/bin make deploy-dev
84+
#
85+
# - name: Build and deploy official release
86+
# if: github.event_name == 'create' && startsWith(github.ref, 'refs/tags/v')
87+
# run: PATH=$PATH:$GOPATH/bin make deploy

0 commit comments

Comments
 (0)