Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion charts/api/Chart.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ apiVersion: v1
appVersion: "1.0"
description: A Helm chart for the WBStack API
name: api
version: 0.33.0
version: 0.33.1
home: https://github.com/wbstack
maintainers:
- name: WBstack
Expand Down
13 changes: 11 additions & 2 deletions charts/api/templates/deployment-app-backend.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -216,15 +216,24 @@ spec:
name: {{ template "api.fullname" . }}-app-passport-keys
{{- end }}
key: oauth-private.key
{{- if .Values.app.gce.serviceAccountSecret }}
volumeMounts:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is it ok that this is now always present even if .values.app.gce.serviceAccountSecret evaluates to false? I guess in this case it's just blank?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure I understand

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

by swapping this line (219) with the one below (220) now the volumeMounts: key line will always be present

{{- if .values.app.gce.serviceAccountSecret }}
- name: "service-account-wbstack-api"
mountPath: "/var/run/secret/cloud.google.com"
{{- end }}

- name: "mediawiki-configMap"
mountPath: "/config"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think probably this wants to go somewhere specific but I'm stalling a little on exactly where.

Perhaps into the Laravel config directory? (/var/www/html/config).

And it should definitely have a more meaningful name than config (maybe mediawiki-backend-service-configmap.<extension>. See https://github.com/wbstack/charts/pull/204/files#r2523682791

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, I agree. this was a temporary location but I am also not yet sure where to place it.

volumes:
{{- if .values.app.gce.serviceAccountSecret }}
- name: "service-account-wbstack-api"
secret:
secretName: {{ .Values.app.gce.serviceAccountSecret | quote }}
{{- end }}
{{- end }}

- name: "mediawiki-configMap"
configMap:
name: "mediawiki-version-map"

{{- with .Values.nodeSelector }}
nodeSelector:
Expand Down
6 changes: 6 additions & 0 deletions charts/api/templates/mediawiki-configmap.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
apiVersion: v1
kind: ConfigMap
metadata:
name: mediawiki-version-map
data:
{{- .Values.mediawikiVersionConfigMap | toYaml | nindent 2 }}
4 changes: 4 additions & 0 deletions charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,10 @@ service:
ingress:
enabled: false

mediawikiVersionConfigMap: |
mw1.39-wbs1: 139-app
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm now wondering what this file should look like; all the laravel config files are actually .php. e.g. filesystems.php.

This is yaml right now but that or json seems a bit off. In general I struggled to find evidence with my googling of people loading whole config files at run (not build) time into laravel. Mostly they just seem to use environment variables.

I guess a php file in the config folder might not be the worst solution though.

mw1.43-wbs1: 143-app

resources:
backend: {}
web: {}
Expand Down
Loading