-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add priobike news service manager and worker * Fix linting and debug value
- Loading branch information
1 parent
570a4b9
commit 33e4d8e
Showing
14 changed files
with
270 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
# Patterns to ignore when building packages. | ||
# This supports shell glob matching, relative path matching, and | ||
# negation (prefixed with !). Only one pattern per line. | ||
.DS_Store | ||
# Common VCS dirs | ||
.git/ | ||
.gitignore | ||
.bzr/ | ||
.bzrignore | ||
.hg/ | ||
.hgignore | ||
.svn/ | ||
# Common backup files | ||
*.swp | ||
*.bak | ||
*.tmp | ||
*.orig | ||
*~ | ||
# Various IDEs | ||
.project | ||
.idea/ | ||
*.tmproj | ||
.vscode/ |
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,30 @@ | ||
apiVersion: v2 | ||
name: priobike-news | ||
description: A Helm chart for Kubernetes | ||
|
||
# A chart can be either an 'application' or a 'library' chart. | ||
# | ||
# Application charts are a collection of templates that can be packaged into versioned archives | ||
# to be deployed. | ||
# | ||
# Library charts provide useful utilities or functions for the chart developer. They're included as | ||
# a dependency of application charts to inject those utilities and functions into the rendering | ||
# pipeline. Library charts do not define any templates and therefore cannot be deployed. | ||
type: application | ||
|
||
# This is the chart version. This version number should be incremented each time you make changes | ||
# to the chart and its templates, including the app version. | ||
# Versions are expected to follow Semantic Versioning (https://semver.org/) | ||
version: 0.1.0 | ||
|
||
# This is the version number of the application being deployed. This version number should be | ||
# incremented each time you make changes to the application. Versions are not expected to | ||
# follow Semantic Versioning. They should reflect the version the application is using. | ||
# It is recommended to use it with quotes. | ||
appVersion: "v2.1" | ||
|
||
maintainers: | ||
- name: Paul | ||
email: paul_maximilian.pickhardt@tu-dresden.de | ||
- name: Daniel | ||
email: daniel.jeschor@tu-dresden.de |
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,10 @@ | ||
namespace: exampleNamespace | ||
priobikeImageRegistry: bikenow.vkw.tu-dresden.de/priobike | ||
|
||
djangoKey: test-key | ||
djangoSuperuserPassword: test-password | ||
|
||
syncKey: test-key | ||
|
||
fcmPushNotificationEnvironment: development | ||
csrfTrustedOrigin: http://localhost |
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,15 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Values.manager.configMapName }} | ||
data: | ||
DEBUG: {{ .Values.manager.debug | quote }} | ||
WORKER_HOST: |- | ||
{{ .Values.worker.serviceName | required "A valid .Values.worker.serviceName entry is required!" }} | ||
. | ||
{{- (.Values.global).namespace | default .Values.namespace | required "A valid .Values.namespace or .Values.global.namespace entry is required!" -}} | ||
. | ||
svc.cluster.local | ||
APP_URL: {{ .Values.manager.appUrl }} | ||
FCM_PUSH_NOTIFICATION_ENVIRONMENT: {{ required "A valid .Values.fcmPushNotificationEnvironment entry is required!" .Values.fcmPushNotificationEnvironment }} | ||
CSRF_TRUSTED_ORIGIN: {{ required "A valid .Values.csrfTrustedOrigin entry is required!" .Values.csrfTrustedOrigin }} |
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,38 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.manager.deploymentName }} | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.manager.labels.app }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.manager.labels.app }} | ||
spec: | ||
imagePullSecrets: | ||
- name: regcred | ||
|
||
containers: | ||
- name: {{ .Values.manager.containerName }} | ||
image: |- | ||
{{ (.Values.global).priobikeImageRegistry | default .Values.priobikeImageRegistry | required "A valid .Values.priobikeImageRegistry or .Values.global.priobikeImageRegistry entry is required!" -}} | ||
/{{ .Values.imageName }}:v2.1 | ||
envFrom: | ||
- configMapRef: | ||
name: {{ .Values.manager.configMapName }} | ||
- secretRef: | ||
name: {{ .Values.manager.secretName }} | ||
volumeMounts: | ||
- mountPath: /etc/postgresql | ||
name: {{ .Values.manager.volumeName }} | ||
- mountPath: /var/log/postgresql | ||
name: {{ .Values.manager.volumeName }} | ||
- mountPath: /var/lib/postgresql/data | ||
name: {{ .Values.manager.volumeName }} | ||
volumes: | ||
- name: {{ .Values.manager.volumeName }} | ||
persistentVolumeClaim: | ||
claimName: {{ .Values.manager.volumeClaimName }} |
11 changes: 11 additions & 0 deletions
11
charts/priobike-news/templates/manager-persistent-volume-claim.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,11 @@ | ||
apiVersion: v1 | ||
kind: PersistentVolumeClaim | ||
metadata: | ||
name: {{ .Values.manager.volumeClaimName }} | ||
spec: | ||
storageClassName: {{ .Values.manager.storageClassName }} | ||
accessModes: | ||
- ReadWriteOnce | ||
resources: | ||
requests: | ||
storage: {{ .Values.manager.storageSize }} |
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,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Values.manager.secretName }} | ||
data: | ||
DJANGO_SUPERUSER_PASSWORD: {{ required "A valid .Values.djangoSuperuserPassword entry is required!" .Values.djangoSuperuserPassword | b64enc }} | ||
DJANGO_KEY: {{ required "A valid .Values.djangoKey entry is required!" .Values.djangoKey | b64enc }} | ||
SYNC_KEY: {{ required "A valid .Values.syncKey entry is required!" .Values.syncKey | b64enc }} |
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,17 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.manager.serviceName }} | ||
spec: | ||
selector: | ||
app: {{ .Values.manager.labels.app }} | ||
ports: | ||
- protocol: TCP | ||
port: 8000 | ||
targetPort: 8000 | ||
name: admin-port | ||
- protocol: TCP | ||
port: 8001 | ||
targetPort: 8001 | ||
name: sync-port | ||
type: ClusterIP |
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,14 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: {{ .Values.worker.configMapName }} | ||
data: | ||
DEBUG: {{ .Values.worker.debug | quote }} | ||
WORKER_MODE: "True" | ||
MANAGER_HOST: |- | ||
{{ .Values.manager.serviceName | required "A valid .Values.manager.serviceName entry is required!" }} | ||
. | ||
{{- (.Values.global).namespace | default .Values.namespace | required "A valid .Values.namespace or .Values.global.namespace entry is required!" -}} | ||
. | ||
svc.cluster.local | ||
APP_URL: {{ .Values.worker.appUrl }} |
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 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: {{ .Values.worker.deploymentName }} | ||
spec: | ||
replicas: {{ .Values.worker.replicas }} | ||
selector: | ||
matchLabels: | ||
app: {{ .Values.worker.labels.app }} | ||
template: | ||
metadata: | ||
labels: | ||
app: {{ .Values.worker.labels.app }} | ||
spec: | ||
imagePullSecrets: | ||
- name: regcred | ||
|
||
containers: | ||
- name: {{ .Values.worker.containerName }} | ||
image: |- | ||
{{ (.Values.global).priobikeImageRegistry | default .Values.priobikeImageRegistry | required "A valid .Values.priobikeImageRegistry or .Values.global.priobikeImageRegistry entry is required!" -}} | ||
/{{ .Values.imageName }}:v2.1 | ||
envFrom: | ||
- configMapRef: | ||
name: {{ .Values.worker.configMapName }} | ||
- secretRef: | ||
name: {{ .Values.worker.secretName }} |
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,7 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: {{ .Values.worker.secretName }} | ||
data: | ||
DJANGO_KEY: {{ required "A valid .Values.djangoKey entry is required!" .Values.djangoKey | b64enc }} | ||
SYNC_KEY: {{ required "A valid .Values.syncKey entry is required!" .Values.syncKey | b64enc }} |
13 changes: 13 additions & 0 deletions
13
charts/priobike-news/templates/worker-service-headless.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,13 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.worker.headlessServiceName }} | ||
spec: | ||
selector: | ||
app: {{ .Values.worker.labels.app }} | ||
ports: | ||
- protocol: TCP | ||
port: 8001 | ||
targetPort: 8001 | ||
clusterIP: None | ||
type: ClusterIP |
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 @@ | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: {{ .Values.worker.serviceName }} | ||
spec: | ||
selector: | ||
app: {{ .Values.worker.labels.app }} | ||
ports: | ||
- protocol: TCP | ||
port: 8000 | ||
targetPort: 8000 | ||
type: ClusterIP | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: priobike-news-worker-service-headless | ||
spec: | ||
selector: | ||
app: priobike-news-worker-app | ||
ports: | ||
- protocol: TCP | ||
port: 8001 | ||
targetPort: 8001 | ||
clusterIP: None | ||
type: ClusterIP | ||
--- |
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,30 @@ | ||
imageName: priobike-news-service | ||
|
||
|
||
manager: | ||
labels: | ||
app: priobike-news-manager-app | ||
configmapName: priobike-news-manager-config | ||
deploymentName: priobike-news-manager-deployment | ||
containerName: priobike-news-manager-container | ||
volumeClaimName: priobike-news-manager-volume-claim | ||
storageClassName: standard | ||
storageSize: 1Gi | ||
volumeName: priobike-news-manager-volume | ||
serviceName: priobike-news-manager-service | ||
secretName: priobike-news-manager-secret | ||
appUrl: /news-service-manager/ | ||
debug: 'False' | ||
|
||
worker: | ||
replicas: 1 | ||
labels: | ||
app: priobike-news-worker-app | ||
configmapName: priobike-news-worker-config | ||
deploymentName: priobike-news-worker-deployment | ||
containerName: priobike-news-worker-container | ||
serviceName: priobike-news-worker-service | ||
headlessServiceName: priobike-news-worker-service-headless | ||
secretName: priobike-news-worker-secret | ||
appUrl: /news-service-worker/ | ||
debug: 'False' |