Unverified Commit 000936ef authored by torgiren's avatar torgiren
Browse files

query nginx apps - closes #259

Signed-off-by: torgiren's avatarMarcin Fabrykowski <git@fabrykowski.pl>
1 merge request!7query nginx apps - closes #259
Pipeline #1695 passed with stages
in 2 minutes and 4 seconds
Showing with 17 additions and 8 deletions
+17 -8
......@@ -103,7 +103,7 @@ deploy branch:
--wait --wait-for-jobs
- >
helm upgrade -n $KUBE_NAMESPACE -i test-controller exphost/exphost-controller -f gitlab-ci-values.yml
--version v0.3.0-12-g086a392
--version v0.0.0-latest
--set global.domain=${KUBE_NAMESPACE}.ci.exphost.pl
--wait --wait-for-jobs
- >
......
from graphene import ObjectType, Schema, Field
from graphene import ObjectType, Schema, Field, List, String
import gateway.schema_user as schema_user
import gateway.schema_group as schema_group
import gateway.schema_nginx as schema_nginx
......@@ -8,6 +8,9 @@ class Query(ObjectType):
user = Field(schema_user.QueryUser)
resolve_user = schema_user.resolve_user
nginx = List(schema_nginx.AppNginx, org=String())
resolve_nginx = schema_nginx.resolve_nginx
class Mutations(ObjectType):
user_register = schema_user.RegisterUser.Field()
......
......@@ -9,6 +9,18 @@ class AppNginx(ObjectType):
interfaces = (App,)
def resolve_nginx(root, info, org):
headers = {}
if g.get('user', None):
headers['X-User'] = g.user
response = requests.get(
current_app.config['appsservice_endpoint']+"/nginx/?org="+org,
headers=headers,
)
if response.status_code == 200:
return [AppNginx(x['name'], org) for x in response.json()['nginx']]
class CreateAppNginx(Mutation):
class Arguments:
name = String(required=True)
......
usersservice:
image:
tag: dev
ldap:
uri: "ldap://ldap-openldap"
dn: "cn=admin,dc=example,dc=com"
password:
password: pass123
webui:
image:
tag: dev
endpoints:
authendpoint:
url: https://auth.__DOMAIN__/dex
......@@ -17,8 +13,6 @@ gateway:
enabled: false
appsservice:
image:
tag: dev
git_repo:
url: git@gitlab.exphost.pl:exphost-controller/test_tenants_repo.git
sshkey:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment