Skip to content

Commit

Permalink
fix: clean remove old charts
Browse files Browse the repository at this point in the history
  • Loading branch information
devthejo committed May 30, 2024
1 parent 392de2b commit 1f31fcd
Show file tree
Hide file tree
Showing 38 changed files with 16 additions and 713 deletions.
6 changes: 0 additions & 6 deletions docs/advanced/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -388,12 +388,6 @@ Official plugins are here [plugins/contrib/](https://github.com/socialgouv/konti
- [charts/maildev](https://github.com/socialgouv/kontinuous/blob/master/plugins/fabrique/charts/maildev) <br>
deploy an instance of [maildev](https://github.com/maildev/maildev)

- [charts/metabase](https://github.com/socialgouv/kontinuous/blob/master/plugins/fabrique/charts/metabase) <br>
deploy an instance of [metabase](https://www.metabase.com/)

- [charts/oauth2-proxy](https://github.com/socialgouv/kontinuous/blob/master/plugins/fabrique/charts/oauth2-proxy) <br>
deploy an instance of [oauth2-proxy](https://github.com/oauth2-proxy/oauth2-proxy)

- [charts/redis](https://github.com/socialgouv/kontinuous/blob/master/plugins/fabrique/charts/redis) <br>
deploy an instance of [redis](https://redis.io/)
- [patches/cert-letsencrypt-issuer](https://github.com/socialgouv/kontinuous/blob/master/plugins/fabrique/patches/cert-letsencrypt-issuer.js) <br>
Expand Down
48 changes: 0 additions & 48 deletions docs/faq.md
Original file line number Diff line number Diff line change
Expand Up @@ -194,54 +194,6 @@ 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.

Expand Down
40 changes: 9 additions & 31 deletions docs/values.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
"type": "object",
"patternProperties": {
"^pg-.*": {
"allOf": [
{
"allOf": [{
"$ref": "https://raw.githubusercontent.com/socialgouv/kontinuous/v1/plugins/fabrique/charts/pg/kontinuous.values.schema.json"
},
{
Expand All @@ -20,8 +19,7 @@
]
},
"^app-.*": {
"allOf": [
{
"allOf": [{
"$ref": "https://raw.githubusercontent.com/socialgouv/kontinuous/v1/plugins/contrib/charts/app/kontinuous.values.schema.json"
},
{
Expand All @@ -38,8 +36,7 @@
"additionalProperties": {
"type": "object",
"title": "Additional helm chart",
"allOf": [
{
"allOf": [{
"if": {
"required": ["~chart"],
"properties": {
Expand Down Expand Up @@ -78,19 +75,6 @@
"$ref": "https://raw.githubusercontent.com/socialgouv/kontinuous/v1/plugins/contrib/charts/jobs/kontinuous.values.schema.json"
}
},
{
"if": {
"required": ["~chart"],
"properties": {
"~chart": {
"const": "oauth2-proxy"
}
}
},
"then": {
"$ref": "https://raw.githubusercontent.com/socialgouv/kontinuous/v1/plugins/contrib/charts/oauth2-proxy/values.schema.json"
}
},
{
"if": {
"required": ["~chart"]
Expand Down Expand Up @@ -188,7 +172,10 @@
}
},

"project": { "type": "object", "additionalProperties": true },
"project": {
"type": "object",
"additionalProperties": true
},

"jobs": {
"$ref": "https://raw.githubusercontent.com/socialgouv/kontinuous/v1/plugins/contrib/charts/jobs/kontinuous.values.schema.json"
Expand All @@ -203,8 +190,7 @@
"description": "Kontinuous chart to use",
"type": "string",
"default": "app",
"anyOf": [
{
"anyOf": [{
"type": "string",
"markdownDescription": "Bring your own helm chart. \n\nYou should have an entry with the same name in your `./Chart.yaml`.\n\nSee https://socialgouv.github.io/kontinuous/#/./faq?id=add-a-custom-helm-chart"
},
Expand All @@ -220,10 +206,6 @@
"const": "hasura",
"markdownDescription": "The [hasura chart](https://github.com/SocialGouv/kontinuous/blob/master/plugins/contrib/charts/hasura) deploys an [hasura](https://hasura.io) instance"
},
{
"const": "metabase",
"markdownDescription": "The [metabase chart](https://github.com/SocialGouv/kontinuous/blob/master/plugins/contrib/charts/metabase) deploys a [metabase](https://metabase.com) instance"
},
{
"const": "pgweb",
"markdownDescription": "The [pgweb chart](https://github.com/SocialGouv/kontinuous/blob/master/plugins/fabrique/charts/pgweb) deploys a [pgweb](https://github.com/sosedoff/pgweb) instance"
Expand All @@ -232,10 +214,6 @@
"const": "maildev",
"markdownDescription": "The [maildev chart](https://github.com/SocialGouv/kontinuous/blob/master/plugins/fabrique/charts/maildev) deploys a [maildev](https://github.com/maildev/maildev) instance"
},
{
"const": "oauth2-proxy",
"markdownDescription": "The [oauth2-proxy chart](https://github.com/SocialGouv/kontinuous/blob/master/plugins/contrib/charts/oauth2-proxy) deploys an [oauth2-proxy](https://oauth2-proxy.github.io/oauth2-proxy/) instance"
},
{
"const": "redis",
"markdownDescription": "The [redis chart](https://github.com/SocialGouv/kontinuous/blob/master/plugins/contrib/charts/redis) deploys an [redis](https://oauth2-proxy.github.io/redis/) instance"
Expand All @@ -259,4 +237,4 @@
"required": ["~chart"]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
metabase:
app:
enabled: true
host: some.external.host
8 changes: 0 additions & 8 deletions packages/kontinuous/tests/samples/metabase/config.yaml

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

15 changes: 0 additions & 15 deletions packages/kontinuous/tests/samples/metabase/env/prod/values.yaml

This file was deleted.

14 changes: 0 additions & 14 deletions packages/kontinuous/tests/samples/metabase/values.yaml

This file was deleted.

This file was deleted.

Empty file.

This file was deleted.

3 changes: 0 additions & 3 deletions packages/kontinuous/tests/samples/oauth2-proxy/config.yaml

This file was deleted.

Empty file.
10 changes: 0 additions & 10 deletions packages/kontinuous/tests/samples/oauth2-proxy/values.yaml

This file was deleted.

This file was deleted.

This file was deleted.

32 changes: 5 additions & 27 deletions packages/kontinuous/tests/samples/repo.domifa/env/prod/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,50 +2,28 @@ jobs:
runs:
build-backend:
with:
buildArgs:
buildArgs:
DOMIFA_BACKEND_URL: "https://domifa-api.{{ .Values.global.domain }}/"
DOMIFA_PORTAIL_ADMINS_URL: "https://admin-{{ .Values.global.host }}/"
DOMIFA_PORTAIL_USAGERS_URL: "https://mon-{{ .Values.global.host }}/"

build-frontend:
with:
buildArgs:
buildArgs:
DOMIFA_BACKEND_URL: "https://domifa-api.{{ .Values.global.domain }}/"

build-portail-admins:
with:
buildArgs:
buildArgs:
DOMIFA_BACKEND_URL: "https://domifa-api.{{ .Values.global.domain }}/"
PRODUCTION: "true"

build-portail-usagers:
with:
buildArgs:
buildArgs:
DOMIFA_BACKEND_URL: "https://domifa-api.{{ .Values.global.domain }}/"
PRODUCTION: "true"

#metabase:
# enabled: true
# ingress:
# enabled: false
# envFrom:
# - secretRef:
# name: metabase-pg-user
# - configMapRef:
# name: metabase-configmap

#oauth2-proxy:
# host: "metabase-{{ .Values.global.host }}"
# certSecretName: oauth2-proxy-crt
# upstream: http://metabase
# enabled: true
# envFrom:
# - secretRef:
# name: "oauth2-proxy-sealed-secret"
# - configMapRef:
# name: oauth2-proxy-configmap


backend-cron:
addVolumes:
- files
Expand Down Expand Up @@ -131,4 +109,4 @@ portail-admins:

portail-usagers:
host: "mon-{{ .Values.global.host }}"
certSecretName: portail-usagers-crt
certSecretName: portail-usagers-crt
6 changes: 0 additions & 6 deletions packages/kontinuous/tests/samples/repo.domifa/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -156,9 +156,3 @@ jobs:
DOMIFA_ENV_ID: "{{ .Values.global.env }}"
DOMIFA_BACKEND_URL: "https://api-{{ .Values.global.host }}/"
DOMIFA_SENTRY_DSN_PORTAIL: "https://***@sentry.fabrique.social.gouv.fr/58"

metabase:
enabled: false

oauth2-proxy:
enabled: false
Loading

0 comments on commit 1f31fcd

Please sign in to comment.