Skip to content

Commit

Permalink
Merge branch 'master' into feat/ci-ns-fallback
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo authored Jul 24, 2023
2 parents df13090 + a99a896 commit 65a636e
Show file tree
Hide file tree
Showing 71 changed files with 298 additions and 186 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy-via-github/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/socialgouv/kontinuous:v1.159.4
FROM ghcr.io/socialgouv/kontinuous:v1.159.5

COPY entrypoint.sh /entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-via-github/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ inputs:
runs:
using: docker
# image: Dockerfile
image: docker://ghcr.io/socialgouv/kontinuous/deploy-via-github:v1.159.4
image: docker://ghcr.io/socialgouv/kontinuous/deploy-via-github:v1.159.5
env:
KS_ENVIRONMENT: ${{ inputs.environment }}
KS_CHART: ${{ inputs.chart }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-via-webhook/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/socialgouv/kontinuous:v1.159.4 as base
FROM ghcr.io/socialgouv/kontinuous:v1.159.5 as base

USER 0

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-via-webhook/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ inputs:
runs:
using: docker
# image: Dockerfile
image: docker://ghcr.io/socialgouv/kontinuous/deploy-via-webhook:v1.159.4
image: docker://ghcr.io/socialgouv/kontinuous/deploy-via-webhook:v1.159.5
env:
KS_WEBHOOK_TOKEN: ${{ inputs.webhookToken }}
KS_WEBHOOK_URI: ${{ inputs.webhookUri }}
Expand Down
2 changes: 1 addition & 1 deletion .github/actions/deploy-via-webhook/kontinuousVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ghcr.io/socialgouv/kontinuous:v1.159.4
ghcr.io/socialgouv/kontinuous:v1.159.5
2 changes: 1 addition & 1 deletion .github/actions/env/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM ghcr.io/socialgouv/kontinuous:v1.159.4
FROM ghcr.io/socialgouv/kontinuous:v1.159.5

COPY entrypoint.sh /entrypoint.sh

Expand Down
2 changes: 1 addition & 1 deletion .github/actions/env/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ inputs:
runs:
using: docker
# image: Dockerfile
image: docker://ghcr.io/socialgouv/kontinuous/env:v1.159.4
image: docker://ghcr.io/socialgouv/kontinuous/env:v1.159.5
env:
KS_GIT_BRANCH: ${{ inputs.branch }}
KSENV_REPOSITORY_NAME: ${{ inputs.repositoryName }}
Expand Down
2 changes: 1 addition & 1 deletion .github/kontinuousVersion
Original file line number Diff line number Diff line change
@@ -1 +1 @@
ghcr.io/socialgouv/kontinuous:v1.159.4
ghcr.io/socialgouv/kontinuous:v1.159.5
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

All notable changes to this project will be documented in this file. See [commit-and-tag-version](https://github.com/absolute-version/commit-and-tag-version) for commit guidelines.

## 1.159.5 (2023-07-24)

## 1.159.4 (2023-07-24)

## 1.159.3 (2023-07-24)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
kontinuous-webhook:
image: ghcr.io/socialgouv/kontinuous/webhook:v1.159.4
image: ghcr.io/socialgouv/kontinuous/webhook:v1.159.5
# image: harbor.fabrique.social.gouv.fr/sre/kontinuous/webhook:1
host: "kontinuous.fabrique.social.gouv.fr"

Expand Down
4 changes: 2 additions & 2 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ services:
KUBEWEBHOOK_CONFIG_PATH: config.sample.yaml
KUBEWEBHOOK_SUPERTOKEN: ${KUBEWEBHOOK_SUPERTOKEN:-1234}
KUBEWEBHOOK_EXPOSED_PORT: ${KUBEWEBHOOK_EXPOSED_PORT:-7530}
KUBEWEBHOOK_PIPELINE_IMAGE: ${KUBEWEBHOOK_PIPELINE_IMAGE:-"ghcr.io/socialgouv/kontinuous:v1.159.4"}
KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE: ${KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE:-"ghcr.io/socialgouv/kontinuous/degit:v1.159.4"}
KUBEWEBHOOK_PIPELINE_IMAGE: ${KUBEWEBHOOK_PIPELINE_IMAGE:-"ghcr.io/socialgouv/kontinuous:v1.159.5"}
KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE: ${KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE:-"ghcr.io/socialgouv/kontinuous/degit:v1.159.5"}
KUBEWEBHOOK_CI_NAMESPACE_ALLOW_ALL: ${KUBEWEBHOOK_CI_NAMESPACE_ALLOW_ALL:-"true"}
KUBEWEBHOOK_HTTPLOGGER_IGNOREUSERAGENTS: backbox-robot
KUBEWEBHOOK_SENTRY_DSN: ${KUBEWEBHOOK_SENTRY_DSN}
Expand Down
120 changes: 115 additions & 5 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@ We want a full portable and sef-hostable solution from repositories, to CI/CD.

see [🐉 paradigm](./advanced/paradigm.md) for more detailed explanation.

## Define a custom docker registry

[TODO]

## Disable some plugin

In your `.kontinuous/config.yaml` :
Expand All @@ -30,6 +26,120 @@ dependencies:
See [kontinuous configuration](/advanced/configuration)
## Add custom ingress annotations
NGINX ingress [allows various annotations](https://docs.nginx.com/nginx-ingress-controller/configuration/ingress-resources/advanced-configuration-with-annotations/) : rate-limiting, headers...
To add custom ingress annotations to your app :
```yaml
# .kontinuous/values.yaml

app:
ingress:
annotations:
nginx.ingress.kubernetes.io/proxy-body-size: 512m
nginx.ingress.kubernetes.io/configuration-snippet: |
more_set_headers "X-Frame-Options: deny";
more_set_headers "X-XSS-Protection: 1; mode=block";
```
## Add additionnal build-args on some environment
For example in `.kontinuous/env/prod/values.yaml` :

```yaml
# .kontinuous/values.yaml
jobs:
runs:
build-app:
with:
buildArgs:
PRODUCTION: "true"
```

## Create some database

This will create a postgres cluster with an `app` user `app` database. Database secrets will be provisionned in the `pg-xxx-app` secret.

```yaml
# .kontinuous/values.yaml
# create a PG cluster
pg-xxx:
~chart: pg
cnpg-cluster:
# see https://github.com/SocialGouv/helm-charts/blob/main/charts/cnpg-cluster
monitoring:
~tpl~enablePodMonitor: "true"
app:
# Wait for DB cluster to be ready
~needs: ["pg-xxx"]
# Attach generated PG credentials to your app
envFrom:
- secretRef:
name: pg-xxx-app
```

## Add a custom HELM chart

To add a custom HELM chart to your deployment :

Add a `.kontinuous/Chart.yaml` with HELM dependencies:

```yaml
dependencies:
- name: keycloakx
repository: https://codecentric.github.io/helm-charts
version: 2.1.0
condition: keycloakx.enabled
```

In `.kontinuous/values.yaml` define your HELM values as usual :

```yaml
keycloakx:
~needs: ["pg-keycloak"]
database:
vendor: postgres
```

## Build and deploy multiple docker images

In `.kontinuous/values.yaml` :

```yaml
app:
~chart: app
~needs: [build-app, api]
imagePackage: app
api:
~chart: app
~needs: [build-api]
imagePackage: api
jobs:
~chart: jobs
runs:
build-app:
use: build
with:
imagePackage: app
context: packages/app
build-api:
use: build
with:
imagePackage: api
context: packages/api
```

## Define a custom docker registry

[TODO]

## Local dev

[TODO]
Expand All @@ -56,4 +166,4 @@ See [kontinuous configuration](/advanced/configuration)

– Are you kidding me ? Roll up your sleeves and find it, you developer !

[![rabbit-thug](./images/rabbit-thug.png)](https://github.com/SocialGouv/kontinuous/blob/master/packages/kontinuous/src/cli/commands/test.js)
[![rabbit-thug](./images/rabbit-thug.png)](https://github.com/SocialGouv/kontinuous/blob/master/packages/kontinuous/src/cli/commands/test.js)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "~dev",
"version": "1.159.4",
"version": "1.159.5",
"repository": "[email protected]:socialgouv/kontinuous.git",
"license": "MIT",
"private": true,
Expand Down
4 changes: 2 additions & 2 deletions packages/argocd/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ RUN chown 1001:1001 /workspace
RUN git config --global --add safe.directory /workspace


COPY --from=ghcr.io/socialgouv/kontinuous:v1.159.4 /usr/local/bin /usr/local/bin/
COPY --from=ghcr.io/socialgouv/kontinuous:v1.159.4 --chown=999:999 /opt/kontinuous /opt/kontinuous/
COPY --from=ghcr.io/socialgouv/kontinuous:v1.159.5 /usr/local/bin /usr/local/bin/
COPY --from=ghcr.io/socialgouv/kontinuous:v1.159.5 --chown=999:999 /opt/kontinuous /opt/kontinuous/

# Switch back to non-root user
USER 999
2 changes: 1 addition & 1 deletion packages/common/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "~common",
"version": "1.159.4",
"version": "1.159.5",
"description": "",
"license": "MIT",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/dev-tools/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "~dev-tools",
"version": "1.159.4",
"version": "1.159.5",
"dependencies": {
"replace": "^1.2.2",
"~common": "workspace:^"
Expand Down
2 changes: 1 addition & 1 deletion packages/helm-tree/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "helm-tree",
"version": "1.159.4",
"version": "1.159.5",
"description": "",
"license": "MIT",
"engines": {
Expand Down
2 changes: 1 addition & 1 deletion packages/kontinuous/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "kontinuous",
"version": "1.159.4",
"version": "1.159.5",
"repository": "https://github.com/socialgouv/kontinuous.git",
"homepage": "https://socialgouv.github.io/kontinuous/",
"license": "MIT",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down
4 changes: 2 additions & 2 deletions packages/kontinuous/tests/__snapshots__/extends-ovh.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down Expand Up @@ -284,7 +284,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down
4 changes: 2 additions & 2 deletions packages/kontinuous/tests/__snapshots__/extends-ovh.prod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down Expand Up @@ -282,7 +282,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down
4 changes: 2 additions & 2 deletions packages/kontinuous/tests/__snapshots__/job-builds.dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down Expand Up @@ -315,7 +315,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down Expand Up @@ -285,7 +285,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-action
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
command:
- sh
- -c
Expand Down Expand Up @@ -432,7 +432,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down Expand Up @@ -612,7 +612,7 @@ spec:
restartPolicy: Never
initContainers:
- name: degit-repository
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.4
image: ghcr.io/socialgouv/kontinuous/degit:v1.159.5
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down
Loading

0 comments on commit 65a636e

Please sign in to comment.