fix(ingress): explicitly set iCN to null (#669)

**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  # <!--(issue)-->

**⚙️ 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:**

- [ ] ⚖️ My code follows the style guidelines of this project
- [ ] 👀 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
- [ ] ⬆️ 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-12-28 21:41:48 +02:00
committed by GitHub
parent 801b2e67c3
commit b1fe0654de
5 changed files with 33 additions and 33 deletions

View File

@@ -249,13 +249,13 @@ tests:
echo "Automatically correcting ownership and permissions..."
echo "Automatically correcting permissions for /mounts/test1..."
before=$(stat -c "%a" /mounts/test1)
chmod -$ 770 /mounts/test1 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test1 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test1)]"
echo ""
echo "Automatically correcting ownership for /mounts/test1..."
before=$(stat -c "%u:%g" /mounts/test1)
chown -$ -f :568 /mounts/test1 || echo "Failed setting ownership using chown..."
chown -R -f :568 /mounts/test1 || echo "Failed setting ownership using chown..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test1)]"
@@ -263,7 +263,7 @@ tests:
echo "Automatically correcting permissions for /mounts/test2..."
before=$(stat -c "%a" /mounts/test2)
chmod 770 /mounts/test2 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test2)]"
echo ""
echo "Automatically correcting ownership for /mounts/test2..."
@@ -276,7 +276,7 @@ tests:
echo "Automatically correcting permissions for /mounts/test3..."
before=$(stat -c "%a" /mounts/test3)
chmod 770 /mounts/test3 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test3)]"
echo ""
echo "Automatically correcting ownership for /mounts/test4..."
@@ -288,26 +288,26 @@ tests:
echo ""
echo "Automatically correcting permissions for /mounts/test6..."
before=$(stat -c "%a" /mounts/test6)
chmod -$ 770 /mounts/test6 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test6 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test6)]"
echo ""
echo "Automatically correcting ownership for /mounts/test6..."
before=$(stat -c "%u:%g" /mounts/test6)
chown -$ -f 1000:1000 /mounts/test6 || echo "Failed setting ownership using chown..."
chown -R -f 1000:1000 /mounts/test6 || echo "Failed setting ownership using chown..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test6)]"
echo ""
echo "Automatically correcting permissions for /mounts/test7..."
before=$(stat -c "%a" /mounts/test7)
chmod -$ 770 /mounts/test7 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test7 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test7)]"
echo ""
echo "Automatically correcting ownership for /mounts/test7..."
before=$(stat -c "%u:%g" /mounts/test7)
chown -$ -f :568 /mounts/test7 || echo "Failed setting ownership using chown..."
chown -R -f :568 /mounts/test7 || echo "Failed setting ownership using chown..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test7)]"
@@ -593,13 +593,13 @@ tests:
echo "Automatically correcting ownership and permissions..."
echo "Automatically correcting permissions for /mounts/test1..."
before=$(stat -c "%a" /mounts/test1)
chmod -$ 770 /mounts/test1 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test1 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test1)]"
echo ""
echo "Automatically correcting ownership for /mounts/test1..."
before=$(stat -c "%u:%g" /mounts/test1)
/usr/sbin/nfs4xdr_winacl -a chown -G 568 -$ -c "/mounts/test1" -p "/mounts/test1" || echo "Failed setting ownership using winacl..."
/usr/sbin/nfs4xdr_winacl -a chown -G 568 -r -c "/mounts/test1" -p "/mounts/test1" || echo "Failed setting ownership using winacl..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test1)]"
@@ -607,7 +607,7 @@ tests:
echo "Automatically correcting permissions for /mounts/test2..."
before=$(stat -c "%a" /mounts/test2)
chmod 770 /mounts/test2 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test2)]"
echo ""
echo "Automatically correcting ownership for /mounts/test2..."
@@ -620,7 +620,7 @@ tests:
echo "Automatically correcting permissions for /mounts/test3..."
before=$(stat -c "%a" /mounts/test3)
chmod 770 /mounts/test3 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test3)]"
echo ""
echo "Automatically correcting ownership for /mounts/test4..."
@@ -632,39 +632,39 @@ tests:
echo ""
echo "Automatically correcting permissions for /mounts/test6..."
before=$(stat -c "%a" /mounts/test6)
chmod -$ 770 /mounts/test6 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test6 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test6)]"
echo ""
echo "Automatically correcting ownership for /mounts/test6..."
before=$(stat -c "%u:%g" /mounts/test6)
/usr/sbin/nfs4xdr_winacl -a chown -G 1000 -$ -c "/mounts/test6" -p "/mounts/test6" || echo "Failed setting ownership using winacl..."
/usr/sbin/nfs4xdr_winacl -a chown -G 1000 -r -c "/mounts/test6" -p "/mounts/test6" || echo "Failed setting ownership using winacl..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test6)]"
echo ""
echo "Automatically correcting permissions for /mounts/test7..."
before=$(stat -c "%a" /mounts/test7)
chmod -$ 770 /mounts/test7 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test7 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test7)]"
echo ""
echo "Automatically correcting ownership for /mounts/test7..."
before=$(stat -c "%u:%g" /mounts/test7)
/usr/sbin/nfs4xdr_winacl -a chown -G 568 -$ -c "/mounts/test7" -p "/mounts/test7" || echo "Failed setting ownership using winacl..."
/usr/sbin/nfs4xdr_winacl -a chown -G 568 -r -c "/mounts/test7" -p "/mounts/test7" || echo "Failed setting ownership using winacl..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test7)]"
echo ""
echo "Automatically correcting permissions for /mounts/test8..."
before=$(stat -c "%a" /mounts/test8)
chmod -$ 770 /mounts/test8 || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
chmod -R 770 /mounts/test8 || echo "Failed setting permissions using chmod..."
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" /mounts/test8)]"
echo ""
echo "Automatically correcting ownership for /mounts/test8..."
before=$(stat -c "%u:%g" /mounts/test8)
/usr/sbin/nfs4xdr_winacl -a chown -G 568 -$ -c "/mounts/test8" -p "/mounts/test8" || echo "Failed setting ownership using winacl..."
/usr/sbin/nfs4xdr_winacl -a chown -G 568 -r -c "/mounts/test8" -p "/mounts/test8" || echo "Failed setting ownership using winacl..."
echo "Ownership before: [$before]"
echo "Ownership after: [$(stat -c "%u:%g" /mounts/test8)]"

View File

@@ -97,8 +97,9 @@ tests:
path: metadata.name
value: test-release-name-common-test
- documentIndex: *ingressDoc
isNull:
equal:
path: spec.ingressClassName
value: null
- documentIndex: *ingressDoc
isSubset:
path: metadata.annotations
@@ -125,8 +126,9 @@ tests:
path: metadata.name
value: test-release-name-common-test
- documentIndex: *ingressDoc
isNull:
equal:
path: spec.ingressClassName
value: null
- documentIndex: *ingressDoc
isSubset:
path: metadata.annotations

View File

@@ -15,4 +15,4 @@ maintainers:
name: common
sources: null
type: library
version: 17.2.1
version: 17.2.2

View File

@@ -54,9 +54,7 @@ metadata:
{{- . | nindent 4 }}
{{- end }}
spec:
{{- if $ingressClassName }}
ingressClassName: {{ $ingressClassName }}
{{- end }}
ingressClassName: {{ $ingressClassName | default nil }}
rules:
{{- range $h := $objectData.hosts }}
- host: {{ (tpl $h.host $rootCtx) | quote }}

View File

@@ -103,7 +103,7 @@ podSpec:
{{- $r := "" -}}
{{- if $vol.recursive -}}
{{- $r = "-$" -}}
{{- $r = "-R" -}}
{{- end -}}
{{/* Permissions */}}
@@ -111,7 +111,7 @@ podSpec:
echo "Automatically correcting permissions for {{ $mountPath }}..."
before=$(stat -c "%a" {{ $mountPath }})
chmod {{ $r }} {{ $vol.chmod }} {{ $mountPath }} || echo "Failed setting permissions using chmod..."
echo "Permissions after: [$before]"
echo "Permissions before: [$before]"
echo "Permissions after: [$(stat -c "%a" {{ $mountPath }})]"
echo ""
{{- end -}}