From 9ca9da9338d8520db704bd25860b7a1ad91f52d7 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sat, 15 Apr 2023 21:14:45 +0300 Subject: [PATCH] fix(template): fix static ip config (#8038) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit **Description** ⚒️ Fixes #8037 **⚙️ Type of change** - [ ] ⚙️ 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?** **📃 Notes:** **✔️ 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._ --- .../questions/service/serviceExpert.yaml | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/templates/questions/service/serviceExpert.yaml b/templates/questions/service/serviceExpert.yaml index e6a1532ddef..b0551a1321d 100644 --- a/templates/questions/service/serviceExpert.yaml +++ b/templates/questions/service/serviceExpert.yaml @@ -39,38 +39,38 @@ description: Use DHCP - value: static description: Use Static IP - show_subquestions_if: static - subquestions: - - variable: staticIPConfigurations - label: Static IP Addresses + - variable: staticIPConfigurations + label: Static IP Addresses + schema: + type: list + show_if: [["ipam", "=", {"type": "static"}]] + items: + - variable: staticIP + label: Static IP + schema: + type: ipaddr + cidr: true + - variable: staticRoutes + label: Static Routes + schema: + type: list + show_if: [["ipam", "=", {"type": "static"}]] + items: + - variable: staticRouteConfiguration + label: Static Route Configuration + schema: + additional_attrs: true + type: dict + attrs: + - variable: destination + label: Destination schema: - type: list - items: - - variable: staticIP - label: Static IP - schema: - type: ipaddr - cidr: true - - variable: staticRoutes - label: Static Routes + type: ipaddr + cidr: true + required: true + - variable: gateway + label: Gateway schema: - type: list - items: - - variable: staticRouteConfiguration - label: Static Route Configuration - schema: - additional_attrs: true - type: dict - attrs: - - variable: destination - label: Destination - schema: - type: ipaddr - cidr: true - required: true - - variable: gateway - label: Gateway - schema: - type: ipaddr - cidr: false - required: true + type: ipaddr + cidr: false + required: true