feat(scale): Add experimental cluster cert questions support (#14055)

**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.
-->

Adding experimental support for the cluster certs in the SCALE UI. Ties
in with PR #13852 .
⚒️ Fixes  # <!--(issue)-->

**⚙️ Type of change**

- [x] ⚙️ Feature/App addition
- [ ] 🪛 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
-->

Not tested on SCALE.

I just checked the common lib and if I understand correctly it looks for
`certificateIssuer` entry and if empty eventually looks for a
`secretName` entry

**📃 Notes:**
<!-- Please enter any other relevant information here -->
For now, Common Lib has no knowledge of cluster-wide certificates. Thus:
1. It wouldn't know how to resolve the full secret name from just the
cert name. I.e. it doesn't know what the ClusterIssuer deployment is
called and what the certificate naming scheme is. So, for now, the user
must provide the full secret name in the form of
`<CLUSTERISSUER_APP_NAME>-clusterissuer-<CLUSTER_CERT_NAME>`.
2. It wouldn't be able to enforce cluster-issuer and
Kubernetes-reflector being installed if the user provides a cluster
certificate name

Nevertheless, I think it's fine to have this listed as an experimental
feature since having it in the SCALE GUI makes it much easier to test
the cluster certificates support.


**QUESTION:** Why is the Cert Manager clusterIssuer option variable
named `certificateIssuer` in `IngressTls.yaml` and `clusterIssuer` in
`IngressList.yaml`. I think it should be `certificateIssuer` in both
places.

**✔️ Checklist:**

- [X] ⚖️ My code follows the style guidelines of this project
- [X] 👀 I have performed a self-review of my own code
- [X] #️⃣ I have commented my code, particularly in hard-to-understand
areas
- [ ] 📄 I have made corresponding changes to the documentation
- [X] ⚠️ 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._

---------

Signed-off-by: sdimovv <36302090+sdimovv@users.noreply.github.com>
Signed-off-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
Co-authored-by: Kjeld Schouten <kjeld@schouten-lebbing.nl>
This commit is contained in:
sdimovv
2023-10-29 11:15:32 +00:00
committed by GitHub
parent 723f85fede
commit 6726b54d24
2 changed files with 20 additions and 0 deletions
@@ -128,6 +128,13 @@
type: int
$ref:
- "definitions/certificate"
- variable: clusterCertificate
label: Cluster Certificate (Experimental)
description: 'Add the name of your cluster-wide certificate, that you set up in the ClusterIssuer chart. NOTE: This is an experimental feature'
schema:
type: string
show_if: [["clusterIssuer", "=", ""]]
default: ""
- variable: secretName
label: Use Custom Secret (Advanced)
schema:
@@ -4,3 +4,16 @@
schema:
type: string
default: ""
- variable: clusterCertificate
label: Cluster Certificate (Experimental)
description: 'Add the name of your cluster-wide certificate, that you set up in ClusterIssuer chart. NOTE: This is an experimental feature'
schema:
show_if: [["certificateIssuer", "=", ""]]
type: string
default: ""
- variable: secretName
label: Custom Certificate Secret (Advanced)'
schema:
show_if: [["certificateIssuer", "=", ""]]
type: string
default: ""