Skip to content

Commit

Permalink
Merge branch 'staging'
Browse files Browse the repository at this point in the history
  • Loading branch information
rjzondervan committed Dec 5, 2019
2 parents a170188 + ba1ff41 commit aef2bd3
Show file tree
Hide file tree
Showing 6 changed files with 136 additions and 33 deletions.
16 changes: 8 additions & 8 deletions .env
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
##################################################
#
# General settings for your component
#
# General settings for your component
#
##################################################

Expand All @@ -18,14 +18,14 @@ APP_VERSION=V.0.1
APP_DEBUG=1
# What is the enviroment type you want to use for local production? (choose between dec,stag,prod, acce or test)
APP_ENV=dev
# We use a build to tag images, this is swithced to the version on master and to env on other branches
# We use a build to tag images, this is swithced to the version on master and to env on other branches
APP_BUILD=dev
# The description for this api
APP_DESCRIPTION='Naast deze JSON rest API is er ook een [graphql](/graphql) interface beschikbaar.'

# The urls on wich this api is available
TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16
TRUSTED_HOSTS='^(.+\.)?conduction\.nl$|^(.+\.)?huwelijksplanner\.online$|^(.+\.)?larping\.eu$|^(.+\.)?common-ground\.nl$|^(.+\.)?trouwplanner\.online$|^(.+\.)?zaakonline\.nl$|localhost'
TRUSTED_HOSTS=^(.+\.)?conduction\.nl$|^(.+\.)?huwelijksplanner\.online$|^(.+\.)?larping\.eu$|^(.+\.)?common-ground\.nl$|^(.+\.)?trouwplanner\.online$|^(.+\.)?zaakonline\.nl$|localhost

##################################################
# Documentation settings
Expand Down Expand Up @@ -78,17 +78,17 @@ HEALTH_ENABLED=false
ARCHIVE_ENABLED=false

##################################################
# NLX Setup, read more at https://docs.nlx.io/get-started/#
# NLX Setup, read more at https://docs.nlx.io/get-started/#
##################################################

# Do you want to provide an nlx outway? (option for your component to reach nlx services)
NLX_OUTWAY=true
NLX_OUTWAY=true

# Do you want to provice an nlx inway (option for nlx services to reach your api)
NLX_INWAY=false
NLX_INWAY=false

# NLX Certification Details
NLX_COUNTRY_NAME=Netherlands
NLX_COUNTRY_NAME=Netherlands
NLX_STATE=Noord-Holland
NLX_LOCALITY=Amsterdam
NLX_ORGANIZATION_NAME=Conduction
Expand Down
12 changes: 6 additions & 6 deletions INSTALLATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,16 +72,16 @@ $ helm dependency update ./api/helm
```
If you want to create a new instance
```CLI
$ helm install --name pc-dev ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=dev --set settings.env=dev,settings.debug=1,settings.loadbalancerEnabled=true
$ helm install --name pc-stag ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=stag --set settings.env=stag,settings.debug=0,settings.loadbalancerEnabled=true
$ helm install --name pc-prod ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=prod --set settings.env=prod,settings.debug=0,settings.loadbalancerEnabled=true
$ helm install --name pc-dev ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=dev --set settings.env=dev,settings.debug=1
$ helm install --name pc-stag ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=stag --set settings.env=stag,settings.debug=0
$ helm install --name pc-prod ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=prod --set settings.env=prod,settings.debug=0
```

Or update if you want to update an existing one
```CLI
$ helm upgrade pc-dev ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=dev --set settings.env=dev,settings.debug=1,settings.loadbalancerEnabled=true
$ helm upgrade pc-stag ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=stag --set settings.env=stag,settings.debug=0,settings.loadbalancerEnabled=true
$ helm upgrade pc-prod ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=prod --set settings.env=prod,settings.debug=0,settings.loadbalancerEnabled=true
$ helm upgrade pc-dev ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=dev --set settings.env=dev,settings.debug=1
$ helm upgrade pc-stag ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=stag --set settings.env=stag,settings.debug=0
$ helm upgrade pc-prod ./api/helm --kubeconfig="api/helm/kubeconfig.yaml" --namespace=prod --set settings.env=prod,settings.debug=0
```

Or del if you want to delete an existing one
Expand Down
57 changes: 51 additions & 6 deletions api/helm/templates/ingress.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,50 @@ spec:
{{- end }}
{{- end }}
rules:
- #host: {{ .Values.settings.name }}.{{ .Values.settings.env }}.{{ .Values.settings.domain }}
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
# - host: {{ .Values.settings.name }}.{{ .Values.settings.env }}.{{ .Values.settings.domain }}
# http:
# paths:
# - backend:
# serviceName: {{ include "name" . }}
# servicePort: 80
{{- if eq .Values.settings.env "prod" }}
- host: {{ .Values.settings.name }}.{{ .Values.settings.domain }}
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
- host: {{ .Values.settings.name }}.huwelijksplanner.online
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
- host: {{ .Values.settings.name }}.trouwplanner.online
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
- host: {{ .Values.settings.name }}.common-ground.nl
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
- host: {{ .Values.settings.name }}.larping.eu
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
- host: {{ .Values.settings.name }}.zaakonline.eu
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
{{- else }}
- host: {{ .Values.settings.name }}.{{ .Values.settings.env }}.{{ .Values.settings.domain }}
http:
paths:
Expand Down Expand Up @@ -60,3 +98,10 @@ spec:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
- host: {{ .Values.settings.name }}.{{ .Values.settings.env }}.zaakonline.nl
http:
paths:
- backend:
serviceName: {{ include "name" . }}
servicePort: 80
{{- end }}
17 changes: 12 additions & 5 deletions api/helm/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ settings:
title: Proto Component
version: V.0.1
description: ''Naast deze JSON rest API is er ook een [graphql](/graphql) interface beschikbaar.''
repro: https://github.com/ConductionNL/Proto-component-commonground'
demo: pc.zaakonline.nl
repro: 'https://github.com/ConductionNL/Proto-component-commonground'
domain: conduction.nl
demo: pc.zaakonline.nl
env: dev
debug: 1
replicaCount: 1
Expand All @@ -23,17 +23,17 @@ settings:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
loadbalancerEnabled: false
# If you want to enable NLX you are requered to add the appropreate certificates to you nlx-settings folder (located in the /api folder)
nlxInwayEnabled: false
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
notificationEnabled: false
audittrailEnabled: false
authorisationEnabled: false
healthEnabled: false
archiveEnabled: false


php:
repository: docker.io/conduction/protocomponent-php
Expand Down Expand Up @@ -95,6 +95,13 @@ ingress:
# - hosts:
# - example.com
# - mercure.example.com
hosts:
api:
host: example.com
serviceName: varnish
mercure:
host: mercure.example.com
serviceName: mercure

resources: {}
# We usually recommend not to specify default resources and to leave this as a conscious
Expand Down
57 changes: 54 additions & 3 deletions api/public/schema/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -524,7 +524,7 @@ components:
schemas:
ExampleEntity-read:
type: object
description: 'This is an example entity'
description: 'This is an example entity.'
properties:
id:
readOnly: true
Expand All @@ -535,11 +535,14 @@ components:
description:
description: 'The description of this example property'
type: string
camelCase:
description: 'Proof that we camel case our api'
type: string
required:
- name
ExampleEntity-write:
type: object
description: 'This is an example entity'
description: 'This is an example entity.'
required:
- name
properties:
Expand All @@ -549,13 +552,61 @@ components:
description:
description: 'The description of this example property'
type: string
camelCase:
description: 'Proof that we camel case our api'
type: string
definitions:
ExampleEntity-read:
properties:
id:
example: e2984465-190a-4562-829e-a8cca81aa35d
format: uuid
name:
example: 'My Group'
maxLength: 255
description:
example: 'Is the best group ever'
maxLength: 2555
camelCase:
example: 'Best api ever'
maxLength: 255
required:
- name
ExampleEntity-write:
properties:
name:
example: 'My Group'
maxLength: 255
description:
example: 'Is the best group ever'
maxLength: 2555
camelCase:
example: 'Best api ever'
maxLength: 255
required:
- name
tags:
-
name: ExampleEntity
description: |
This is an example entity
This is an example entity.
With an adtional description, all in all its pritty nice [url](www.google.nl)
securityDefinitions:
JWT-Oauth:
type: oauth2
authorizationUrl: 'http://petstore.swagger.io/api/oauth/dialog'
flow: implicit
scopes:
read: 'read right to the ExampleEntity resource'
write: 'write right to the ExampleEntity resource'
JWT-Token:
type: apiKey
in: header
name: Authorization
scopes:
read: 'read right to the ExampleEntity resource'
write: 'write right to the ExampleEntity resource'
host: irc.zaakonline.nl
servers:
-
Expand Down
10 changes: 5 additions & 5 deletions api/templates/helm/Values.yaml.twig
Original file line number Diff line number Diff line change
Expand Up @@ -9,31 +9,31 @@ settings:
title: {{ app_title }}
version: {{ app_version }}
description: '{{ app_description }}'
repro: {{ app_repro }}'
repro: '{{ app_repro }}'
domain: {{ app_domain }}
demo: {{ app_demo }}
env: {{ app_env }}
debug: {{ app_debug }}
replicaCount: 1
corsAllowOrigin: ['*']
trustedHosts: {{ trusted_hosts }}
trustedHosts: '{{ trusted_hosts }}'
pullPolicy: Always
# You will need these proxies on kubernetes
trustedProxies:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
loadbalancerEnabled: false
# If you want to enable NLX you are requered to add the appropreate certificates to you nlx-settings folder (located in the /api folder)
nlxInwayEnabled: {{ nlx_inway }}
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
# If you are runnig a single component on a kubernetes cluster you can just easaliy enable the load balancer, if not you need to set up a multi component load balancer
notificationEnabled: false
audittrailEnabled: false
authorisationEnabled: false
healthEnabled: false
archiveEnabled: false


php:
repository: docker.io/conduction/protocomponent-php
Expand Down

0 comments on commit aef2bd3

Please sign in to comment.