feat(common): Implement some simplifications from Bitnami (#1378)
* fix(common): add bitnami translation layer for images and labels * port bitnami storage and tpl handling * hmm * add affinity-handling, warnings and fix issues * bump feature * hmm * slight alterations * add some more tests * fix small mistake * fixing a minor bug
This commit is contained in:
@@ -62,7 +62,7 @@ class Test < ChartTest
|
||||
assert_equal('test', pvc["spec"]["storageClassName"])
|
||||
end
|
||||
|
||||
it 'can generate TrueNAS SCALE zfs storageClass' do
|
||||
it 'can generate TrueNAS SCALE zfs storageClass on demand' do
|
||||
values = {
|
||||
persistence: {
|
||||
config: {
|
||||
@@ -77,6 +77,55 @@ class Test < ChartTest
|
||||
assert_equal('ix-storage-class-common-test', pvc["spec"]["storageClassName"])
|
||||
end
|
||||
|
||||
it 'generate TrueNAS SCALE zfs storageClass as default when isSCALE' do
|
||||
values = {
|
||||
global: {
|
||||
isSCALE: true
|
||||
},
|
||||
persistence: {
|
||||
config: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
chart.value values
|
||||
pvc = chart.resources(kind: "PersistentVolumeClaim").find{ |s| s["metadata"]["name"] == "common-test-config" }
|
||||
refute_nil(pvc)
|
||||
assert_equal('ix-storage-class-common-test', pvc["spec"]["storageClassName"])
|
||||
end
|
||||
|
||||
it 'generate TrueNAS SCALE zfs storageClass as default when global ixChartContext' do
|
||||
values = {
|
||||
global: {
|
||||
ixChartContext: "somethingsomething"
|
||||
},
|
||||
persistence: {
|
||||
config: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
chart.value values
|
||||
pvc = chart.resources(kind: "PersistentVolumeClaim").find{ |s| s["metadata"]["name"] == "common-test-config" }
|
||||
refute_nil(pvc)
|
||||
assert_equal('ix-storage-class-common-test', pvc["spec"]["storageClassName"])
|
||||
end
|
||||
|
||||
it 'generate TrueNAS SCALE zfs storageClass as default when ixChartContext' do
|
||||
values = {
|
||||
ixChartContext: "somethingsomething",
|
||||
persistence: {
|
||||
config: {
|
||||
enabled: true
|
||||
}
|
||||
}
|
||||
}
|
||||
chart.value values
|
||||
pvc = chart.resources(kind: "PersistentVolumeClaim").find{ |s| s["metadata"]["name"] == "common-test-config" }
|
||||
refute_nil(pvc)
|
||||
assert_equal('ix-storage-class-common-test', pvc["spec"]["storageClassName"])
|
||||
end
|
||||
|
||||
it 'storageClass can be set to an empty value' do
|
||||
values = {
|
||||
persistence: {
|
||||
|
||||
Reference in New Issue
Block a user