Skip to content
Open
Show file tree
Hide file tree
Changes from 1 commit
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
17 changes: 15 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,28 @@ spec:
name: {{ template "api.fullname" . }}-app-passport-keys
{{- end }}
key: oauth-private.key
{{- if .Values.app.gce.serviceAccountSecret }}
volumeMounts:
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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 }}

{{- if .Values.configMap.name }}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you now don't need to check for this value right? You hardcode the name now at https://github.com/wbstack/charts/pull/204/files#diff-3a215b8c5c0bd4abc39f477cd0bf136b50746e10fdad5d3f997f4af46df6fe6fR4 (which I'm fine with; I don't think the name needs to be variable)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

yeah, this is true

- name: "mediawiki-configMap"
mountPath: {{ .Values.configMap.mountPath }}
Copy link
Copy Markdown
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 could become hardcoded. I can't imagine we'll want to change it regularly particularly since where we read it from will be specified in the api image

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

{{- if .Values.configMap.name }}
- name: "mediawiki-configMap"
configMap:
name: {{ .Values.configMap.name }}
{{- end }}

{{- 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-host-map
data:
{{- .Values.configMap.jsonMap | toYaml | nindent 2 }}
9 changes: 9 additions & 0 deletions charts/api/values.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,15 @@ service:
ingress:
enabled: false

configMap:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I wonder if this should be more specific to make it clearer that this is for a specific config map

name: "mediawiki-host-map"
mountPath: "/config"
jsonMap: |
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I guess you found this works? It's a little confusing to me having this json sent to toYaml but technically all json is valid yaml.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I can change it to yaml. I thought having it as json would made things easier on the enpoint level.

{
"mw1.39-wbs1": "139-app",
"mw1.43-wbs1": "143-app"
}

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