2021-09-03 17:52:32 +00:00
|
|
|
{{- $values := .Values }}
|
refactor(traefik): BREAKING CHANGE move traefik to new CRD's and move config to tc-system (#9116)
**Description**
Traefik couldn't be updated due to CRD namespace chagnes.
This PR changes the CRD namespace to `traefik.io` as required, so we can
actually update traefik.
Besides this, it moves the portalhook from either `default` or
`tc-*ingressclassname*`
to `tc-system` (our project config storage namespace). In case of
ingressclass use, `portalhook` will get a suffix instead
the reason behind this is, is the fact non-SCALE users currently cannot
use ingressclass at all and neither can platforms without a `default`
namespace.
This will require all apps to be updated accordingly, as the name and
location of the middleware also changes to `tc-system`, including a
suffix with the ingressClass name where needed.
This move of portalhook, also allows us to fix the "loadbalancer port
suffixed to ingress" bug on SCALE portal button.
**⚙️ Type of change**
- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 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:**
To be clear: IngressClass is still not 100% supported.
But that doesn't mean we should make it inherently problematic.
The "Breaking" portion of this PR, is just the fact all charts/apps have
to be updated accordingly or otherwise would not function with ingress
anymore. It does not require manual intervention byond updating, hoever.
**✔️ 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._
2023-05-24 07:54:40 +00:00
|
|
|
|
2021-09-03 12:43:21 +00:00
|
|
|
{{ range $index, $middlewareData := .Values.middlewares.basicAuth }}
|
|
|
|
---
|
|
|
|
{{- $users := list }}
|
2023-05-25 08:40:49 +00:00
|
|
|
{{- range $index, $userdata := $middlewareData.users }}
|
|
|
|
{{- $users = append $users (htpasswd $userdata.username $userdata.password) }}
|
|
|
|
{{- end }}
|
2021-09-03 12:43:21 +00:00
|
|
|
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Secret
|
|
|
|
metadata:
|
|
|
|
name: {{printf "%v-%v" $middlewareData.name "secret" }}
|
refactor(traefik): BREAKING CHANGE move traefik to new CRD's and move config to tc-system (#9116)
**Description**
Traefik couldn't be updated due to CRD namespace chagnes.
This PR changes the CRD namespace to `traefik.io` as required, so we can
actually update traefik.
Besides this, it moves the portalhook from either `default` or
`tc-*ingressclassname*`
to `tc-system` (our project config storage namespace). In case of
ingressclass use, `portalhook` will get a suffix instead
the reason behind this is, is the fact non-SCALE users currently cannot
use ingressclass at all and neither can platforms without a `default`
namespace.
This will require all apps to be updated accordingly, as the name and
location of the middleware also changes to `tc-system`, including a
suffix with the ingressClass name where needed.
This move of portalhook, also allows us to fix the "loadbalancer port
suffixed to ingress" bug on SCALE portal button.
**⚙️ Type of change**
- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 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:**
To be clear: IngressClass is still not 100% supported.
But that doesn't mean we should make it inherently problematic.
The "Breaking" portion of this PR, is just the fact all charts/apps have
to be updated accordingly or otherwise would not function with ingress
anymore. It does not require manual intervention byond updating, hoever.
**✔️ 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._
2023-05-24 07:54:40 +00:00
|
|
|
namespace: tc-system
|
2021-09-03 12:43:21 +00:00
|
|
|
type: Opaque
|
|
|
|
stringData:
|
|
|
|
users: |
|
|
|
|
{{- range $index, $user := $users }}
|
|
|
|
{{ printf "%s" $user }}
|
|
|
|
{{- end }}
|
|
|
|
---
|
|
|
|
# Declaring the user list
|
refactor(traefik): BREAKING CHANGE move traefik to new CRD's and move config to tc-system (#9116)
**Description**
Traefik couldn't be updated due to CRD namespace chagnes.
This PR changes the CRD namespace to `traefik.io` as required, so we can
actually update traefik.
Besides this, it moves the portalhook from either `default` or
`tc-*ingressclassname*`
to `tc-system` (our project config storage namespace). In case of
ingressclass use, `portalhook` will get a suffix instead
the reason behind this is, is the fact non-SCALE users currently cannot
use ingressclass at all and neither can platforms without a `default`
namespace.
This will require all apps to be updated accordingly, as the name and
location of the middleware also changes to `tc-system`, including a
suffix with the ingressClass name where needed.
This move of portalhook, also allows us to fix the "loadbalancer port
suffixed to ingress" bug on SCALE portal button.
**⚙️ Type of change**
- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 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:**
To be clear: IngressClass is still not 100% supported.
But that doesn't mean we should make it inherently problematic.
The "Breaking" portion of this PR, is just the fact all charts/apps have
to be updated accordingly or otherwise would not function with ingress
anymore. It does not require manual intervention byond updating, hoever.
**✔️ 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._
2023-05-24 07:54:40 +00:00
|
|
|
apiVersion: traefik.io/v1alpha1
|
2021-09-03 12:43:21 +00:00
|
|
|
kind: Middleware
|
|
|
|
metadata:
|
2023-05-25 08:40:49 +00:00
|
|
|
name: {{ ternary (printf "%v-%v" .Release.Name $middlewareData.name) $middlewareData.name $.Values.ingressClass.enabled }}
|
refactor(traefik): BREAKING CHANGE move traefik to new CRD's and move config to tc-system (#9116)
**Description**
Traefik couldn't be updated due to CRD namespace chagnes.
This PR changes the CRD namespace to `traefik.io` as required, so we can
actually update traefik.
Besides this, it moves the portalhook from either `default` or
`tc-*ingressclassname*`
to `tc-system` (our project config storage namespace). In case of
ingressclass use, `portalhook` will get a suffix instead
the reason behind this is, is the fact non-SCALE users currently cannot
use ingressclass at all and neither can platforms without a `default`
namespace.
This will require all apps to be updated accordingly, as the name and
location of the middleware also changes to `tc-system`, including a
suffix with the ingressClass name where needed.
This move of portalhook, also allows us to fix the "loadbalancer port
suffixed to ingress" bug on SCALE portal button.
**⚙️ Type of change**
- [ ] ⚙️ Feature/App addition
- [ ] 🪛 Bugfix
- [x] ⚠️ Breaking change (fix or feature that would cause existing
functionality to not work as expected)
- [x] 🔃 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:**
To be clear: IngressClass is still not 100% supported.
But that doesn't mean we should make it inherently problematic.
The "Breaking" portion of this PR, is just the fact all charts/apps have
to be updated accordingly or otherwise would not function with ingress
anymore. It does not require manual intervention byond updating, hoever.
**✔️ 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._
2023-05-24 07:54:40 +00:00
|
|
|
namespace: tc-system
|
2021-09-03 12:43:21 +00:00
|
|
|
spec:
|
|
|
|
basicAuth:
|
2023-05-25 08:40:49 +00:00
|
|
|
secret: {{ printf "%v-%v" $middlewareData.name "secret" }}
|
2021-09-03 12:43:21 +00:00
|
|
|
{{ end }}
|