Skip to content

Commit

Permalink
ConfigMap support implementation added
Browse files Browse the repository at this point in the history
  • Loading branch information
thr authored and thr committed Sep 18, 2024
1 parent e1d8fae commit b15ae70
Show file tree
Hide file tree
Showing 4 changed files with 94 additions and 2 deletions.
2 changes: 1 addition & 1 deletion developerportal/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,6 @@ helm install webmethods/developerportal devportal
| `1.0.0` | Initial release |
| `1.0.1` | Supports wM version 11.0. Validate `devportal.port` value in `values.yaml` if you want to use wM image version 11.0. |
| `1.0.2` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. |
| `1.0.3` | `priorityClassName` support added. Error is corrected on using value `useDefaultAffinityRule == true`. Now, the release name is used in condition with `app.kubernetes.io/instance`. `affinity` and `topologySpreadConstraints` support added for Elasticsearch. |
| `1.0.3` | `priorityClassName` support added. Error is corrected on using value `useDefaultAffinityRule == true`. Now, the release name is used in condition with `app.kubernetes.io/instance`. `affinity` and `topologySpreadConstraints` support added for Elasticsearch. Implementation of `extraConfigMaps` added. |

{{ template "chart.valuesSection" . }}
46 changes: 46 additions & 0 deletions developerportal/helm/templates/configmaps-extra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{ range .Values.extraConfigMaps }}
---
# /*
# * Copyright (c) 2023 Software AG, Darmstadt, Germany and/or its licensors
# *
# * SPDX-License-Identifier: Apache-2.0
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *
# */
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .name }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- with $.Values.extraLabels }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .binaryData }}
binaryData:
{{- range $key, $val := .binaryData }}
{{ $key }}: {{ $val | b64enc }}
{{- end }}
{{- else }}
data:
{{- range $key, $val := .data }}
{{ $key }}: |-
{{- if kindIs "string" $val }}
{{ tpl $val $ | nindent 4 }}
{{- else }}
{{ toYaml $val | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}
2 changes: 1 addition & 1 deletion mywebmethodsserver/helm/README.md.gotmpl
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,6 @@ helm install wm-mws mywebmethodsserver
| `1.0.2` | `storage.enabled` added in `values.yaml`. For backward reason is this value set to `true` as default. `false` doesn't create and mount any PV. (You can test this feature if you don't want to deploy any own MWS application. MWS is more stateless and has only the database as stateful dependency.) |
| `1.0.2` | `containerName` added in `values.yaml`. Default is the Chart name. (Use `helm repo update` to get latest Helm Chart version.) |
| `1.0.3` | `tpl` function support in `affinity` value added. `topologySpreadConstraints` support added. |
| `1.0.4` | `priorityClassName` support added. |
| `1.0.4` | `priorityClassName` support added. Implementation of `extraConfigMaps` added. |

{{ template "chart.valuesSection" . }}
46 changes: 46 additions & 0 deletions mywebmethodsserver/helm/templates/configmaps-extra.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{{ range .Values.extraConfigMaps }}
---
# /*
# * Copyright (c) 2023 Software AG, Darmstadt, Germany and/or its licensors
# *
# * SPDX-License-Identifier: Apache-2.0
# *
# * Licensed under the Apache License, Version 2.0 (the "License");
# * you may not use this file except in compliance with the License.
# * You may obtain a copy of the License at
# *
# * http://www.apache.org/licenses/LICENSE-2.0
# *
# * Unless required by applicable law or agreed to in writing, software
# * distributed under the License is distributed on an "AS IS" BASIS,
# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# * See the License for the specific language governing permissions and
# * limitations under the License.
# *
# */
apiVersion: v1
kind: ConfigMap
metadata:
name: {{ .name }}
labels:
{{- include "common.labels.standard" $ | nindent 4 }}
{{- with $.Values.extraLabels }}
{{ toYaml . | nindent 4 }}
{{- end }}
{{- if .binaryData }}
binaryData:
{{- range $key, $val := .binaryData }}
{{ $key }}: {{ $val | b64enc }}
{{- end }}
{{- else }}
data:
{{- range $key, $val := .data }}
{{ $key }}: |-
{{- if kindIs "string" $val }}
{{ tpl $val $ | nindent 4 }}
{{- else }}
{{ toYaml $val | nindent 4 }}
{{- end }}
{{- end }}
{{- end }}
{{- end }}

0 comments on commit b15ae70

Please sign in to comment.