fix(varrun, devshm): medium -> Memory (#398)

**Description**
<!--
Please include a summary of the change and which issue is fixed. Please
also include relevant motivation and context. List any dependencies that
are required for this change.
-->
⚒️ Fixes  https://github.com/truecharts/charts/issues/8098

**⚙️ Type of change**

- [ ] ⚙️ Feature/App addition
- [x] 🪛 Bugfix
- [ ] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [ ] 🔃 Refactor of current code

**🧪 How Has This Been Tested?**
<!--
Please describe the tests that you ran to verify your changes. Provide
instructions so we can reproduce. Please also list any relevant details
for your test configuration
-->

**📃 Notes:**
<!-- Please enter any other relevant information here -->

**✔️ Checklist:**

- [x] ⚖️ My code follows the style guidelines of this project
- [x] 👀 I have performed a self-review of my own code
- [ ] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [ ] ⚠️ My changes generate no new warnings
- [ ] 🧪 I have added tests to this description that prove my fix is
effective or that my feature works
- [x] ⬆️ I increased versions for any altered app according to semantic
versioning

** App addition**

If this PR is an app addition please make sure you have done the
following.

- [ ] 🪞 I have opened a PR on
[truecharts/containers](https://github.com/truecharts/containers) adding
the container to TrueCharts mirror repo.
- [ ] 🖼️ I have added an icon in the Chart's root directory called
`icon.png`

---

_Please don't blindly check all the boxes. Read them and only check
those that apply.
Those checkboxes are there for the reviewer to see what is this all
about and
the status of this PR with a quick glance._
This commit is contained in:
Stavros Kois
2023-04-22 13:27:25 +03:00
committed by GitHub
parent 257f1f9a8a
commit 5f8d19b9dc
11 changed files with 95 additions and 13 deletions

View File

@@ -0,0 +1,81 @@
suite: default test
templates:
- common.yaml
tests:
- it: should pass with defaults
set:
service:
main:
enabled: true
ports:
main:
enabled: true
port: 1025
workload:
main:
enabled: true
podSpec:
containers:
main:
enabled: true
asserts:
- hasDocuments:
count: 2
- documentIndex: &deploymentDoc 0
isKind:
of: Deployment
- documentIndex: &serviceDoc 1
isKind:
of: Service
- documentIndex: *serviceDoc
isAPIVersion:
of: v1
- documentIndex: *deploymentDoc
isAPIVersion:
of: apps/v1
- documentIndex: *deploymentDoc
isSubset:
path: spec
content:
replicas: 1
revisionHistoryLimit: 3
strategy:
type: Recreate
- documentIndex: *deploymentDoc
isSubset:
path: spec.template.spec
content:
serviceAccountName: default
automountServiceAccountToken: false
runtimeClassName:
hostNetwork: false
enableServiceLinks: false
restartPolicy: Always
dnsPolicy: ClusterFirst
dnsConfig:
options:
- name: ndots
value: "2"
terminationGracePeriodSeconds: 60
securityContext:
fsGroup: 568
fsGroupChangePolicy: OnRootMismatch
supplementalGroups: []
sysctls: []
- documentIndex: *deploymentDoc
isSubset:
path: spec.template.spec
content:
volumes:
- name: devshm
emptyDir:
medium: Memory
- name: shared
emptyDir: {}
- name: tmp
emptyDir: {}
- name: varlogs
emptyDir: {}
- name: varrun
emptyDir:
medium: Memory

View File

@@ -15,4 +15,4 @@ maintainers:
name: common
sources: null
type: library
version: 12.4.21
version: 12.4.22

View File

@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "tc.v1.common.lib.workload.cronjobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "tc.v1.common.lib.workload.cronjobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | indent 2 }}
template:
metadata:
{{- $labels := (mustMerge ($objectData.podSpec.labels | default dict)

View File

@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "tc.v1.common.lib.workload.daemonsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "tc.v1.common.lib.workload.daemonsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | indent 2 }}
selector:
matchLabels:
{{- include "tc.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "objectType" "pod" "objectName" $objectData.shortName) | trim | nindent 6 }}

View File

@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "tc.v1.common.lib.workload.deploymentSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "tc.v1.common.lib.workload.deploymentSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | indent 2 }}
selector:
matchLabels:
{{- include "tc.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "objectType" "pod" "objectName" $objectData.shortName) | trim | nindent 6 }}

View File

@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "tc.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "tc.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | indent 2 }}
template:
metadata:
{{- $labels := (mustMerge ($objectData.podSpec.labels | default dict)

View File

@@ -27,7 +27,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- include "tc.v1.common.lib.workload.statefulsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 2 }}
{{- include "tc.v1.common.lib.workload.statefulsetSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | indent 2 }}
selector:
matchLabels:
{{- include "tc.v1.common.lib.metadata.selectorLabels" (dict "rootCtx" $rootCtx "objectType" "pod" "objectName" $objectData.shortName) | trim | nindent 6 }}

View File

@@ -8,9 +8,9 @@ podName is the "shortName" of the pod. The one you define in the .Values.workloa
{{- $objectType := .objectType -}}
{{- $objectName := .objectName }}
{{ if $objectType }}
{{- if and $objectType $objectName }}
{{ printf "%s.name" $objectType }}: {{ $objectName }}
{{ end }}
{{- end }}
app.kubernetes.io/name: {{ include "tc.v1.common.lib.chart.names.name" $rootCtx }}
app.kubernetes.io/instance: {{ $rootCtx.Release.Name }}
{{- end -}}

View File

@@ -13,7 +13,7 @@ objectData:
*/}}
{{- define "tc.v1.common.lib.workload.cronjobSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
{{- $rootCtx := .rootCtx }}
timeZone: {{ (tpl ($objectData.timezone | default $rootCtx.Values.TZ) $rootCtx) | quote }}
schedule: {{ (tpl $objectData.schedule $rootCtx) | quote }}
concurrencyPolicy: {{ $objectData.concurrencyPolicy | default "Forbid" }}
@@ -22,5 +22,5 @@ successfulJobsHistoryLimit: {{ $objectData.successfulJobsHistoryLimit | default
startingDeadlineSeconds: {{ $objectData.startingDeadlineSeconds | default 600 }}
jobTemplate:
spec:
{{- include "tc.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | nindent 4 }}
{{- include "tc.v1.common.lib.workload.jobSpec" (dict "rootCtx" $rootCtx "objectData" $objectData) | indent 4 }}
{{- end -}}

View File

@@ -12,7 +12,7 @@ objectData:
*/}}
{{- define "tc.v1.common.lib.workload.jobSpec" -}}
{{- $objectData := .objectData -}}
{{- $rootCtx := .rootCtx -}}
{{- $rootCtx := .rootCtx }}
backoffLimit: {{ $objectData.backoffLimit | default 5 }}
completionMode: {{ $objectData.completionMode | default "NonIndexed" }}
completions: {{ $objectData.completions | default nil }}

View File

@@ -134,7 +134,7 @@ podOptions:
priorityClassName: ""
runtimeClassName: ""
automountServiceAccountToken: false
terminationGracePeriodSeconds: 120
terminationGracePeriodSeconds: 60
# -- (docs/workload/README.md)
workload:
@@ -195,7 +195,7 @@ persistence:
enabled: true
type: emptyDir
mountPath: /var/run
mediume: Memory
medium: Memory
targetSelectAll: true
tmp:
enabled: true
@@ -206,6 +206,7 @@ persistence:
enabled: true
type: emptyDir
mountPath: /dev/shm
medium: Memory
targetSelectAll: true
persistenceList: []