Skip to content

Commit

Permalink
Merge branch 'master' into fix/cnpg-prod-default-backup-enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo authored Jul 31, 2023
2 parents d8b24dc + e019db2 commit 3b2d6e9
Show file tree
Hide file tree
Showing 85 changed files with 361 additions and 510 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.161.5
FROM ghcr.io/socialgouv/kontinuous:v1.161.9

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.161.5
image: docker://ghcr.io/socialgouv/kontinuous/deploy-via-github:v1.161.9
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.161.5 as base
FROM ghcr.io/socialgouv/kontinuous:v1.161.9 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.161.5
image: docker://ghcr.io/socialgouv/kontinuous/deploy-via-webhook:v1.161.9
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.161.5
ghcr.io/socialgouv/kontinuous:v1.161.9
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.161.5
FROM ghcr.io/socialgouv/kontinuous:v1.161.9

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.161.5
image: docker://ghcr.io/socialgouv/kontinuous/env:v1.161.9
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.161.5
ghcr.io/socialgouv/kontinuous:v1.161.9
18 changes: 18 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,24 @@

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.161.9 (2023-07-31)

## 1.161.8 (2023-07-31)


### Bug Fixes

* **metabase:** upgrade to v0.46.6.4 ([#377](https://github.com/socialgouv/kontinuous/issues/377)) ([47f5fa2](https://github.com/socialgouv/kontinuous/commit/47f5fa2df0c75ce6ac8877460645c1dc1ec2ae7f))

## 1.161.7 (2023-07-28)


### Bug Fixes

* **metabase:** fix chart ([#369](https://github.com/socialgouv/kontinuous/issues/369)) ([ea390ec](https://github.com/socialgouv/kontinuous/commit/ea390ec0c389a69fcd252eb3d4cd797dfb94208f))

## 1.161.6 (2023-07-28)

## 1.161.5 (2023-07-28)


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.161.5
image: ghcr.io/socialgouv/kontinuous/webhook:v1.161.9
# 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.161.5"}
KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE: ${KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE:-"ghcr.io/socialgouv/kontinuous/degit:v1.161.5"}
KUBEWEBHOOK_PIPELINE_IMAGE: ${KUBEWEBHOOK_PIPELINE_IMAGE:-"ghcr.io/socialgouv/kontinuous:v1.161.9"}
KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE: ${KUBEWEBHOOK_PIPELINE_CHECKOUT_IMAGE:-"ghcr.io/socialgouv/kontinuous/degit:v1.161.9"}
KUBEWEBHOOK_CI_NAMESPACE_ALLOW_ALL: ${KUBEWEBHOOK_CI_NAMESPACE_ALLOW_ALL:-"true"}
KUBEWEBHOOK_HTTPLOGGER_IGNOREUSERAGENTS: backbox-robot
KUBEWEBHOOK_SENTRY_DSN: ${KUBEWEBHOOK_SENTRY_DSN}
Expand Down
87 changes: 86 additions & 1 deletion docs/faq.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# FAQ

[Add your question](https://github.com/SocialGouv/kontinuous/issues/new?title=docs:%20add%20FAQ%20entry)
[Add your question](https://github.com/SocialGouv/kontinuous/edit/master/docs/faq.md)

## Why another CI/CD ?

Expand Down Expand Up @@ -83,6 +83,40 @@ app:
name: pg-xxx-app
```

## Run a seed job

This example build your Dockerfile, creates a PG cluster, seed the database then starts your application with secrets attached

In your `.kontinuous/values.yaml` or `.kontinuous/[env]/values.yaml`

```yaml
# create app database
pg:
~chart: pg
# run app after build and seed
app:
~chart: app
~needs: [build-app, seed-db]
# use CNPG db created secret
envFrom:
- secretRef:
name: pg-app
jobs:
runs:
# builds Dockerfile
build-app:
use: build
# seed the database
seed-db:
use: seed-db
~needs: [pg]
pgSecretName: pg-app
with:
seedPath: ./seeds.sql
```

## Add a custom HELM chart

To add a custom HELM chart to your deployment :
Expand Down Expand Up @@ -136,6 +170,57 @@ jobs:
context: packages/api
```

## Add an oauth2 proxy to protect some application

You can delegate application authentication to [oauth2-proxy](https://oauth2-proxy.github.io/oauth2-proxy) that can connect to multiple identity providers like GitHub, Azure, AD, KeyCloak...

This has many security advantages :

- hides all your application from external users
- delegates all security processes to state-of-the-art providers
- application can receive verifiable user identity

You'll have to disable the default application ingress and replace it with `oauth2-proxy` one then register your application, see [compatible providers](https://oauth2-proxy.github.io/oauth2-proxy/docs/configuration/oauth_provider).

```mermaid
graph LR
Internet["🌍" Internet]-->Proxy["🔒" Proxy]
subgraph Cluster
Proxy-->WebApp["🧑‍💼" WebApp]
Proxy<-->IDP["🔑" Identity providers]
end
```

In `.kontinuous/values.yaml` :

```yaml
# Application to protect
metabase:
ingress:
enabled: false # disable ingress (internet exposition)
# metabase secrets and settings
envFrom:
- secretRef:
name: metabase
oauth2-proxy:
# public URL that will show metabase once loggedin
host: "metabase.myapp.somewhere.fr"
# internal protected service URL
upstream: http://metabase
# oauth2-proxy secrets and settings
envFrom:
- secretRef:
name: oauth2-proxy
env:
- name: OAUTH2_PROXY_PROVIDER
value: github
- name: OAUTH2_PROXY_GITHUB_ORG
value: some-org
```

**NOTE** in this example, only users from `some-org` GitHub organisation can access the metabase, but they also have to login on the metabase separately.

## Define a custom docker registry

[TODO]
Expand Down
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.161.5",
"version": "1.161.9",
"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.161.5 /usr/local/bin /usr/local/bin/
COPY --from=ghcr.io/socialgouv/kontinuous:v1.161.5 --chown=999:999 /opt/kontinuous /opt/kontinuous/
COPY --from=ghcr.io/socialgouv/kontinuous:v1.161.9 /usr/local/bin /usr/local/bin/
COPY --from=ghcr.io/socialgouv/kontinuous:v1.161.9 --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.161.5",
"version": "1.161.9",
"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.161.5",
"version": "1.161.9",
"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.161.5",
"version": "1.161.9",
"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.161.5",
"version": "1.161.9",
"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.161.5
image: ghcr.io/socialgouv/kontinuous/degit:v1.161.9
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.161.5
image: ghcr.io/socialgouv/kontinuous/degit:v1.161.9
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.161.5
image: ghcr.io/socialgouv/kontinuous/degit:v1.161.9
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.161.5
image: ghcr.io/socialgouv/kontinuous/degit:v1.161.9
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.161.5
image: ghcr.io/socialgouv/kontinuous/degit:v1.161.9
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.161.5
image: ghcr.io/socialgouv/kontinuous/degit:v1.161.9
imagePullPolicy: IfNotPresent
command:
- sh
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,14 @@ data:
MB_ANON_TRACKING_ENABLED: \\"false\\"
MB_APPLICATION_LOGO_URL: https://socialgouv.github.io/support/_media/marianne.jpeg
MB_EMAIL_FROM_ADDRESS: [email protected]
MB_EMAIL_FROM_NAME: Fabrique numérique des ministères sociaux
MB_ENABLE_EMBEDDING: \\"true\\"
MB_ENABLE_PUBLIC_SHARING: \\"true\\"
MB_SITE_LOCALE: fr
MB_SITE_NAME: Fabrique des ministères sociaux
MB_START_OF_WEEK: monday
MB_SITE_NAME: Fabrique numérique des ministères sociaux
MB_SITE_URL: https://metabase-test-ingress-annotations.fabrique.social.gouv.fr
MB_PASSWORD_COMPLEXITY: strong
---
apiVersion: apps/v1
kind: Deployment
Expand Down Expand Up @@ -167,7 +170,7 @@ spec:
fsGroup: 1000
runAsNonRoot: true
containers:
- image: metabase/metabase:v0.46.6.1
- image: metabase/metabase:v0.46.6.4
name: metabase
securityContext:
allowPrivilegeEscalation: false
Expand Down
Loading

0 comments on commit 3b2d6e9

Please sign in to comment.