Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add Env Secrets in Server API #533

Open
wants to merge 28 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d58d8e4
feat: Add Env Secrets in Server API
shiipou Feb 13, 2024
47a822d
fix: use k8s api to create and read env's secrets
shiipou Feb 13, 2024
dbeb4eb
chore(warning): remove warning bevause env_id is not used
shiipou Feb 13, 2024
8af3c2b
fix: add or remove secret from openfaas deployment
shiipou Feb 13, 2024
52b1734
fix: wrong matching :ok must be :error in k8s api fetch
shiipou Feb 13, 2024
30ce951
fix: add buisness error for the API responses
shiipou Feb 13, 2024
795c7dd
fix: fix some errors
shiipou Feb 13, 2024
a2454bf
fix: switch from rlang string (`'`) to elixir string (`"`)
shiipou Feb 13, 2024
0ba030b
fix: wrong error matching
shiipou Feb 13, 2024
ad3b028
fix: now we can list/create/delete
shiipou Feb 23, 2024
6bd8eb7
Merge branch 'main' into feat/Add-Env-Secrets-in-Server-API
shiipou Feb 23, 2024
0ac31ae
fix: variable "secrets" does not exist
shiipou Feb 23, 2024
5c01bc1
fix: openfaas call must now work ?
shiipou Feb 23, 2024
fd8e885
fix format
jonas-martinez Feb 27, 2024
8f813b6
fix some credo
jonas-martinez Mar 1, 2024
72177a5
fix(WIP): openfaas update
shiipou Mar 1, 2024
1efe68b
fix: Openfaas update now work
shiipou Mar 1, 2024
d7d6421
Merge branch 'main' into feat/Add-Env-Secrets-in-Server-API
jonas-martinez Mar 29, 2024
05091e9
Return error on kubernetes not configured
jonas-martinez Apr 2, 2024
8a1f176
Fix credo
jonas-martinez Apr 2, 2024
5a549ca
fix format
jonas-martinez Apr 2, 2024
3cf53fb
fix credo
jonas-martinez Apr 2, 2024
e5d0ece
fix credo
jonas-martinez Apr 2, 2024
4790525
fix credo
jonas-martinez Apr 2, 2024
ce46d0e
Merge branch 'main' into feat/Add-Env-Secrets-in-Server-API
jonas-martinez May 29, 2024
f14877a
fix dialyzer
jonas-martinez May 29, 2024
9ea41a6
fix format
jonas-martinez May 29, 2024
083cc5d
Merge branch 'main' into feat/Add-Env-Secrets-in-Server-API
jonas-martinez Jun 17, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1,161 changes: 1,161 additions & 0 deletions .vscode/postman/lenra_server.postman_collection.json

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions .vscode/postman/local.postman_environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": "697ac5e7-6171-4875-a90d-276e7bc0d3ee",
"name": "Local",
"values": [
{
"key": "lenra_endpoint",
"value": "http://localhost:4000",
"type": "default",
"enabled": true
},
{
"key": "hydra_endpoint",
"value": "http://localhost:4444",
"type": "default",
"enabled": true
},
{
"key": "hydra_redirect_url",
"value": "https://oauthdebugger.com/debug",
"type": "default",
"enabled": true
},
{
"key": "hydra_client_scope",
"value": "profile store manage:account manage:apps",
"type": "default",
"enabled": true
},
{
"key": "lenra_client_id",
"value": "",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-02-06T12:00:49.888Z",
"_postman_exported_using": "Postman/10.22.13-240205-0449"
}
39 changes: 39 additions & 0 deletions .vscode/postman/staging.postman_environment.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
{
"id": "1461dd99-7ff3-4a84-a3d3-2b2f57fa466d",
"name": "Staging",
"values": [
{
"key": "lenra_endpoint",
"value": "https://api.staging.lenra.io",
"type": "default",
"enabled": true
},
{
"key": "hydra_endpoint",
"value": "https://auth.staging.lenra.io",
"type": "default",
"enabled": true
},
{
"key": "hydra_redirect_url",
"value": "https://oauthdebugger.com/debug",
"type": "default",
"enabled": true
},
{
"key": "hydra_client_scope",
"value": "profile store manage:account manage:apps",
"type": "default",
"enabled": true
},
{
"key": "lenra_client_id",
"value": "4f162a6c-dfdd-4c75-8305-097e30a19e6f",
"type": "default",
"enabled": true
}
],
"_postman_variable_scope": "environment",
"_postman_exported_at": "2024-02-06T11:58:57.655Z",
"_postman_exported_using": "Postman/10.22.13-240205-0449"
}
6 changes: 5 additions & 1 deletion apps/lenra/lib/lenra/errors/business_error.ex
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,10 @@ defmodule Lenra.Errors.BusinessError do
"Currently not capable to handle this type of pipeline. (`pipeline_runner` can be: [GitLab, Kubernetes])"},
{:subscription_required, "You need a subscirption", 402},
{:stripe_error, "Stripe error"},
{:subscription_already_exist, "You already have a subscription for this app", 403}
{:subscription_already_exist, "You already have a subscription for this app", 403},
{:env_secret_already_exist, "You already have a secret with this key", 403},
{:env_secret_not_found, "The secret your tried to update didn't exist", 404},
{:api_return_unexpected_response, "A dependency API used in this call return an unexpected response", 500},
{:kubernetes_unexpected_response, "Kubernetes return an unexpected response", 500}
]
end
Loading
Loading