-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(backend): integrate source-peoplesoft into helm (#597)
- Loading branch information
1 parent
01fab14
commit f4d745e
Showing
12 changed files
with
220 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
host: &host "demo-phonebook.local" | ||
contactUrl: "https://github.com/T-Systems-MMS/phonebook/issues" | ||
roomPlanningToolUrl: null | ||
contactEmail: &contactEmail "[email protected]" | ||
ravenUrl: null | ||
employeePictureEndpoint: null | ||
assetsEndpoint: "https://demo-phonebook.local/assets" | ||
environment: "development" | ||
environmentTag: "dev" | ||
rocketChatUrl: "https://open.rocket.chat" | ||
|
||
frontend: | ||
replicaCount: 1 | ||
|
||
source: | ||
peoplesoft: | ||
replicaCount: 1 | ||
environment: Development | ||
|
||
traefik: | ||
enabled: true | ||
startupArguments: | ||
- "" | ||
dashboard: | ||
enabled: true | ||
domain: board.demo-phonebook.local | ||
ingress: | ||
annotations: | ||
traefik.frontend.priority: "100" | ||
|
||
ssl: | ||
enabled: true | ||
enforced: true | ||
rbac: | ||
enabled: true | ||
kubernetes: | ||
namespaces: | ||
- kube-public | ||
- default |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
dependencies: | ||
- name: traefik | ||
repository: https://kubernetes-charts.storage.googleapis.com | ||
version: 1.78.4 | ||
digest: sha256:c389e7cea35c8eb944d23340716cefac726a8dcf7dc1e76fd4338b619383899f | ||
generated: "2019-10-21T22:00:43.8811404+02:00" | ||
- name: traefik | ||
repository: https://kubernetes-charts.storage.googleapis.com | ||
version: 1.86.2 | ||
digest: sha256:6a6097b475625d15d6e156f79ec0950f5a850ae13b3dd7463c75e39526b6bc14 | ||
generated: "2020-04-10T21:54:06.4266672+02:00" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
60 changes: 60 additions & 0 deletions
60
Phonebook/phonebook/templates/source-peoplesoft-deployment.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ include "phonebook.fullname" . }}-peoplesoft | ||
labels: | ||
app.kubernetes.io/name: {{ include "phonebook.name" . }}-peoplesoft | ||
helm.sh/chart: {{ include "phonebook.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
replicas: {{ .Values.source.peoplesoft.replicaCount }} | ||
selector: | ||
matchLabels: | ||
app.kubernetes.io/name: {{ include "phonebook.name" . }}-peoplesoft | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
template: | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: {{ include "phonebook.name" . }}-peoplesoft | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
spec: | ||
nodeSelector: | ||
'beta.kubernetes.io/os': linux | ||
containers: | ||
- name: {{ .Chart.Name }}-{{ .Values.source.peoplesoft.name }}-peoplesoft | ||
image: "{{ .Values.source.peoplesoft.image.repository }}/{{ .Values.source.peoplesoft.image.name}}:{{ .Values.source.peoplesoft.image.tag }}" | ||
imagePullPolicy: {{ .Values.source.peoplesoft.image.pullPolicy }} | ||
ports: | ||
- name: http | ||
containerPort: 80 | ||
protocol: TCP | ||
# TODO: use when issue #594 is resolved | ||
# livenessProbe: | ||
# httpGet: | ||
# path: /health | ||
# port: http | ||
# initialDelaySeconds: 6 | ||
# readinessProbe: | ||
# httpGet: | ||
# path: /health | ||
# port: http | ||
# initialDelaySeconds: 6 | ||
env: | ||
- name: ASPNETCORE_ENVIRONMENT | ||
value: "{{ .Values.source.peoplesoft.environment }}" | ||
# See more in Doku https://t-systems-mms.github.io/phonebook/pages/development-guides/backend/getting-started | ||
resources: | ||
{{- toYaml .Values.resources | nindent 12 }} | ||
{{- with .Values.nodeSelector }} | ||
nodeSelector: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.affinity }} | ||
affinity: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} | ||
{{- with .Values.tolerations }} | ||
tolerations: | ||
{{- toYaml . | nindent 8 }} | ||
{{- end }} |
27 changes: 27 additions & 0 deletions
27
Phonebook/phonebook/templates/source-peoplesoft-ingress.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
{{- if .Values.ingress.enabled -}} | ||
{{- $fullName := include "phonebook.fullname" . -}} | ||
apiVersion: networking.k8s.io/v1beta1 | ||
kind: Ingress | ||
metadata: | ||
name: {{ $fullName }}-peoplesoft | ||
labels: | ||
app.kubernetes.io/name: {{ include "phonebook.name" . }}-peoplesoft | ||
helm.sh/chart: {{ include "phonebook.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
annotations: | ||
kubernetes.io/ingress.class: traefik | ||
traefik.frontend.priority: '50' | ||
{{- with .Values.ingress.annotations }} | ||
{{- toYaml . | nindent 4 }} | ||
{{- end }} | ||
spec: | ||
rules: | ||
- host: {{ .Values.host }} | ||
http: | ||
paths: | ||
- path: /api | ||
backend: | ||
serviceName: {{ $fullName }}-peoplesoft | ||
servicePort: http | ||
{{- end }} |
19 changes: 19 additions & 0 deletions
19
Phonebook/phonebook/templates/source-peoplesoft-service.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ include "phonebook.fullname" . }}-peoplesoft | ||
labels: | ||
app.kubernetes.io/name: {{ include "phonebook.name" . }} | ||
helm.sh/chart: {{ include "phonebook.chart" . }} | ||
app.kubernetes.io/instance: {{ .Release.Name }} | ||
app.kubernetes.io/managed-by: {{ .Release.Service }} | ||
spec: | ||
type: {{ .Values.source.peoplesoft.service.type }} | ||
ports: | ||
- port: {{ .Values.source.peoplesoft.service.port }} | ||
targetPort: http | ||
protocol: TCP | ||
name: http | ||
selector: | ||
app.kubernetes.io/name: {{ include "phonebook.name" . }}-peoplesoft | ||
app.kubernetes.io/instance: {{ .Release.Name }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
# Phonebook Application | ||
|
||
The Deployment Guide for the Phonebook. | ||
We use [traefik](https://traefik.io/) under the hood. | ||
We use [traefik](https://traefik.io/) under the hood. | ||
|
||
## Deployment | ||
|
||
|
@@ -11,17 +11,17 @@ We use [traefik](https://traefik.io/) under the hood. | |
1. Create your `values.yml`. For settings look [here](#Settings). | ||
|
||
```yml | ||
# Minimal Working Example | ||
host: &host 'example.com' | ||
contactUrl: '<Your Contact Url, maybe an issue tracker?>' | ||
roomPlanningToolUrl: '<Url to your Room Planning Tool>' | ||
contactEmail: &contactEmail '<Your Contact Email>' | ||
employeePictureEndpoint: '<Url To you User Picture Endpoint>' | ||
assetsEndpoint: '<Url To you User Assets Endpoint>' | ||
``` | ||
```yml | ||
# Minimal Working Example | ||
host: &host 'example.com' | ||
contactUrl: '<Your Contact Url, maybe an issue tracker?>' | ||
roomPlanningToolUrl: '<Url to your Room Planning Tool>' | ||
contactEmail: &contactEmail '<Your Contact Email>' | ||
employeePictureEndpoint: '<Url To you User Picture Endpoint>' | ||
assetsEndpoint: '<Url To you User Assets Endpoint>' | ||
``` | ||
For a more complete Example have a look at our demo [values.yml](../demo/values.yml). | ||
For a more complete Example have a look at our demo [values.yml](../demo/values.yml). | ||
2. Install your Phonebook application by running `helm install --values ./path/to/your/values.yml https://github.com/T-Systems-MMS/phonebook/releases/download/<latest release>/phonebook.tgz` | ||
|
||
|
@@ -37,10 +37,10 @@ If you install into a different namespace than `kube-public` please be sure to a | |
| `environment` | Yes | Determines the Environment the application is running in. Possible values: `development`, `preview`, `production`. Read more [here](..\Phonebook.Frontend\src\environments\EnvironmentInterfaces.ts) | `development` | `production` | | ||
| `environmentTag` | Yes | The tag that will be displayed alongside the title of the page. Can be any string. | Depends on the environment: `development` - `dev`, `preview`- `preview`, `production` - none | `demo-label` | | ||
| `contactUrl` | Yes | The contact Url used for private Feedback throughout the app | none | `https://github.com/T-Systems-MMS/phonebook/issues` | | ||
| `roomPlanningToolUrl` | No | If you are using a Room Planning Tool you can provide a link here. | none | `https://room.tool.com` | | ||
| `roomPlanningToolUrl` | No | If you are using a Room Planning Tool you can provide a link here. | none | `https://room.tool.com` | | ||
| `contactEmail` | Yes | Provide a contact Email for your users. | none | `[email protected]` | | ||
| `ravenUrl` | No | If you want to collect Bug Reports automatically you can setup a [Sentry](https://sentry.io/) Instance provide the link for Raven through this parameter. | none | `https://<key>@sentry.io/<project>` | | ||
| `employeePictureEnpoint` | No | Provide an Endpoint for the pictures of you users. | none | `https://employee.pictures.com` | | ||
| `employeePictureEnpoint` | No | Provide an Endpoint for the pictures of you users. | none | `https://employee.pictures.com` | | ||
| `assetsEndpoint` | Yes | Provide an Endpoint for the assets (roomplans, pictures of Building). | none | `https://assets.company.com` | | ||
| `rocketChatUrl` | No | Add a direct link from the user profile to [RocketChat](https://rocket.chat/). (Linked by `person.Id`) | none | `https://rocketchat.yourcompany.com` | | ||
|
||
|
@@ -63,4 +63,10 @@ helm delete <deployment-name> | |
|
||
## Development | ||
|
||
Execute `helm install --dry-run --debug` | ||
You need `helm2` and a running kubernetes cluster. | ||
|
||
1. Add `phonebook-demo.local` to your hosts, pointing to `localhost` (127.0.0.1). | ||
2. cd into the `/Phonebook` Folder | ||
3. `helm install -f ./local-values.yml -n phonebook .\phonebook\` | ||
|
||
Debug: `helm install --dry-run --debug -n phonebook .\phonebook\` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,27 @@ | ||
# Default values for phonebook. | ||
# Demo values for phonebook. | ||
# This is a YAML-formatted file. | ||
# Declare variables to be passed into your templates. | ||
|
||
# General Variables | ||
host: &host 'demo-phonebook.me' | ||
contactUrl: 'https://github.com/T-Systems-MMS/phonebook/issues' | ||
host: &host "demo-phonebook.me" | ||
contactUrl: "https://github.com/T-Systems-MMS/phonebook/issues" | ||
roomPlanningToolUrl: null | ||
contactEmail: &contactEmail '[email protected]' | ||
contactEmail: &contactEmail "[email protected]" | ||
ravenUrl: null | ||
employeePictureEndpoint: null | ||
assetsEndpoint: 'https://demo-phonebook.me/assets' | ||
environment: 'preview' | ||
environmentTag: 'demo' | ||
rocketChatUrl: 'https://open.rocket.chat' | ||
assetsEndpoint: "https://demo-phonebook.me/assets" | ||
environment: "preview" | ||
environmentTag: "demo" | ||
rocketChatUrl: "https://open.rocket.chat" | ||
|
||
frontend: | ||
replicaCount: 1 | ||
|
||
source: | ||
peoplesoft: | ||
replicaCount: 1 | ||
environment: Development | ||
|
||
resources: | ||
# We usually recommend not to specify default resources and to leave this as a conscious | ||
# choice for the user. This also increases chances charts run on environments with little | ||
|
@@ -39,13 +44,13 @@ affinity: {} | |
traefik: | ||
enabled: true | ||
startupArguments: | ||
- '' | ||
- "" | ||
dashboard: | ||
enabled: true | ||
domain: board.demo-phonebook.me | ||
ingress: | ||
annotations: | ||
traefik.frontend.priority: '100' | ||
traefik.frontend.priority: "100" | ||
ssl: | ||
enabled: true | ||
enforced: true | ||
|
@@ -54,10 +59,8 @@ traefik: | |
enabled: true | ||
email: *contactEmail | ||
onHostRule: true | ||
challengeType: 'http-01' | ||
challengeType: "http-01" | ||
domains: | ||
enabled: true | ||
rbac: | ||
enabled: true | ||
kubernetes: | ||
namespaces: |